Sign in to follow this  
arno

Help! VTP land class #252 problem

Recommended Posts

Hi!I have few problems with the VTP ground textures. They are custom landclass 252 textures drawn in a small area, one texture per LOD13. The same area was previously covered with "Photo-scenery" created with Resample and it worked. After I drew the VTP polygons it is bumpy! The textures show up, flipped and mipped, transparent with autogen, that is no problem (almost, read more). Just bumpy.The second problem .... the ground textures show up perfectly aligned when the "Terrain texture size" setting in FS is HIGH. When set to medium the textures shift a little bit, but in this case too much. See the picture.And the third....there are only ***Su.bmp and ***Hw.bmp textures, is that the reason they disappear at night? Should I create a transparent night textures as well? I just noticed :-( ....they actually show up only during winter and summer. Is there a way with land class 252 (when the textures are in the SCENEDBTEXTURE folder) to use Hw textures for winter and Su for all the rest? I want to keep the autogen.... Here is part of the code, but it is almost directly from LWMDraw4 and from this forum. Like I said the bgl "works" but with these small faults. Mostly I have found answers just searching this forum but I didn't find an answer to this one. I really hope that you can help me with this...Thank you,Tatu datamark_v0 label word VTPDataArea 1, 1, 5, 24 VTPLayer 4, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 4, 0 VTPPolyCount 1, 0;LOD 13 05_24 VTPPolyMethod2 04, 0, 0VTPPointXY2 5355 + 0 , 10200 + 0 VTPPointXY2 5355 + 255 , 10200 + 0 VTPPointXY2 5355 + 255 , 10200 + 255 VTPPointXY2 5355 + 0 , 10200 + 255 VTPDataArea 1, 1, 6, 24 VTPLayer 4, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 4, 0 VTPPolyCount 1, 0;LOD 13 06_24 VTPPolyMethod2 04, 0, 0VTPPointXY2 5610+ 0 , 10200 + 0 VTPPointXY2 5610 + 255 , 10200 + 0 VTPPointXY2 5610 + 255 , 10200 + 255 VTPPointXY2 5610 + 0 , 10200 + 255 ...datamark_v1 label word Cellv_447_77 EQU VTPCellID 0, 447, 77VTPIndexStart label word VTPIndexHeader 1, VTPIndexData, VTPStartVTPIndexData label word VTPIndexEntry Cellv_447_77, VTPStart, datamark_v0, datamark_v1TextureStart label word VTPTextureListHeader 5, TextureIndexStart, TextureDataStart, TextureDataEnd;TextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1 VTPTextureListEntry TextureDataStart, texturemark_1, texturemark_2 VTPTextureListEntry TextureDataStart, texturemark_2, texturemark_3 VTPTextureListEntry TextureDataStart, texturemark_3, texturemark_4 VTPTextureListEntry TextureDataStart, texturemark_4, texturemark_5;TextureDataStart label wordtexturemark_0 label word VTPTextureName "252" VTPTextureType 1, 0, 0, 4texturemark_1 label word VTPTextureName "252" VTPTextureType 1, 0, 0, 4texturemark_2 label word VTPTextureName "252" VTPTextureType 1, 0, 0, 4texturemark_3 label word VTPTextureName "252" VTPTextureType 1, 0, 0, 4texturemark_4 label word VTPTextureName "252" VTPTextureType 1, 0, 0, 4texturemark_5 label wordTextureDataEnd label word;----> End Texture Information <----;;----> The next line below ENDS this file <----VTPEnd label word

Share this post


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

To make it more precise:When I still was using my old ground made with FS Terrain Calc and Resample, there was no problem with the ground textures alignment in medium texture resolution mode (look at the pic Tatu included). So that bug is completely new, and one can wonder why it does that now, and not when I had those made with resample?Then Tatu: I do not think that the seasonal problem is any issue, because it works like that if one uses terrain textures made by Resample as well. One need to have textures for all seasons. Then what you said about the night: that is more of an issue, as I've never experienced it before with the old ground.

Share this post


Link to post
Share on other sites

>I have few problems with the VTP ground textures. They are >custom landclass 252 textures drawn in a small area, one >texture per LOD13. The same area was previously covered with >"Photo-scenery" created with Resample and it worked. After I >drew the VTP polygons it is bumpy! The textures show up, >flipped and mipped, transparent with autogen, that is no >problem (almost, read more). Just bumpy. I don't know which program you used to create the taxiways? Maybe that program has a option to prevent them from being bumpy. It is normal that the 252 texture you placed is bumpy, those kind of textures are always that way.>The second problem .... the ground textures show up >perfectly aligned when the "Terrain texture size" setting in >FS is HIGH. When set to medium the textures shift a little >bit, but in this case too much. See the picture. Maybe you could try to create the mips of the texture again? It is probably that one of the mips is not that accurately calculated.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi Tatu.The terrain under a VTP poly is going to be bumpy, just like the default ground terrain. Basically, a VTP poly just changes the landclass.If you want smoothing, you'll need to add a non-VTP poly and add smoothing... MS uses LWM flattens under runways... I don't know if that smooths anything. SCASM has commands for area sensing and smoothing, so maybe there's a solution... and could be tacked onto your runway code. Arno knows much more about smoothing than I do.If you use "252", then you'll need a full set of CUSTOM textures, including night. That means each CUSTOM name needs 6 textures. You'll have to make copies of the *SU.bmp, and rename the copies as *SP.bmp, *FA.bmp, *WI.bmp ( you already have *HW.bmp ). And you'll need to make an *LM.bmp for the night texture... just extract the first mip with imagetool and save as a bmp... then use a paint program to darken and add highlights for the lights, then reimport to imagtool to format and mip....In other words, if you want all the CUSTOM seasons and night to show, you need the entire properly named texture set.Hopefully, you're using Layer4 for the polys, so they sit under the roads and shores and can be watermasked by the LWM polys.I don't know why the polys would shift by changing the 'Terrain texture size'. It could be a problem with the mipping ( did you use MS' imagetool to make the mips? ). Other than that, it could be a feature of the sim that we must live with. I've never noticed it before.As an experiment, make a backup of the original ASM file. Then change all the instances of 255 to 254, compile, and see how the alignment is with that... Then try 257, and see how that looks. This will slightly alter the size of each square VTP poly, and may compensate for different levels of 'Terrain texture size', which is obviously stretching or shrinking the textures.Dick

Share this post


Link to post
Share on other sites

Answers to what Rhumba and Arno asked:I made the taxiway/apron polygons as usually in Airport, the asphalt smoothing option is ON. Before this new ground Tatu converted from the old one I had (which I had made with FSTC and Resample), the polygon's smoothing DID work. So the question is, how is this new ground interfering with the polygon's smoothing parameter? The polygons are on layers 9-12.Then, the mip maps are made in ImageTool. During this change project the mips have been done over again, so they are "new and shiny". So it is quite weird why they do not work like they did in the old version where the same ground was made with Resample.

Share this post


Link to post
Share on other sites

Another thing about the aligment:The bitmaps DO align well on other spots where they meet, it just seems like the part in the middle in a few of the bitmaps do not align. It is easy to see this with your own eyes, as there is a mud square painted under the runway onto the the ground textures. And in this new version one can see how the mud painted in the background bitmap actually is a bit to the side of the runway/taxiway in SOME places. And as I've said, in HIGH ground resolution they are ok everywhere. Even 95% of the ground textures work well even in MEDIUM reso, so why just these areas are acting strangely in MEDIUM reso, I have no idea./Sebastian

Share this post


Link to post
Share on other sites

>I made the taxiway/apron polygons as usually in Airport, the >asphalt smoothing option is ON. Before this new ground Tatu >converted from the old one I had (which I had made with FSTC >and Resample), the polygon's smoothing DID work. So the >question is, how is this new ground interfering with the >polygon's smoothing parameter? The polygons are on layers >9-12. I have never heard of VTP polygons interfering with the SurfaceType SCASM commands, so it sounds weird to me. Are you sure the the SurfaceType commands are (still) there in your polygon BGL? Btw, I am not that much familiar with Airport, when you say the asphalt smoothing is on, are you sure the Airport also makes the SurfaceType command.Dick, about that texture quality setting. Just for the information, when you set it to something lower then high, then the biggest mip is not used when you are close to it, but one of the lower mips. If the mips are not 100% correct I can assume that that gives the shift.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi Arno.That's good info about the mipping and how it relates to the texture quality setting.With the more modern videocards, that would not be a problem, as we'd just keep the setting at the highest... but for computers with 16 or 32 bit videocards, the misalignment may be something we're forced to live with.I wonder what happens now with NO mipping?DickEDITED:I just checked the mipping of the 8-bit with alpha textures... they are mipped to 9 levels ( road and shoreline textues for VTP2 lines ). This is how my examples of CUSTOM with VTP2 polys are mipped.Our default landclass textures ( DXT1 opaque ) are mipped to only 7 levels.Is this the problem?In MS Imagetool:If you take a 24 bit image with alpha, and convert to 8-bit ( with alpha ), then mip, you get 9 levels.If you take a 24 bit image with alpha, and convert to DXT1 ( with alpha ), then mip, you get 7 levels.You can convert 8-bit with 9 levels to DXT1... and the mips change to 7 levels. Then you can reconvert back to 8-bit, and they stay at 7 levels. This may also explain why I get a darkening in the transparency of my 8-bit with alpha textures (?)... because there are too many mip levels?

Share this post


Link to post
Share on other sites

Interesting. When you think normally you would have the following mips for a 256x256 image:256x256128x12864x6432x3216x168x84x42x21x1So this makes 9 mips in total (as you noticed with the 8 bit image). So I wonder if DXT maybe doesn't use the last two or so (these don't make that much sense I would say).But a better questions is maybe why does 8 bit have them all and does the conversion not work as you would expect.......Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Arno, the Airport file still has the box checked for the smoothing of my polygons. I assume Airport puts them into the bgl-file it exports, as there is no other files it could go to, that is as usually the only thing it exports except the exclude files.I once saw (and also have it) a macro that worked as a smoother to remove bumb. Has anyone got this one to work? I recall I tried it some weeks ago, and then I didn't notice any differce, if I remember right.Anyway, the fact that this new VTP-ground is interfering with the smoothing can't be anything else than true. :) If I change files to the old Resample-ground, the apron and taxiways are again smooth.With the old resample ground I used DXT1 mip mapped textures. Maybe what Dick said could have something to do with the misaligned bitmap.

Share this post


Link to post
Share on other sites

I've found the same kind of displaced textures on many other spots now. Guess it must be the mips then to 100%. :(

Share this post


Link to post
Share on other sites

Hi!Thank you very much for your replys. I just came home, couldn't answer before but it seems that Sebastian has given answer to some of the questions already.I have tried to set instances to 254 instead of 255 and I get a line or a border (Empty space between the tiles) with that. I also tried 256 and with that the shift is even more. I also thought that the problem could be mip mapping but also something that resample bgl:s and VTP bgl:s do differently. Does it seem that I calculated the coordinates for LOD13 wrong? Ah...but it works with HIGH setting....I don't know....The bumpy is very strange, I can assure you when I replace the VTP polygon bgl with the one created by Resample it isn't bumpy any more. Is there a switch somewhere in VTP code I should use? Like with LWM, make the whole tile land or water...a switch to not to make it water nor land. But if I understood correctly the method drawing the VTP polygons isn't the same as doing a photo-scenery bgl with Resample. I also tried many different layers and it was always bumpy.I'll have to try to figure something out...thank you once again so far, please, if you can think of something it would be nice to know.Greetings,Tatu

Share this post


Link to post
Share on other sites

Hi Tatu.AS I said earlier, if you want smoothing you will have to apply it, just as you would to any scenery. I can verify that CUSTOM textures placed by a resample-produced BGL, will make the world as smooth as a marble... but I don't necessarily see that as a good thing. They also destroy LWMs, VTPs, and who knows what else.If resizing the VTP polys makes the situation worse, we can assume the size of the polys is fine. I'm suspecting the mipping.The problem with the mipping isn't caused by a resample BGL or a VTP BGL. The mipping problem, if that is the problem, is caused by Imagetool mipping DXT1 with 7 levels, and 8-bit with 9 levels.The cure, if this is the problem, is to run the 8-bit ( at 9 levels mipping ) through imagetool, convert to DXT1, then immediately convert back to 8-bit... that leaves 7 levels of mipping for the 8-bit.I'm attaching 2 pics. They are both the same resampled produced BGL, and use DXT1 textures from a Terrascene produced image. The quality of the alignment is astounding... but note the degraded appearance when using the "Terrain texture size" medium. This isn't VTP, this is CUSTOM bgl. #2 is set to high... much nicer.So if you set that thing to medium, it won't look very good.Dick

Share this post


Link to post
Share on other sites

Hi!Thanks Dick.I understood what you meant, I was just wondering...That difference in your pictures is really a big one, but after all, Terrain Texture Size switch works like it should, ;-) decreasing the quality of the ground textures. (?) I can perfectly understand that. I'll try to take a closer look at the mip mapping.Greetings,TatuEDIT: Just tried this one, 7 or 9 mip maps, no difference. The problem with High and Medium setting still stays the same.

Share this post


Link to post
Share on other sites

Hi Tatu.Then, I think we can agree that VTP poly textures will not display correctly with "Terrain Texture Size" set to anything other than High. And resample-placed CUSTOM will also be degraded in quality, but the alignment may not suffer as much as VTP.It appears to be way the display routine handles the texture sizing... probably different for VTPs than for resample-placed CUSTOM. Just as they affect the surrounding terrain differently.If you line up on a length of road, then degrade the texture size to low, you may see some apparent shifting of VTP lines as well. You will still need to find an area-sensing, smoothing routine, if you want a smooth runway apron made of a VTP poly.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