davegee Posted April 2, 2015 Report Posted April 2, 2015 A method for drawing a Line on a Map in real time.Other methods exist.In your Image Editor, set up a Hot Key (Action) for merging an existing Layer into a New Layer - in my case it is F5.Set up a suitable brush type, colour and size to draw your lineAdd your map to a background layer in your Image Editor.Hit F5.Place a Dot on your Start Position.Hit F5.In the New Layer with the first dot place another dot which overlaps the first dot by about 25% - 50%.Hit F5 and repeat the above step of adding a new dot with a 25% - 50% overlap following the Line or Road which you want to delineate.Continue as above - F5; Dot; F5; Dot; F5; Dot until you reach your destination, changing direction with the road as required.When you have reached your destination you will have many layers but this takes relatively little time. The example below has 150 Layers and took about 10 Minutes to complete.Go to File / Scripts / Export Layers to Files and create all of the necessary JPEGs to a dedicated folder. The files will be created from the top layer downwards.When complete go to Windows Explorer and do a Batch Rename to reverse the order of the JPEG Files. The method is well documented on the web so I won't go into detail here. Alternatively use the PTE Settings / File List Order / Reverse Order command.Add the JPEGs to a New Project and adjust the timings to get as smooth a drawing of the Line as you can get. In the example the Slide Duration is 0.1 seconds and the Transition Time is 0.045 seconds. Note that when previewed the drawing of the line will possibly look a little "staccato" but when converted to an MP4 will smooth out nicely.When satisfied with your creation save the Project and create an MP4. The resulting MP4 can be added to another project, converted and its Slide Duration can be adjusted using the Speed/Duration Controls in O&A / Properties if required. DG Quote
tom95521 Posted April 3, 2015 Report Posted April 3, 2015 Hi Dave,As you mentioned another method that I have seen is to use a mask to uncover the line on a second copy of the image. I think it can also be used to simulate handwriting animation. I am not sure exactly how to do handwriting animation. I think it would be difficult with multiple lines of text on the display.Tom Quote
Lin Evans Posted April 3, 2015 Report Posted April 3, 2015 The way Dominique (theDom) and I did the first ones with PTE was a little different. We took a copy jpg of the map into Photoshop and pasted it on a transparency. Then we used a brush the diameter of the line representing the route and erased the highway route leaving transparency in place of the highway and saved as a PNG. Then we took the original jpg map and placed it in PTE with the copy of the cut-out on top. This appeared then exactly as the original jpg but what was actually seen as the highway route was the underlying jpg showing through the cut-out in the PNG layer on top. Next we took a colored jpg (solid color such as red) and sandwiched it between the PNG and the jpg in yet a third layer on PTE and we moved it, thus replacing the original route with the moving red line, etc., to represent the route as traveled in real time.LinQuick and VERY unsophisticated example:http://www.lin-evans.org/pte8/mapdemo.mp4 Quote
David Porter Posted April 3, 2015 Report Posted April 3, 2015 Lin's method is the one I use as it is easy to understand the principle but still can me difficult if there are a lot of twists and turns and acute angles on the route. The positioning, direction and timing of the coloured jpg has to be adjusted at each turn so as to achieve a nice constant speed of the resulting moving route indicator. Quote
Lin Evans Posted April 3, 2015 Report Posted April 3, 2015 Hi Mick,Yes, the difficulty of doing it like Dom and I did was that one needs to adjust the moving color at various points, especially, as you say, if the road is twisty. That method could be combined with a mask to confine the appearance only at the specific point in the route. The mask could be easily made just as the cut-out by painting the route white and making every other thing black. Then by moving the mask as the parent of the color jpg some of the difficulty of unwanted appearance of the colored jpg could be eliminated because the color couldn't show except at the position of the unveiling of the mask.Best regards,Lin Quote
denisb Posted April 3, 2015 Report Posted April 3, 2015 Hello,"Charlie" show us Route generator on Diapositif : http://www.diapositif.net/forum/viewtopic.php?f=11&t=37747And if you use ffmpeg as the BMP to avi convertor : http://www.diapositif.net/forum/viewtopic.php?p=296624#p296624 , it's a video perfect for PTE Denis Quote
wideangle Posted April 3, 2015 Report Posted April 3, 2015 Hello DenisMany many thanks for that info, and send my thanks to Charlie!I've been pottering about with adding a travel line to a map for some time now and haven't managed to achieve anything which I've found acceptable............until now!The Route Generator program is an absolutely superb solution to the problem and I have achieved the result I wanted in minutes!!!!!Regardswideangle Quote
Lin Evans Posted April 3, 2015 Report Posted April 3, 2015 I suspect that the Route Generator internally works almost exactly as Dave's original example. It most likely draws small lines between points on separate layers then combines them along with a small icon of a car, bicycle, airplane, train, etc., into a little video. It's a very useful utility.Best regards,Lin Quote
tom95521 Posted April 4, 2015 Report Posted April 4, 2015 Hi,That is really cool that there are so many ways to do moving lines on a map.Here is my crude attempt using a rectangular mask the length of the line and just following the road from San Francisco to Eureka. The map with the red line is on the bottom.Tomhttps://youtu.be/uTNaNzRLFaQ Quote
Lin Evans Posted April 6, 2015 Report Posted April 6, 2015 The Route Generator programs works well on my XP system using a relatively high resolution map and setting the codec to Cinepak by Radius. It takes the BMPtoAVI exe a long time to generate a 20 second route (several minutes) but it eventually does it well. The generated AVI is fairly large so I converted it in PTE to the default then exported the result as an MP4 after adding a PNG overlay to maintain the visibility of road text and highway numbers, etc. Just take the original map into Photoshop, overlay on a transparency then use the eraser to erase the route excepting the necessary signs, overpass, etc. This allows the route vehicle to be seen but appear to pass under rather than obliterate road signs, etc.I couldn't get the ffmpeg feature to work at all no matter how many versions of ffmpeg I tried so stayed with the default avi but not the uncompressed default which creates an absolutely huge (over a gigabyte) file for even a 20 second animation.The result link below: Use the back arrow on your browser to return here....http://www.lin-evans.org/pte8/roadtripsample2.mp4Best regards,Lin Quote
denisb Posted April 6, 2015 Report Posted April 6, 2015 Hi Lin,just for information, I used :ffmpeg-20150223-git-6c9537b-win32-static.7zffmpeg-20150223-git-6c9537b-win64-static.7zOn windows 7 and windows 8andFFmpeg version: 2014-04-20 git-f57ac37On windows 7.But I never try ffmpeg on XP.Denis Quote
Lin Evans Posted April 6, 2015 Report Posted April 6, 2015 Thanks Denis,I'll give that a try! Meanwhile here's a variation which might be interesting: http://www.lin-evans.org/pte8/roadtripsample3.mp4Use browser back button click to return here:Best regards,Lin Quote
tom95521 Posted April 7, 2015 Report Posted April 7, 2015 Hi Lin,I hope that horse doesn't get a speeding ticket. My Ram 5.7L hemi pickup has 395 hp and can't go that fast.Tom Quote
Lin Evans Posted April 7, 2015 Report Posted April 7, 2015 Hey Tom,LOL - he has incredible "off-road" capabilities as well. He was in a real hurry because he knew this was going to happen and he absolutely HATES it when Lisah catches him and makes him repeat his journey.... Lisah is hanging on for dear life on those tight turns.... HA!http://www.lin-evans.org/pte8/roadtripsample22.mp4Lin Quote
Lin Evans Posted July 14, 2015 Report Posted July 14, 2015 Another way to do this is to use the great Bezier Curve software written by one of our talented French users Michel Pouchin. It works in a somewhat similar fashion to the way Dave describes in terms of creating a route, but actually can generate literally thousands of keyframes nearly instantly and makes creating a tiny executable map code portion as simple as falling off a log!!Jean Cyprien has written an incredible user guide which I only wish I could translate into English. It's available as an EXE and I have no clue how Jean Cyprien does some of the examples he programs with PTE and Bezier Curve but it's absolutely brilliant. The basics of using Bezier Curve can be learned in five minutes but the more esoteric features are a bit harder to digest. I only really tried using this software last night but was able to create a very simple map route example in just a few minutes. I know Igor was considering adding a Bezier Curve feature to a future version of PTE.This software is something anyone interested in route generation might want to look into I think. It doesn't leave a "trace" color along the way, but allows moving a PNG object smoothly along virtually any track and curve. I was amazed at how quickly it's possible to accomplish this. Of course the program has many, many more uses and some very interesting complexities I've yet to fully understand, but I think users interested in moving an object in complex ways should definitely look into the myriad possibilities.Best regards,Lin Quote
JEB Posted August 25, 2015 Report Posted August 25, 2015 HI,i came across this thread today as I have a need for generating a route in a sequence I am working on and wanted to be reminded of the process.I have to endorse what has been said above about Route Generator. SUPERB ! In my opinion this is the only way for me and it is FREE !Only downside is you need to convert the file to MP4 - I used Camtasia but no doubt there will be other, perhaps even free products available.I have still to explore further into this product. All I want on this occasion is a developing line but presumably a moving dot will be possible.Well worth a look.CheersJohn Quote
Lin Evans Posted August 25, 2015 Report Posted August 25, 2015 Hi John,If you use a codec to make the AVI compressed rather than uncompressed, you can just place the AVI in PTE and if you wish, output it as an MP4. That avoids having to use a third software.Best regards,Lin Quote
goddi Posted January 22, 2017 Report Posted January 22, 2017 Greetings, I have recently been using Route Generator and have been successful. But, all of a sudden, it is not generating the map. I have tried a couple of different codecs, Cinepak and Windows Media 7, but they now don't work. I have sent emails to the Route Generator people but no replies. Can you tell me what might be going wrong? I have looked in the ffmpeg.log file but nothing that I can see. The last line shows this: "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [AVIOContext @ 05b41240] Statistics: 0 seeks, 0 writeouts". Any ideas??? Gary  Quote
goddi Posted January 22, 2017 Report Posted January 22, 2017 Greetings, Well, I just solved the problem. All I did was to re-select the Route Generator's ffmpeg.exe file in Preferences and it started to work again. Not sure what started the problem because I don't think I tinkered with any of the original settings. So all is well. Gary Quote
MUR Posted January 29, 2017 Report Posted January 29, 2017 Hi I want to find the Jean-Cyprien method to make a Bezier curve, but I found only examples MUR  Quote
Lin Evans Posted January 29, 2017 Report Posted January 29, 2017 Manuel, Go to the French site and register and get a password. Do a search for Bezier curve and you can download the program written by one of our French users which allows you to do that. Link to site below: http://www.diapositif.net/forum/index.php Best regards, Lin Quote
denisb Posted January 29, 2017 Report Posted January 29, 2017 Hi, http://www.diapositif.net/forum/viewtopic.php?f=56&t=35945 to get BezierPTE Denis Quote
MUR Posted January 29, 2017 Report Posted January 29, 2017 Thanks to Lin and Denis I have the program but how can I add the Bezier curve into a PTE project? MUR  Quote
denisb Posted January 30, 2017 Report Posted January 30, 2017 Hi Mur, Look at the tutorial from Jean-Cyprien http://diapositif.net/forum/viewtopic.php?f=35&t=36573 Denis Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.