Author Topic: Texture Problem etc, etc  (Read 428 times)

Legacy_the_isolator

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Texture Problem etc, etc
« on: April 12, 2011, 04:55:53 pm »


               Hi

I'm trying something out with textures and alpha channels. Here is what I am trying to do: 

I'm making a grass - water tile, to make the gap between grass and dirt (see picture) I am using an alpha channel grass texture to try and make the join seem seemless.

However the texture effect looks weird when viewed up close, the grass appears blurry, whilst the alpha grass appears alot clearer. They are both the same texture (only one as an alpha), also the UVW wrap is the same size (500 x 500). I'm just not sure what the problem is. Anyway, I've included a picture to illustrate what I mean, sorry about the quality of the textures and such, it's just preliminary at the moment whilst I experiment.

Any help would be greatly appreciated - cheers

Okay -0 on second thoughts I can't figure out to put a picture in this message, let me figure it out...

social.bioware.com/2026042/albums/1159312/111156

Okay here's a link then, hopefully it should work...
               
               

               


                     Modifié par the_isolator, 12 avril 2011 - 03:58 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Texture Problem etc, etc
« Reply #1 on: April 12, 2011, 05:27:24 pm »


               An alpha texture needs to be 32bit, with the alpha channel included.  A normal texture must be 24 bit.  On the alpha channel it should have some bit of the texture defined to be seethrough..

Anyway, you can NOT use the same texture for both, you must at least have a 2nd name texture for the separate object that has the alpha texture applied.

The alpha object should be attached to the anim dummy of the tile mdl as well.  Otherwise, alpha just doesn't work very well.
               
               

               


                     Modifié par Bannor Bloodfist, 12 avril 2011 - 04:28 .
                     
                  


            

Legacy_the_isolator

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Texture Problem etc, etc
« Reply #2 on: April 12, 2011, 05:48:56 pm »


               Cheers for your help

I figured it out, I was using TGA textures, once I converted them to DDS it works fine. Usually I put off converting them until I've finished all my modelling.

Thanks anyway.
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Texture Problem etc, etc
« Reply #3 on: April 12, 2011, 06:22:20 pm »


               Nope, that was NOT the issue, likely you had two copies of the tex, one as dds, one as tga, dds will override, and if as you said, you had the original file in dds form, extracted to tga, and left both copies in the override folder, the game would use the dds.

You may also have had a slightly bad version of the TGA.  If you exported the dds, and didn't run it through tga flipper, then that could easily explain why it was not working.  Paintshop pro also creates bad TGA files that need to have their header corrected, and again, the tgaflipper utility will correct that header info for you.

Anyway, TGA OR DDS will work just fine as alpha.  So that was definitely NOT the issue.

I develop entirely with TGA files as 3dsmax can not display the bioware version of DDS, so it won't display textures at all.  I then convert to DDS when finished, or revert back to original DDS if I am using a standard texture etc..  I don't bother with that TGA to DDS conversion until final step before release to public, otherwise, all my files in override folder are TGA, including the alpha's.
               
               

               
            

Legacy_the_isolator

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Texture Problem etc, etc
« Reply #4 on: April 12, 2011, 06:41:51 pm »


               I guess you were right. It must have been a bad tga, the textures were never DDS to start with, but I just converted both files from tga to DDS and it worked fine. As I say I've literally not done anything else to them. The two files were identical in regards to image (different names though), one just had an alpha and the other didn't.

I used the DDS Compression tool, would this have corrected any issues with a dodgy tga?

Another question? Waht exactly is the benefit of DDS over tga? Is it just an issue of clarity of image and file compression?
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Texture Problem etc, etc
« Reply #5 on: April 12, 2011, 07:15:57 pm »


               Yes, sometimes that dds conversion can correct the image format for you without issue, sometimes not, depends on how the original tga was created, what program etc...

DDS compresses the file, AND embeds smaller versions of the texture within it as well.

So, say your original TGA was 512x512, the DDS conversion utility creates a 512x512, a 256x256, a 128x128 and a 64x64 version of the texture, compressing all of them.

Some DDS extraction tools will give you all the versions that a DDS has embedded, most will only extract the highest level available.  By having the multiple versions available within the same file, your graphics card can display them quicker than having to convert/downgrade to a lower level version when requested by your game settings.  (One of the options for NWN is to reduce graphics quality for older systems to gain speed)

DDS is not a better format, just much smaller, it is also a VERY lossy format, meaning that during compression it actually loses quality.  However, every new game uses them nowadays as they can pack more bang for the filespace, and video cards provide quick display as a default for DDS.  TGA works with any vid card out there but is considerably larger, and thus takes longer to display at the higher resolution levels, where DDS may or may not.   The Bioware DDS is a much older version of the indusctry standard, and as such is not supported by Nvidia unless you run older drivers or special versions of their drivers.  I don't remember the version number that Bioware uses but it is considered way out of date by the graphic card industry as a whole.

For all intents and purposes, 99% of the folks still playing NWN have systems that can display the dds version of graphics now, (provided they have the correct drivers) so keeping the tga available is not really needed except for special cases (like developing new content where you need TGA so that gmax/3dsmax can actually display the texture for you since Bioware never provide a convert/driver for 3ds to use to recognize the DDS format.).  Converting a 64x64 or lower quality of TGA to DDS saves nothing as the overhead of DDS conversion takes up the same or similar amount of space anyway.
               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
Texture Problem etc, etc
« Reply #6 on: April 12, 2011, 09:51:52 pm »


               Actually, depending on the situation I've found that even original copies of .tga textures can be displayed blurily in some situations. I think it mostly happens if the games fills up its allowed texture cache with tga textures, and instead uses mipmapped (shrunk down) versions in the cache instead in order to fit all required textures within the given space. Since dds textures are so significantly smaller, its possible that might also explain your issue.

It's something I always used to get when working on Wild Woods, anyway, before I lost the source files.