Jump to content
Sign in to follow this  
Guest JoeW

VTP Textures - Friendly Warning

Recommended Posts

I am sure that many of you already know this, but you need to be real careful with the chosen file format for VTP textures.I have spent a good part of the last 3 days fighting sporatic problems with my airport skirtings. The problem turned out to be with the texture file format, but it gave the appearence of a problem with the VTP code.I was using 8 bit 256x256 textures. I did this, because some of the Landclass textures are 8-bit normal bitmaps (at least they appeared to be, since they could be loaded into a standard graphics package).Unfortunately, I had eliminated the problem being with the textures, because the scenery would load correctly some times. However, when I added more textures to the BGL file, then the program would crash. Normally, if the texture format is incorrect, you would expect FS2002 to crash or not be display the texture at all.This was one heck of a frustrating battle, since I was off in the wrong direction the whole time (code not textures).I finally went with the Dx1 Opaque format, and things are working fine now.I am, however, curious about the 8-bit formats used by some of the Landclass textures. As I mentioned, these files are loaded as non-extended 8-bit bitmap formats, but they do not appear to be RGB or RLE encoded bitmaps (the file sizes are larger). If anybody knows the answer, I would like to hear it.Cheers,Allen

Share this post


Link to post
Share on other sites

By the way....I just downloaded Christian Stock's TMF manual. What a piece of work ! Thanks Christian.Allen

Share this post


Link to post
Share on other sites

I agree, we (NL2000 Team) came to the same conclusion while testing our new VTP scenery.Unless you use DXT texture you can get a crash while starting FS.Arno


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

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Allen.8-bit is perfectly alright. But the textures must be mipped and flipped vertically. Alpha is allowed, and is the way to use transparency with VTP. 8-bit mipped & flipped.This is the format of CFS2 ground textures, and the format for FS2002 and CFS2 VTP line textures. It is the only way to get transparency with VTP.Dick

Share this post


Link to post
Share on other sites

But the textures must be mippedAhh...That explains the increased file size. I also did not know that you could have transparent VTP textures. I tried using transparent DX1 textures, but it did not work for VTP. That is good information to know.Allen

Share this post


Link to post
Share on other sites

Hi Dick,I might be making this much harder than it needs to be, but how do you add an alpha channel to an 8-bit image? Do you just add the channel in Photoshop and export the image as DXT1, or is there a more involved procedure? And if it's DXT1 only, then do you only get a 1-bit mask?thx,


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites

Hi Bill.I use PaintShopPro7, but the process should be the same. I save 32-bit alphaed images as PHOTOSHOP (*.psd), then open them with MS'Imagetool... from there I create the mips and save as 8-bit.You could also convert from DXT1 with alpha, or whatever from within Imagetool. The only thing Imagetool lacks is the ability to merge an alpha channel to an image... Elrond Elvish created such a tool with ... and that tool might be worth investigating.Martin Wright has [link:www.mnwright.btinternet.co.uk/programs/bmp2000.htm]Bitmap2000, which can load an 8-bit image, create an alpha ( transparency ) from a color ( save the pallete ), then call imagetool to mip to the 9 mips we need. It then can save as what he calls Extended format... 8-bit mipped with alpha.Imagetool can also be run in batch mode from a Dos Command window.The only odd part is really the flipping of the textures, required by VTP. I use XNView for that, as it allows a script to support batch processing of a whole folder at a time.Martin Wright also has DXTBmp, which includes a flipping function, but it cannot save as 8-bit... DXT1 non-nVidia works well, and can be then made 8-bit by imagetool.Dick

Share this post


Link to post
Share on other sites

Thanks, I'll give that a shot. I usually do things like the batch flipping in Photoshop where I can just write batch actions, so they'd be flipped before they got to ImageTool.


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites

Hi Bill.Just keep in mind that CUSTOM textures ( "252" or "253" ) must be flipped for VTP use, but the autogen isn't flipped.Dick

Share this post


Link to post
Share on other sites

Roger that. So do the textures, do the autogen in Annotator, then flip 'em and mip 'em. Got it.


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites
Guest christian

Just bear in mind that the DXT1 doesn't have a 'real' alpha channel, it's just black = alpha. So in photoshop (or whatever) just use black (for water) and white, but no greyscales. DXT3 uses a full 256 colour alpha channel, but that's not for terrain.There's a paragraph on that in my TMF manual.Cheers, Christian

Share this post


Link to post
Share on other sites

Yeah, that's what I meant in an earlier post by a 1-bit mask. I think Dick was saying that you could just make an 8-bit bmp with an alpha channel, however, and that does provide for a gradated mask. That will work, yes?


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites
Guest JoeW

And Just where might one find this " TMF Manual" ?Or am I comming in to late on this?Joe WatsonI just read a little farther on down and found it.ThanksJoe

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...