Jump to content
Sign in to follow this  
rhumbaflappy

VTP and custom texture and autogen

Recommended Posts

Guest

Hello !I'm building my first scenery (Lake Salagou in south of France). I am using LWM polygons and VTP polygons. All is fin with water, shoreline, lake... (thanks to rhumbaflappy and all other great conceptors). But... This is my problem :I want to redefine village in my scenery. The default city lanclasses are not well for me because little village of south France are frequently in circular dense shape. I decided to built a personal texture with adapted autogen. But when I use VTP polys method 1 or 2 with this texture, (which is in local texture subfolder of my scenery) i see the texture but not the autogen. (I tried, in an other hand, to use photoreal lod13 tile : my texture appears correct and my autogen appears correctly.). I decided to test with a landclass number (smaller than 140) : it doesn't appear, nor the autogen. Only numbered textures of terraintexture.cfg seems to work correctly (display + autogen).Is it a known problem with VTP poly and autogen (The SDK didn't say anything...)

Share this post


Link to post
Share on other sites

Hi Greywander2002.Texture numbers from the 'terraintexture.cfg' work with autogen. Also, default textures do work with autogen, if their landclass numbers are used:include TDFMacros.incinclude TDFHeaders.inc; N23* 14.72' E24* 59.71'; Autogen testBGLHeader 25, 20, 26, 22, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPDataStart label worddatamark_0 label word VTPDataArea 1, 1, 10, 28 VTPLayer 4, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 6630, 11220 VTPPointXY2 6885, 11220 VTPPointXY2 6885, 11475 VTPPointXY2 6630, 11475datamark_1 label wordCell_437_189 EQU VTPCellID 0, 437, 189VTPIndexStart Label word VTPIndexHeader 1, VTPIndexData, VTPDataStartVTPIndexData label word VTPIndexEntry Cell_437_189, VTPDataStart, datamark_0, datamark_1TextureStart label word VTPTextureListHeader 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "120" VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label wordVTPEnd label wordThis will place a texture with the landclass #120... it's actual name is '048b2su1.bmp' ( and the whole series and seasons associated with that name ).If you use:TextureDataStart label word texturemark_0 label word VTPTextureName "048b2wi1.bmp;048b2hw1.bmp;048b2sp1.bmp;048b2su1.bmp;048b2fa1.bmp;048b2lm1.bmp;" VTPTextureType 1, 0, 0,4 texturemark_1 label wordTextureDataEnd label wordThe texture will display, with seasons, but there is no autogen.As you've already discovered, placing CUSTOM textures with landclass is the best solution. That's why I made LandCalc, so that designers could derive the tile names, and then make a landclass BGL, with seasonal LC value #252 to 'hold' the place for the CUSTOM textures ( with seasons... 253 if no seasons ). Then the landclass BGL can display the texture and the autogen. You'll probably want to make your CUSTOM textures using the default landclass surrounding the city, then pasting the city shape onto them... that will allow the area surrounding the city to blend into the surrounding landclass. 'tlassiter' and 'bob5568' have done some work with "blending" CUSTOM textures into the default landclass...search here and in the Terrabuilder forum over the last year.John Cillis' LandClass assistant will help you make the Landclass BGL, if you'd like. Make an entire LOD5 grid as value #254 ( transparent ). Then place your CUSTOM as value #252. You may need to experiment with the placement a bit... maybe not. If you run LandCalc2 ( with FSUIPC installed in the Module folder ), it can give you the landclass coordinates you need to place the city's tiles. The yellow highlighted CUSTOM number lies under the slew's crosshairs.Something I have not tried is to use:TextureDataStart label word texturemark_0 label word VTPTextureName "252" VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label wordTheoretically, that would use landclass #252... which is the CUSTOM with seasons Landclass number. If the correct texture with CUSTOM name was in the texture folder, along with it's autogen, would it show? I don't know, yet. :)Dick

Share this post


Link to post
Share on other sites

Hi Greywander2002.It appears that using a landclass number in the VTP bgl, or using a CUSTOM bgl is the solution.How unfortunate we cannot force a custom autogen with a VTP... or overwrite a CUSTOM placed texture with VTPs, to allow the easy blending of edges.So we can have one or the other... either VTP or CUSTOM. CUSTOM allows the use of autogen, but excludes all TDF polys and lines under the texture. Roads, streams, blending, must all be "stamped" onto the CUSTOM texture with a paint program.VTPs allow autogen, but only when using landclass numbers or the numbers from "terraintexture.cfg".There doesn't seem to be any work-arounds.Dick

Share this post


Link to post
Share on other sites
Guest

Thanks for your response, confirming me there is no hope...I will try to explore the subject... Nb : The principal software i'm using is Microdem. With it, i can georeference maps (1/25000) previously scanned. Then I use the "draw DFX tool", creating lines (or polygons) and saving them as DFX files. I use then Excel to open this file (where each point is define wit long/lat coords) and , with visual basic subroutine, convert it and create text file ready to compile with bglc.exe.That's my method .

Share this post


Link to post
Share on other sites
Guest

Hello again !I'm playing with VTPm2 and my code is include TDFMacros.inc include TDFheaders.inc ; Secteur 43.637285, 43.63336, 3.356561, 3.366565 (NSWE)BGLHeader 44, 2, 42, 4, TerrainHeaderStart, VTPHeaderVTPHeader label wordVTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word; Cell_391_131 Area Datadatamark_1 label word VTPDataArea 1, 1, 0, 0 VTPLayer 4, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 5391, 11180 VTPPointXY2 5391, 11380 VTPPointXY2 5565, 11380 VTPPointXY2 5565, 11180datamark_2 label wordCell_391_131 EQU VTPCellID 0, 391, 131VTPIndexStart label wordVTPIndexHeader 1, VTPIndexData, VTPStartVTPIndexData label wordVTPIndexEntry Cell_391_131, VTPStart, datamark_1, datamark_2TextureStart label wordVTPTextureListHeader 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label wordVTPTextureListEntry TextureDataStart, texturemark_1, texturemark_2TextureDataStart label wordtexturemark_1 label wordVTPTextureName "120"VTPTextureType 1, 0, 0, 4texturemark_2 label wordTextureDataEnd label wordVTPEnd label wordUnfortunaly, i see the texture "120" but not its autogen.(The problem is the same when i use VTPm1 for this LOD13.)I don't see any errors in my code. Has someone an idea ?Do you understand

Share this post


Link to post
Share on other sites

Hi Greywander2002.You're code had a mistake in the Header Bounds. It needs to be NSEW.include TDFMacros.incinclude TDFheaders.inc; Secteur 43.637285, 43.63336, 3.356561, 3.366565 (NSWE); N43* 38.0016' E3* 21.9939'; BGLHeader 44, 2, 42, 4, TerrainHeaderStart, VTPHeaderBGLHeader 44, 42, 4, 2, TerrainHeaderStart, VTPHeaderVTPHeader label wordVTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word; Cell_391_131 Area Datadatamark_1 label wordVTPDataArea 1, 1, 0, 0VTPLayer 4, 0VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 1, 0VTPPolyMethod2 4, 0, 0VTPPointXY2 5391, 11180VTPPointXY2 5391, 11380VTPPointXY2 5565, 11380VTPPointXY2 5565, 11180datamark_2 label wordCell_391_131 EQU VTPCellID 0, 391, 131VTPIndexStart label wordVTPIndexHeader 1, VTPIndexData, VTPStartVTPIndexData label wordVTPIndexEntry Cell_391_131, VTPStart, datamark_1, datamark_2TextureStart label wordVTPTextureListHeader 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label wordVTPTextureListEntry TextureDataStart, texturemark_1, texturemark_2TextureDataStart label wordtexturemark_1 label wordVTPTextureName "120"VTPTextureType 1, 0, 0, 4texturemark_2 label wordTextureDataEnd label wordVTPEnd label wordWith this, I get autogen.Dick

Share this post


Link to post
Share on other sites
Guest

Well, thank you very much, Dick. I'm very ashamed and painful ! I have read and reread and rereread the SDK and didn't see my errors. But the most astonishing is my scenery is composed with several bgl (one for each layer : shoreline, little roads, major roads, LWM for lake), all containing my mistake, and all were displayed correctly. Only VTP autogen seemed affected...Now, back to the saddle again !

Share this post


Link to post
Share on other sites

Hi Greywander2002.The only reason I spotted the error is because I make the same types of errors myself. :)If I have a problem with any of the newer TDF scenery, I usually recheck my header bounds first.I've noticed a problem with designing and autogen. Sometimes, when activating and deactivating scenery due to changes, I've noticed the autogen will sometimes not update with the scenery! This is fixed by going to a different airport in another part of the world, then returning to the design site. I've also noticed that objects that are changed or removed, are sometimes still present when re-activating the scenery... sometimes forcing me to restart the sim to get rid of them!I routinely delete the 'Scenery.dat' file of my design whenever I change something in a design, and return to the sim ( the sim rebuilds the file ), but this has little effect on the autogen or objects.So with autogen not showing up... you may need to go to the other side of the world and return... or restart the sim, to be sure the autogen is displayed properly. This only affects the design process.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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...