October 11, 200223 yr I have used this code to remove shorelines and roads.I discovered that the roads/shorelines disappeared, but in stead I got Waves :-(I'm not sure which lines generate the waves.-----include TDFMacros.incinclude TDFHeaders.inc; ReWorked CoastN35* 13.62' E24* 0.13'BGLHeader 65, 60, 8, 4, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word datamark_v0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 32, 1 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 5, 1, 0 VTPWidePoint 11342, 1, 5358, 0 VTPWidePointWidth 1 VTPWidePoint 11348, 0, 5343, 0 VTPWidePoint 11415, 0, 5254, 0 VTPWidePoint 11432, 0, 5242, 0 VTPWidePoint 11844, 0, 5133, 0; ------------------------------------------------------------ datamark_v1 label word VTPDataArea 1, 1, 0, 0 VTPLayer 4, 1 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 5, 1, 0 VTPWidePoint 11342, 1, 5358, 0 VTPWidePointWidth 1 VTPWidePoint 11348, 0, 5343, 0 VTPWidePoint 11415, 0, 5254, 0 VTPWidePoint 11432, 0, 5242, 0 VTPWidePoint 11844, 0, 5133, 0 datamark_v2 label word;-------------------------------------------------------------Cellv_396_79 EQU VTPCellID 0, 396, 79 VTPIndexStart label word VTPIndexHeader 1, VTPIndexData, VTPStart VTPIndexData label word VTPIndexEntry Cellv_396_79, VTPStart, datamark_v0, datamark_v2; ------------------------------------------------------------TextureStart label word VTPTextureListHeader 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "1045" VTPTextureType 2, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; ------------------------------------------------------------VTPEnd label word
October 12, 200223 yr Author Hi Knnygar.Are you using this file just to exclude Layers 4 and 32?If so, there are perhaps better ways. Waves are tied to the texture name assignment. In 'terraintextures.cfg', the assignment is for wavecontroller effects.[Texture.1045] // ocean / tan sand / surfType=2Size=4Textures=ShoreSU.bmpEffect=wavecontroller=================================================Just checked the SDK. To exclude the established polys in a layer, do this:VTPDataArea 1, 1, 0, 0VTPLayer 32, 1VTPNumTexturesInLayer 0, 0VTPTextureId 0, 0VTPPolyCount 1, 0VTPPolyMethod2 5, 1, 0VTPWidePoint 11342, 1, 5358, 0VTPWidePointWidth 1VTPWidePoint 11348, 0, 5343, 0VTPWidePoint 11415, 0, 5254, 0VTPWidePoint 11432, 0, 5242, 0VTPWidePoint 11844, 0, 5133, 0That replaces the default layer, and uses no texture. Dick
October 12, 200223 yr I found this file in a post here at Avsim I think.First I used it to exclude shorelines, then I didn't dwell on the waves as it was at sea.Then I tried to use the same to exclude roads/rivers, but it doesn't look so good with waves high up on land.I tried VTPNumTexturesInLayer 0, 0 but then FS stops at 33% and wont continue loading :-(I cant see any difference in the text that you gave and the one that I tried, but I think there might be something else wrong.
October 12, 200223 yr But what is the easiest way of removing the roads/rivers in several LOD8 grids?I'm trying to move the roads/rivers to their correct locations.The scenery covers an area between N61*58 N62*22, E5*50 E6*49
October 12, 200223 yr Hi Dick,Using the above examples I have put together the following code to remove all poly's in a given layer and replacing them with nothing.However, this does not compile. I think I am missing something. Any comments?;----------------------------------------------------include TDFMacros.incinclude TDFHeaders.incBGLHeader 22, 16, -60, -66, TerrainHeaderStart, VTPHeaderVTPHeader label wordVTPFileHeader 256, VTPIndexStart, VTPEndVTPStart label worddatamark_0 label wordVTPDataArea 1, 1, 0, 0VTPLayer 8, 1VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 1, 0VTPPolyMethod2 4, 0, 0VTPPoint 0, 0VTPPoint 255, 0VTPPoint 255, 255VTPPoint 0, 255datamark_1 label word;-------------------------------------------------------------Cellv_249_204 EQU VTPCellID 0, 249, 204VTPIndexStart label wordVTPIndexHeader 1, VTPIndexData, VTPStartVTPIndexData label wordVTPIndexEntry Cellv_249_204, VTPStart, datamark_0, datamark_1; ------------------------------------------------------------VTPEnd label wordRegards,Chris Wilkes
October 12, 200223 yr Author Hi Knnygar.Once again, you are at the edge of our understanding!I don't know the exclusion properties! And the SDK doesn't tell us the whole story.Here's code that will exclude all the layers. But it should have only excluded ( overwritten ) Layer 8! Note that I used the entire Cell size for the polygon, and used Landclass #254 ( transparent!), for the texture. include TDFMacros.incinclude TDFHeaders.inc; Delavan Single VTP2 exclusion 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; exclude Layer 8 VTPDataArea 1, 1, 0, 0 VTPLayer 8, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 4080, 4080 VTPPointXY2 12240, 4080 VTPPointXY2 12240, 12240 VTPPointXY2 4080, 12240datamark_1 label word; -------------------------------------------------------------Cell_194_134 EQU VTPCellID 0, 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 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "254" VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; ---------------------------------------------------------------VTPEnd label word Trying to add any more VTP code for that Cell in the BGL doesn't work right! But by adding a new BGL to the scenery folder ( I named it ZZZZDelavan.bgl to assure that it would fall after the exclusion in the datastream ), I'm able to place layer 8. include TDFMacros.incinclude TDFHeaders.inc; zzzzDelavanVTP2CellAdd.bgl; N42* 38.13' W88* 37.33'BGLHeader 44, 41, -87, -90, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word; -------------------------------------------------------------; Cell_194_134datamark_0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 8, 1 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 11525, 9765 VTPPointXY2 11655, 9765 VTPPointXY2 11655, 9871 VTPPointXY2 11525, 9871datamark_1 label word; ------------------------------------------------------------Cell_194_134 EQU VTPCellID 0, 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 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "2" VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; -----------------------------------------------------------VTPEnd label word But there is a strange occurance. Note the stream ( Layer 16 ) that was suppressed, by the 'transparent' assignment, has returned... but only for the LOD13 Area the new Layer 8 poly lies in!So we need to investigate. Perhaps the texture assignment to landclass #254 is not the right way. But the "insistance" of the LOD13 Area is one reason I like to list the LOD13 Area in the: VTPDataArea 1, 1, 29, 22... even though it's not required. At least we know where we're at when we look at the code.2 pics:The Cell deletion, and then the redrawn Layer 8 with an added BGL.
October 12, 200223 yr Author Also.You can use value #254 for the exclusion of just an small area... but it will default to the entire LOD13 Areas it touches. include TDFMacros.incinclude TDFHeaders.inc; DelavanVTP2 small delete; N42* 38.13' W88* 37.33'BGLHeader 44, 41, -87, -90, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word; -----------------------------------------------------------; Cell_194_134datamark_0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 8, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 11525, 9765 VTPPointXY2 11655, 9765 VTPPointXY2 11655, 9871 VTPPointXY2 11525, 9871datamark_1 label word; ----------------------------------------------------------Cell_194_134 EQU VTPCellID 0, 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 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "254" VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; ----------------------------------------------------------VTPEnd label word Here's a pic that shows just the LOD13 area is suppress... but note that the other layers will reappear with the Layer 8 written to again!Very strange.Dick
October 12, 200223 yr Author So now, that brings us to the right way to do it!I recalled I was able to exclude before, but was now stumped. I also wondered why Knnygar wanted to exclude separately from the rewrite of the lines.And that's the clue. We don't necessarily want to exclude code separately from the creation of it's replacement. include TDFMacros.incinclude TDFHeaders.inc; DelavanVTP2ProperDelete.txt; N42* 38.13' W88* 37.33'BGLHeader 44, 41, -87, -90, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word; -------------------------------------------------------------; Cell_194_134datamark_0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 8, 1 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 11525, 9765 VTPPointXY2 11655, 9765 VTPPointXY2 11655, 9871 VTPPointXY2 11525, 9871datamark_1 label word; ------------------------------------------------------------Cell_194_134 EQU VTPCellID 0, 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 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "2" VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; ----------------------------------------------------------VTPEnd label word This replaces the Layer 8 with my new poly ( it could be a line, too ). The Layer8 is gone from the whole LOD13 Area, even though I used just a part of it for my poly, but the other layers are fine, because they aren't waiting for the replacement! I could have used a tiny 3 sided poly, or replaced everything at that layer. I even now recall using a tiny poly from the Shorelines.bmp, and a VTP Method1 poly ( allowing me to cut a transparent alpha section of that bitmap for the tiny poly... making it invisible ). Lots of room for experiments.Weird, huh? Well, we all learned something about replacements and the strange Landclass #254. And, don't use tiny polys to exclude that are tied to effects. Even autogen might be a problem with some tiny polys.Dick
October 12, 200223 yr Author Hi Chris,I hope the above experiments help. We were posting all at the same time!Dick
October 13, 200223 yr Pheeww, its alot of work to get these files to work.I allmost had it.The hardest work I think is to get the files to work, after that its just a matter of filling in the "blanks" ;-)I managed to remove the road, but Im having some problem drawing the new one.I tried to make some points to draw new road but it just became a green polygon :-(Here are the code I used: VTPDataArea 1, 1, 0, 0 VTPLayer 32, 1 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 5, 0, 0 VTPPointXY2 11342, 5358 VTPPointXY2 11348, 5343 VTPPointXY2 11415, 5254 VTPPointXY2 11432, 5242 VTPPointXY2 11844, 5133I tried to use "VTPWidePoint 7649, 1, 10350, 0", the same as I used for shorelines but it didn't work.I tried to upload a picture but I think Avsim has server problems tonight :-(
October 13, 200223 yr Author Hi Knnygar.It will be VTPWidePoint, but the texture setup may be slightly different. For now, try the SDK and see what it says. I'll be a little tied up for a day or two. If I get some time, I'll try a small road somewhere ( never made one! ).Dick
Create an account or sign in to comment