Jump to content
Sign in to follow this  
Guest gorchi

Create VTP Roads manually...

Recommended Posts

Guest

Hi guys!I've read the Terrain SDK yesterday and took a look at that great LWM program by WeBad. I checked the VTP output code of a "4 point road" and there were 6 points in the code...why is this?And the road didn't appear properly...it became distorted at its ends, getting smaller to the beginning point and also at the ending point. I tried some manual tweaking, failed...the ends got wider ;)(triangle shape)So then, can someone give me pointers how to make correct FS2K2 roads with BGLC (maybe a correct working example, source code).I want to rework an area for test purposes by adding new roads, highways, railway tracks and rivers. Anyone succeeded in this?Kindest regards from Switzerland!Jeff

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Jeff!Take a look at excellent program named SCM2VTP by Falko. it is available from Avsim library. It is easy to use although it makes some unnecessary points which can be a little bit problematic sometimes. It's purpuse is to convert roads plotted in FSSC or Airport and then export them to ASM code for BGLC. Anyway, tappering at the end or at the beggining is quite normal, and can be very hard to remove. Usually You make two roads, where the start of the second road is before first road ends. But You can reduce taper with positionionig last two points allmost together.First point is written 3 times normally. That is because BGLC must know where to start and because line begins with width 0 so it must be widened. So You have on the beggining something like this:

VTPWidePoint 8600, 1, 4080VTPWidePointWidth 1VTPWidePoint 8600, 1, 4080VTPWidePointWidth 25VTPWidePoint 8600, 0, 4080VTPWidePoint 8601, 0, 4081

You'll probably notice also that in upper lect corner of quadrant 0,0 the staring point is arround (x) 8600 and (y) 4080. Why is that so, we should ask RhumbaFlappy but my guess is due to avoiding tapper when crossing two LOD 8 quadrants.At the end of road You will find code like this:

VTPWidePoint 10200, 0, 11240VTPWidePoint 10200, 1, 11241VTPWidePointWidth 1

I found out that if You put last two lines to the same point, there is allmost no tapper.Also I advise You to check into post for last 3 months regarding this subject. You will find also many usefull things, amongst them for example excluding default roads and rivers.And just one more thing. Roads are usually on layer 31 (minor roads) and 32 (major roads). For more help on this subject ask Rhumbaflappy or Christian, they are "masters of VTP"Hope this helps You. Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest

Hi Goran!Ahh, I see. You gotta "join" first some points to avoid this tappering. Thank you, I will try it out this evening.Yeah, I noticed the strange data range for VTP points.In the SDK it reads that its as you said for better joining of Lines, Polys between different LOD8 Cells.I hope there will be a nice GUI program for those matters. Editing every LOD8 cell is a hell of a work ;)I'm beginning with Delphi right now, perhaps I'll give it a try once in a time...but I think it's too hard for me in the moment, so I keep it in mind.GreetsJeffp.s. are you going to rework your area (Slovenia) as I want to rework Switzerland? We could really help each other then with new stuff in the VTP secrets, would be great for us and the community!

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Jeff!For now there is no nice GUI program available and I am thinking if maybe I could write a program in Delphi (where will I find time?) to to correct those strange roads and rivers in Slovenia. And Yes, I am revorking Slovenia's roads and I use FSSC and SCM2VTP. But You are right, it is very tedious work and especially boring since SCM2VTP does not include my road names as comments, so it is kinda try and correct work. But it is going somehow :)If You need some help in Delphi, feel free to ask me. But I have very little experience in graphic programming in Delphi.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest

Hi JeffYou can't really expect at these early stages of the new BGLC graphic language and being new having to learn the required knowledge as well to output perfect results on your first try. As you continue to experiment with LWMDraw or SCM2VTP or AutoASM you'll learn and become familiar with the source files and the format that each requires.You will notice in the data point format of VTP roads/lines/shorelines the first 5 lines in the source file look like this:VTPWidePoint 5501, 1, 6442, 0VTPWidePointWidth 1VTPWidePoint 5501, 1, 6442, 0VTPWidePointWidth 30VTPWidePoint 5501, 0, 6442, 0Take note that the three longer lines represent the same data point. In LWMDraw this happens upon clicking the mouse the first time and All VTP roads/lines/shorelines are required to start with this format. This should show you that BGLC always starts roads and lines with a width value of 1 and the first data point click becomes 3 data points adding the two duplicate data point lines. This is the reason your 4 point road became 6 points (it's the required format).In my own experiments I've learned to start and end the road/line/shoreline by clicking the first two and last two data points as close together as I can. Doing that helps to resolve the tappering line issue for me when I'm wanting to actually see the ends of the road/line however if I'm completing a circle or shape such as a lake shoreline where I don't want to see the ends, I can simply hide the tappering effect by overlapping the start of the line with the end of the line one or two close clicked data points.In any case it does take some testing and experimenting at first to get the desired results your looking for and as you work with and learn VTP Lines you'll become much better at your own technique and you'll become more familiar with the BGLC graphic language as well.I hope this helps!!Ken

Share this post


Link to post
Share on other sites
Guest

Hi Ken,Thanks a bunch for your inputs!It clarified some things I didn't understand.So, starting and ending points need a nearby point to avoid tappering...got it! The rest of the road shows up properly.If this is the way, wouldn't it be possible to include some kind of macro for this in that .inc file? eg. VTPWidePointStart/VTPWidePointEnd for those 2 special kind of points which automatically adds the other duplicated points. Makes the code easier...just my 2 cents :)GreetsJeff

Share this post


Link to post
Share on other sites
Guest

Umm, I like that idea allot. It would certainly save some effort as well. I'll have to leave the macro.inc idea to Richard however because I don't yet know the first thing about macros in general.ThanksKen

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Ken,One quick question if I may? I would like to know the point in quadrant 0,0 in upper left corner (otherwise in bitmap 0,0) and the maximum x and y in quadrant 31,31. I would like to know that because it is possible to draw further to another LOD8 quadrant so the line croses border between two LOD8 quadrants as smooth as possible.Thanks and best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest

Hello GoranI inquired about that same issue some time ago to Richard and he seemed to believe that the value 12239 was the correct value for the eastern and southern sides of Areas 31, 31 in any given Cell although he also stated that 12240 might also be correct. After that I got to reading the terrain SDK which stated 12240 so I made that change in LWMDraw as well.If you have beta 3, type -90 degrees latitude and 180 degrees longitude and the Cell and Area will show as:Cell 797, 511Area 31, 31Then move your cursor to the right and bottom edge of the picture box area within the Draw Data Points Tab and you'll notice these values.I hope I understood you question correctly and this helpsKen

Share this post


Link to post
Share on other sites
Guest gorchi

Ken,thank You for Your answers. So maximum X and Y value (in bottom right corner of quadrant 31,31) should be around 12240, 8800, and in top left corner of quadran 0,0 should be around 4080, 4080. Thanks and best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest

For me, when I think of a Cell I think only of the Cell and it's data point structure. The top left corner, North West, of all Cell's starts at a x4080, y4080 value and the bottom right corner, South East, ends at x12240, y12240 value and all Cell's are structured the same. What goes along with that sturcture is both VTP types, Lines and Polys.Now I separately switch my thinking to Areas because they are directly related to LWM mask polys. The top left corner in all Areas is x0, y0 while the bottom right is x255, y255 and all Areas are the same sturcture as well.Now I'll put them together:The top left corner for any particular Cell is Area 0, 0 and to define that top left corner data point I still come to two different structured formats. LWM = x0, y0 is the same for VTP = x12240, y12240.I hope I didn't screw that up and it's helpful.Ken

Share this post


Link to post
Share on other sites
Guest

Damm, I did screw it up:The bottom paragraph and last line shourld read:LWM = x0, y0 is the same data point for VTP = x4080, y4080.Anyway, now I hope it's more clear. Because your thinking of VTP roads and all VTP's are directly related to Cell data point structure with the Cell NW corner = 4080, 4080 and the SE corner = 12240, 12240 you might want to keep it mind. Looking within the VTPSource file you will note that there is no reference to Area boundary's (other than comment lines having a ; at the start of the line which don't have an effect on BGLC or FS.I think I got it right now.Ken

Share this post


Link to post
Share on other sites
Guest gorchi

Ken,It's okay ;). That's what I need. I am drawing lines on area with width of 80km and height approx 45km and need this data because they cross 4 LOD8 cells and I must add let say 30pix overhead. I asked just because I needed to see to where line will show up, and where it will not. Thank You a lot!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...