Sign in to follow this  
Guest visualflight

Unwanted autogen and VTPWidePoint lines - a connection?...

Recommended Posts

Hello,it seems everybody, who is drawing streets with Ground2k (and other tools) for FS2k4, has sooner or later unwanted autogen in his scenery (lightpoles in the middle of a runway etc.)As Richard Ludowise, Lee and others mentioned, the finally discovered VTPChildPoint structures are used to create square ends for default FS2k4 VTP lines, mainly streets. And having a look with Jim Keirs great LWMViewer tool at these lines shows in my opinion, that these VTPChildPoint-structures not only attached at the beginning or ends of these VTP lines:The default roads mainly consist of some VTPWidePoint and as much VTPChildPoints as possible (1 + 7 or less - this combination repeated again and again).I didn't checked all the default road bgls (to be honest - just one file) and did some testing with Ground2k and some VTPChildPoint-structures, but I think the use is like this:- For line from Point A to B you need at least 4 VTP points (1 VTPWidePoint + 3 VTPChildPoint) [the smallest road I saw in bgl had 4 points]- the line is always beginning and ending with a small hook with a x,y-distance of less then 10 (have no rule for that) (If you don't have that hook, you get very strange effects with the width and the direction of your line)- If you have 2 or more VTPWidePoints in a row, you get these annoying autogen poles popping up everywhereI did some not minor testing (at N52*47.06, 13*34:36 near Berlin):a) a small ground2k project - a road consisting of 3 points - giving me a road (correct) and a line auf poles in the middle of the scenery going from nw -> se (see Bernau-test-V3.LWM):( a small bglc-scenery with 4 small road sections in the same place using the VTPChildPoint structures (I varied the size of the hooks) - got 4 roads and no straying autogen (see bernau-test-childline.asm ) -but some line width effects.Maybe you could could have a look into that for yourself and confirm or deny these ideas.(Ground2k itself is not errornous(sp?), just the common rules to define VTP line sceneries, which it implements)Regards,EdgarSample project and asm-file:http://forums.avsim.net/user_files/56740.zip

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Edgar.Christian Fumey hasn't implemented the VTPChildPoint-type lines in Ground2K4, as you have discovered. These types of lines are the norm for FS2002 and FS9. Only some shorelines of FS2002 use the format we have been using... and that is derived from the FS2002 Terrain SDK.I also found that the small hook defines the start of the lines. I haven't determined a rule for that either, but it may have to do with the direction the line will extend.I do confirm the newer style roads you made control the autogen.Dick

Share this post


Link to post
Share on other sites

HiI don't really know anything about this except that as the placement of the power poles is controlled by the data in the "terrain.cfg", would it be possible that the "ObjectSize - length to apply between objects (in meters)"is placing the last pole past the end of the road.Just a thoughtCheers Norman

Share this post


Link to post
Share on other sites

Hi all.Here is what I can figure for lines with childpoints:The allowable reference of any VTP point is between 0 and 16320 in both latitude and longitude.This then gives a span of ( LOD7 / 16320 ), each way...VTPPoint_LatSpan = ( 0.703125 / 16320 ) = 0.000043083639705882352941176470588235 degreesVTPPoint_LongSpan = ( 0.9375 / 16320 ) = 0.000057444852941176470588235294117647 degreesA line must exist totally within the LOD7-sized bounds that have the same centerpoint of the LOD8 Cell ( which is the display extent ). The rules for a line are that it must at least partially exist in the LOD8 Cell, and be entirely in the LOD7-sized bounds. If the line exists in multiple LOD8 Cells, then it just be recomputed for each Cell, to display correctly.So a list of lat-long line points must be reconfigured for every LOD8 Cell it inhabits. Then each configuration broken down into VTPPoints,then Start-Hook and End-Hook appended as VTPPoints,then the Beginning refpoint is the Start-Hook , and the whole mess divided into groups of 8 ( 1 widepoint and 7 children ),with the last group ( including the end-hook ) as equal to or less than 8. The childpoints can be derived as running offsets.. basically "moveby" commands... each child + or - from the previous point.But how we determine the hook positions, I don't know either, but they do appear to be close to a 90 degree angle from the first direction of the line, which could be computed, and average a length of about 5 VTPPoints. ( By the first direction, I mean the first post-hook point to the next point ).Dickhttp://forums.avsim.net/user_files/57053.jpg

Share this post


Link to post
Share on other sites

Hi all,just one more comment to the Childpoint xy-offsets:The offsets are signed 11-bit numbers, that means the range for the x- and y-offset is from 1023 to -1024.Therefore 2 widepoint in a row are possible (and neccessary) when their distance is bigger than 1024 units.This makes a breakup algorithm slightly more challenging :)Edgar

Share this post


Link to post
Share on other sites

Hi Edgar.I hadn't thought of that! And a maximum of 32798 total points in the line ( 31 + 32767 ) as defined in VTPPolyMehod2 and VTPPolyMethod2Ex.;)Dick

Share this post


Link to post
Share on other sites

HiI don't know if this may help in you bright boys sorting it outbut as I am doing a large area and have started putting in themain roads and stopping them where they cross over large rivers.I have found that where the road stops the autogen telephone polesalways head off in a North/Westerly direction and continue untilthey reach the red line edge of the square that the road finished in.It looks like we are missing a switch to turn off the autogen atthe end of the road. Cheers Norman

Share this post


Link to post
Share on other sites

Hello,I uploaded a converter tool in the avsim library. It processes bglc sourcefiles and converts VTPWidepoint-only lines to VTPWidePoint/VTPChildpoint combinations with added hooks.This corrects the unwanted autogen issue - no more telephone poles on the runway :)Thanks to Richard Ludowise for his support during the development!EdgarLink: http://library.avsim.net/sendfile.php?DLID=43105 (Childpoint Converter V1.0)

Share this post


Link to post
Share on other sites

Hi Edgar.Many thanks to you for the tool!This allows us to make code with Ground2K4 or CoastlineMaker or LWMViewer source, then convert the ASM files for the lines to the VTPChildPoint format. And the stray vectored autogen disappears.A hint:Make your G2K4lines with thinner beginnings and endings if possible. The comversion may be a bit better. Check your compiled VTPChildpoint code with LWMViewer, or TMFViewer.:)Dick

Share this post


Link to post
Share on other sites

Hi Edgar,Have downloaded your utility to fix numerous unwanted autogen power poles in some scenery I created recently & was very much looking forward to finally sorting this annoying problem out.Unfortunately I am having some difficulty in getting a bgl created.I have tried following your explanation in the read me file with both the drag & drop method & the ini file however no bgl files appear.One question though I see you refering to Ground2K4 (which I used) files as being .asm files. Are these the same as the LWM files? I cannot see any files in my Groud2K4 folder with the suffix of .asm.I have tried dragging the .lwm file into the chptconv.exe file which results in a new file XXXXX-CP.LWM which I expect is correct but when I drag this file into BGLC.exe I get nothing.I have the BGLC.exe file in the same folder as all the other files including your TDFHeaders & TDFMacros files.Would appreciate any help you or any of the other guys on this forum can give me as these power poles are becoming a real problem.Regards,Ross

Share this post


Link to post
Share on other sites

Hello Ross,I believe, I was a little bit short in my readme.txt description...First of all, the LWM Files is the Ground2k project file. It contains a G2k-internal presentation of your project data. It cannot be compiled directly to a bgl scenery file. Ground2k produces in its program home folder some temporary bglc source files from this projectfile. These sourcefiles are compiled with bglc.exe to the bgl files.Ross, search for the 'Ground2K$_Poly_LWM.asm' file in the folder, where you installed Ground2k (maybe it is 'c:Program FilesGround2kGround2K$_Poly_LWM.asm'). This is the mentioned bglc sourcefile (*.asm), which can be processed with the converter.The drag'n drop-method allows initially no compiling of the outputfile. In the produced chptconf.ini file you must set the 'bglcpath'-parameter to the path and filename of bglc.exe and then you switch on compiling with 'compile_bgl=1'. Now drag'n drop compiling should work.If you see the Ground2k produced bgl files, look for the file ending on *_9.bgl - this is the file to be replaced!You can set the bgl_outputfile-parameter in chptconf.ini to this path+filename: So it will automatically replace the g2k generated bgl.file.So, find the Ground2K$_Poly_LWM.asm file, set the path to bglc.exe in the ini-File and switch on compiling.Hope it helps,Edgar

Share this post


Link to post
Share on other sites

Hi Edgar,Thanks for the quick reply. Received your email this morning & found the file OK. As I have done about 15 or more separate files for this particular project (South East Queensland Coasts & Landclass) I was looking for a file relating specifically for the individual Ground2K4 lwm file & not a generic one.Once I found it I was able to process it without any problems & produce a bgl OK.As I did this this morning before heading to work I havn't had an opportunity to test the results. But I have another question as the Ground2K4 file is generic & quite small I assume it has been produced from the last file I have been working on with Ground2K4? and I will have to re process all my files in Ground2K individually before converting them with your program?Many thanks for your help.Ross

Share this post


Link to post
Share on other sites

HiWell I have tried to eliminate the telephone poles but so far havehad no successI have run the Ground2k4$_lines.asm through chptconv.exe and thenrun the new file to make a .bgl file. All OkBut when I run the scenery again the extra telephone poles are still theirIn Ground2k4 I have used the thinner ends when making the roads.and the layer lines/poly is 32 Cheers Norman

Share this post


Link to post
Share on other sites

Hi Norman.Perhaps you could attach the original ASM file, or better yet, the G2k4 LWM file, as a zip attachment to a post. Then we can see what's going on.Dick

Share this post


Link to post
Share on other sites

Hi Ross,you are correct, this g2k-asm file is temporary and is rebuild after each "Create bgl"-run of G2k - the same file is used for every project.You have to reprocess all your G2k projects individually.Edgar

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