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

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

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!

Donation Goals

AVSIM's 2018 Fundraising Goal

Donate to our annual general fund. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.