Sign in to follow this  
Guest gorchi

VTP Point limit

Recommended Posts

Hi!I am now in big process of making roads in my country and since I have now roads which have together (in one piece) even over 500 points I am now even more curious about how many points can one have in one VTP line? I see that maximum width is 255 and in one line You can have more than one VTPWidePointWidth which is especially usefull when placing rivers.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


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

Hi Goran.The SDK states 158 points for a line, using the VTPPolyMethod2Ex form.Christian Stock has found a deviation from the SDK concerning the number of polys in VTPPolyCount... that makes me suspicious of the restriction of 158 ( 31 + 127 ) points allowed in a line or poly.Unless you hear otherwise from Christian, with the current set of macros, and the SDK info, the max is 158.So, you'll need to split the lines up.Dick

Share this post


Link to post
Share on other sites

Hi Dick, I had been wondering the same as Goran (the development version of AutoAsm can now generate lines such as streams and roads as well as water polygons). I had intended to do some tests, but this got me going. It certainly looks like the limit is considerably more than 158. I made a test image in AutoAsm. Here's the result in FS: http://www.kline.demon.co.uk/test.jpg This is a single shoreline polygon about 20 miles across with just over 22,000 points! Here's part of the asm file: VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 9, 0VTPPolyCount 1, 0 VTPPolyMethod2 31, 1, 0VTPPolyMethod2Ex 22261VTPWidePoint 4226, 1, 7645, 0VTPWidePointWidth 1VTPWidePoint 4226, 1, 7636, 0VTPWidePointWidth 100VTPWidePoint 4227, 0, 7629, 0VTPWidePoint 4227, 0, 7621, 0VTPWidePoint 4227, 0, 7613, 0 etc etc etc....... I seem to remember there was a discussion as to whether a relevant variable was a byte or an integer or something similar. If an integer then the number would be much greater. When I have more time I'll try to find the limit....could it be 65,000 approx? Unfortunately AutoAsm will take about an hour to process so many points! Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Rhumba!Yes, I am aware of these limitations but until yesterday I combined together two lines produced by SCM2VTP that gave me up to 280 points, but yesterday, I was laying down some roads and rivers that span across 3 or more LOD8 quadrants and I just said, let's test the limit. So the longest river has around 520 points alltogether (in one LOD8 quadrant!!) and some roads up to 350 points (in one LOD8 quadrant). And no problem with compiling, no problem also in FS2002 so that is why I asked for these limits. I can only assume that VTP SDK was from earlier days of development...Best regards to all,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi, Dick! As they say, there are lies, damned lies - and the scenery SDK! Up to 39,000 and counting... Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Dick - and Goran, The main problem with my tests was that it took ninety minutes for each run. I found that in VB, when adding strings the time varies as the square of the string size - so if you double the string size the time is four times as long. Using a buffer string to reduce the size, I brought the time down from about ninety minutes to just two, almost fifty times faster. So now the tests would take about half an hour instead of a whole day.... A single VTP line with 65,505 points works fine. With 65,600 points it fails - BGLC even gives an error message! So most likely the limit is 65,536 points. Should be enough for most applications.... Best regards, Chris

Share this post


Link to post
Share on other sites

Thanks ChrisThat's interesting info. I created a project this morning that contained 168 VTP points without any problem and I recall once going to around 220 points as well.Thanks againKen

Share this post


Link to post
Share on other sites

Hi Chris.65535 = $FFFF for a double word in size... and that would make the most sense.By the way, any new developments with AutoASM?Dick

Share this post


Link to post
Share on other sites

>By the way, any new developments with AutoASM? >>Dick Hi, Dick! Yes, I've been beavering away since Christmas. I think the next release will be a bumper edition. Two of the new features:1. Now you can draw separate lines and define them as streams, roads etc as well as setting the width. In the next version after this I'll look at converting those single lines in TerraScene images to streams.2. A new feature that I call 'filters'. The raw line/polygon data is processed to make roads and shorelines look much more natural. As filters can use the full VTP resolution, they can compensate for relatively low input resolution, which is the usual case. The two filters in this version are 'smooth' and 'random'. Using smooth, you can give roads nice rounded bends even with low input resolution. Smooth can also be used to eliminate unnatural step and sawtooth effects in shorelines, again due to limited input resolution. Something I'd like to do in the future is to add a filter that uses a fractal method to create an even more natural look - the only drawback being that I have absolutely no idea how to program fractal methods! There's another new feature that makes the program much easier to use with screenshots, but I'll keep that a little secret for now. Hopefully the new version will be out the end of this week.... Best regards, Chris

Share this post


Link to post
Share on other sites

Hi, Ken! There are plenty of things we have to worry about in scenery design - but I guess having to split up roads isn't one of them! Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Chris.If you get a chance, try out Christian Fumey's new Ground2K program.The interface is different, and takes a bit to get used to it... but it has great potential... even has a FSUIPC interface he added on.It's a different approach, and you might get some ideas from it, as well.I haven't worked with it a lot, yet. He's implementing some VTP1 poly usage.. which is great news for CFS2 fans, as VTP2's aren't used in that sim.I had been toying with converting CFS/LWMPoly1 code from your program to VTP1 polys, as the code isn't much different. I got good results from Terrascene to LWM, with streams set at 3 pixels... looks very good as LWM polys. ( I don't like the default FS2002 streams much ).Dick

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