Sign in to follow this  
rhumbaflappy

Waves (or not) on VTP lines

Recommended Posts

Hi all,I have been experimenting with various VTP line segments, and while I can get line sgements to appear as roads/shoreline/rivers etc, I am unable to get consistent appearnace of waves.Sometimes using texture "1029" I get waves, sometimes not, and similarly with other shoreline textures. If I reference the textures in a different order from the main body of the VTP code, or if I list them in a different order at the end of the VTP code, I seem to get different appearance - I can even put in two VTP segments which reference the same texture, but one appears with waves and one without!!Can anyone tell me what's going on, and how to accurately determine the appearance (or not) of the waves?Thanks for any clues!Cheers,Iain.

Share this post


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

Hi Iain.Could you attach the code as a TXT file to a post?It is possible you may have found a bug in the terrain engine. It is also possible, that like autogen, you must go to a different area of the planet, then return, for it to display properly.Or there may be something else going on with the code.Dickp.s. Check your e-mail :)

Share this post


Link to post
Share on other sites

Iain, I haven't looked into it in any detail but, having generated lots of VTP scenery with AutoAsm, I see exactly the same problem. As Dick says, it does suggest a bug in FS2002. I have get a slight suspicion that waves are more likely to appear if the VTP line has a smaller number of points, but I couldn't swear to it! Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Chris!I have made two veeeery long shorelines, each consisting of allmost 250 points and I do have wawes crushing to the coast and sometimes even when I do not need it. I used 1025 for shoreline. But since I have this shoreline near the sea, maybe Iain should also do some watermask for that area? Maybe will that solve the mystery?Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi all.I e-mailed Iain about this problem, and I hope it helped.There is something that has come up, that I had actually forgotten.When Christian Stock and I were experimenting with VTPs, long before the SDK was available ( and before we knew their names ), I stumbled onto how to create shorelines. And one thing I had discovered:In order to have waves, you must have land.The entire world is covered by landclass... but most of the world has a landclass value of 100... which is water. That value ( 100 ) prevents the vertex blending of landclass ( like photoreal groundtiles ), and it also suppresses waves.So, if you want waves, you need to see if the coast has land extending to at least part of the line... otherwise no waves.This is the first time this has come up, since Christian and I were struggling with shoreline code, those few months ago.I can't remember what else I've forgotten. *:-* Dick

Share this post


Link to post
Share on other sites

Yes, thanks for that, Dick - I've proved you were correct by putting several different textures where I knew there was underlying land, and I got the waves on the segments OK! It was just my test data (or its position) that was preventing the waves from appearing.In reality, these segments will be getting placed on coastlines, so presumably there will be underlying land-type landclass there anyway, so it should be fine - only problem will be if a coastline is being laid down too far away from existing land, in which case you'll just get the shore with no waves.Another one sorted out ...Cheers,Iain.

Share this post


Link to post
Share on other sites

Iain (and Dick and Goran), I did a few tests and found something that does suggest a bug. However, I found no problems linked to the number of points in the line. I used a fairly complex layout of water covering about half a LOD8 square with underlying land, using 1050. Generally waves appeared, but not always. If I slewed to a different location, sometimes waves appeared immediately - or after a few minutes - or never! I found one specific location where waves never appeared. I then found something very surprising, using the look-down map view. Very often, when waves were clearly shown in the map view, they did not appear in the normal pilot view! I then tried changing my view angle, using the nose up - nose down slew mode commands (this pitches the plane up and down). In many cases the waves were not visible in normal view, but after pitching down 30 or 40 degrees the waves magically appeared! The cut-off point was very precise - changing the pitch by just a few degrees caused the waves to appear. I think this effect may go some way in explaining why waves can sometimes be inconsistent. Using default scenery I never saw this problem, so it may be appearing with my scenery because it is more complex - or could these VTP lines be different in some subtle way to the default lines? This visibility problem is almost certainly a bug. But in a way it's more realistic. Sometimes I see waves at a specific place and sometimes not - just as in real life! Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Chris.I don't know why the view angle would cause a difference between the default VTP shorelines and the VTP lines we make.BUT...There are differences between our lines and the default lines!You can load and view default VTP lines into TMFViewer just fine, but our lines usually don't display properly, and sometimes even crash the viewer!If you look at the code of the default shorelines and roads, they are sometimes using some 'reserved' flags, the SDK mentions. Apparently reserved so we cannot use them. :(The code after the reserved flags deviates from the SDK info, and, therefore is a mystery. Roadlines are usually different, and it has to do mostly with the start and end of the lines... they have code which will square the ends of the lines, neatly.I'm assuming here the SDK was a very early issue of info from the design team. The final VTP usage became different in the sim. Rather than include the changes in the SDK ( meaning extra time for a rewrite ) the SDK writers just gave us what they had lying around the office. I don't think the SDK writers ever programmed in BGLC at all... barely knew what they were talking about... there were some really elemental mistakes ( some of which were carried over from CFS2! ).There's not going to be another SDK for FS2002, and who knows how long we'll wait for info about TMF/TDF in FS2004 ( if it is similar at all ). So, unless someone wants to go through the torture of hexedit experiments, like Christian Stock has done so often for us, this will remain a mystery. I don't think I'll go there again.Dick

Share this post


Link to post
Share on other sites

Hey guys, I know I've been real quiet on this forum, but I've been working on the inner secrets of the VTP reserved flags. Dick your correct about having to play with the bits! If I come across any real revalations (I haven't yet), I'll post my findings. Now going back into quiet obscurity...Lee.

Share this post


Link to post
Share on other sites

Hi Lee. Nice to hear from you. I was hoping you hadn't lost interest in the TDF lines and polys. :)I don't know if Christian Stock has cracked those default VTP lines or not, but I know they are different than the SDK.Dick

Share this post


Link to post
Share on other sites

Same here, the mysterious reserved flags really drive me nuts!!!They are the sole reason I never cracked the line code by myself.What I have figured out so far is that M$ always seem to use them and they stuff the order of things up completely. I can always read the first entry and then there are the 3 reserved flags. The next entry then is already out of order! I can't read it anymore, eg the SDK rules don't apply. This really means that the 3 bits have a control on what follows. My suspicion is that part of the next entry is actually in the 3 reserved bits. I wondered if M$ has just packed the entries tighly together, so basically just get rid of the 3 reserved bits and put new data there, but as far as I remember I couldn't confirm that (but it's been a while so my memory could be wrong).On a side note, I also had this strange problem that I made my own VTP polygons and in the TMFViewer they get displayed in a wrong location, but are fine in FS2002?!? I'll still trying to figure that out, because the code looks 100% identical to M$ code to me...Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Christian.I get exactly the same reaction with TMFViewer. Sometimes the polys or lines show, but always offset to a greatly different location... sometimes crashing TMFViewer.I dread the thought of returning to a hexeditor, and back to substituting values to get results, but we may end up there again. *:-* I have noted the reserved bits seem to mark the first point, and the last point... and TMFViewer does show a similar point pattern ( and color ) to the start and end points of the lines. The default roadline ends are "squared" pretty well in the sim.. so I imagine that's the purpose of the code.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