Sign in to follow this  
rhumbaflappy

Exluding all VTP lines in a cell?

Recommended Posts

I'm reworking the coastline of an inlet in SE Alaska. I used autoAsm to do the new coastline and it works great, but I've still got the old coastline showing as well. Not only that, but I've replaced two streams that MS put there as VTP lines with actual mighty rivers. Is there a straightforward way to eliminate all VTP lines such as coasts, streams and roads within an entire LOD8 cell? Even the roads are going to need to be rerouted, so I figured it's easier to just wipe the slate clean. thanks,

Share this post


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

Hi Bill.Although you should be able to delete an entire LOD8 cell, there are other solutions.The SDK shows that you can exclude a layer when drawing a VTP in that same layer:VTPLayer 8, 1The above excludes the old layer 8 ( the "1" parameter, rather than "0" ).Of course, if you reenter that LOD13 area again, it will delete your previous lines!--------------------Or, as Christian Fumey showed:VTPDataArea 1, 0, 17, 0VTPLayer 8, 1VTPNumTexturesInLayer 0, 0VTPDataArea 1, 0, 18, 0VTPLayer 8, 1VTPNumTexturesInLayer 0, 0VTPDataArea 1, 0, 18, 1VTPLayer 8, 1VTPNumTexturesInLayer 0, 0 Where the above excludes layer 8 in three LOD13 Areas... This type of code can pinpoint the areas, and can preceed your code for actually drawing the VTP lines. ( Note: there are "0" textures in the layer... that's the exclusion ).-------------------------That still doesn't tell you how to exclude a layer in an entire cell.Look at this code:include TDFMacros.incinclude TDFHeaders.incinclude VTPLayerExcludes.inc; Delavan Single VTP2 exclusion and redraw Layer 8; N42* 38.59' W88* 37.87'BGLHeader 44, 41, -87, -90, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word; ---------------------------------------------------------------------------------------------------------; Cell_194_134datamark_0 label word VTPCellExclude 8datamark_1 label word; ---------------------------------------------------------------------------------------------------------Cell_194_134 EQU VTPCellID 1, 194, 134 VTPIndexStart label word VTPIndexHeader 1, VTPIndexData, VTPStart VTPIndexData label word VTPIndexEntry Cell_194_134, VTPStart, datamark_0, datamark_1; ---------------------------------------------------------------------------------------------------------TextureStart label word VTPTextureListHeader 0, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "1" VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; ---------------------------------------------------------------------------------------------------------VTPEnd label wordNote the line: VTPCellExclude 8That is from a new macro I created named "VTPLayerExcludes.inc"That macro has 2 commands:VTPCellExclude Layerand VTPAreaExclude Layer, U, VThis allows you to easily add the exclude of an LOD13 Area or an entire Cell to your code... the U, V parameters are the LOD13 Area numbers... for the whole Cell, no numbers are needed.I'm attaching the "VTPLayerExcludes.inc" as a text file here... just rename it as "VTPLayerExcludes.inc", & make sure it is with the other TDF includes when you compile the BGL.Place this code at the start of the data ( right after 'datamark_0' ), and it will then exclude the areas or the whole cell, leaving a clean slate for redrawing your lines or your polys.If you want more examples of using this, or more explanation, let me know. 'right-click' on the attachment, and save it to your harddrive.Dick

Share this post


Link to post
Share on other sites

Hi DickThat's an awesome addition. So this:VTPAreaExclude 32, 66, 81 ;<--this will exclude major roads in Area 66, 81Can more lines be added to exclude other layers in the same file?Thanks Ken

Share this post


Link to post
Share on other sites

Thanks for all the help, everyone. Especially you, Dick! That new include is a serious time saver. Have a tall brewski on me for that. BTW, if you haven't already found it, it looks like you have one little typo in the VTPCellExclude macro... row 19 is listed twice but no 18. I changed it up and it worked perfectly! Hats off to you, sir.thanks,

Share this post


Link to post
Share on other sites

Hi Bill.Good catch! I changed the attachment to correct the error, so all should be well now.Dick

Share this post


Link to post
Share on other sites

Hi Ken.Yes, and yes.You can exclude the layers from 0-63, one at a time...datamark_0 VTPAreaExclude 4,22,31 VTPAreaExclude 8,22,31 VTPAreaExclude 16,22,31 VTPAreaExclude 31,22,31 VTPAreaExclude 32,22,31datamark_1..should exclude all the default layers in the Area 22,31... ( the Areas in a Cell are from 0,0 to 31,31... so 66,81 isn't possible ).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