Author Topic: Xeno's trees (foliage and flowers) having transparency issues  (Read 454 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Xeno's trees (foliage and flowers) having transparency issues
« on: January 15, 2011, 07:57:21 pm »


               I need help.

The problem:
I have some ancient custom content that is misbehaving, but is beautiful and would like to make work. The misbehaviour comes down to transparency issues in the textures of foliage. Sometimes the alpha channel in the texture appears to fail completely, other times there is no problem.

So sometimes I place a good looking thicket of birch trees (that actually looks like a birch thicket) and the foliage is completely transparent. It is almost always transparent when first placing in the toolset. HOWEVER when I reload the area the birch thicket looks like a jumble of white billboards with foliage prints - ie. no transparency. 

This problem is specific to certain content mostly the stuff that I believe Xeno once created.

The situation:
(1) I have found the files I want to use, and extracted them from ancient Vives haks. (I am currently working on keeping the Vives PW alive by the way so there should be no question about whether I have the right to work on this content). I have the MDLs the PWKs, the DDSs, and the relevant lines from the 2DA. I can't find any relevant TGAs and assume that they were never bundled with the others since the DDS should be fine. Hopefully there are no other files I need. Please let me know if I should be looking for anything else.

(2) I created a  hak with only the files I want to test. For comparison I also have project Q loaded. The behavior is identical to how I explained above in THE PROBLEM.

(3) I searched the vault for updated versions of these old haks and can't find them. I can't even find the old ones. Again I am assuming this is Xeno's work.

(4) Despite my vows not to make custom art assets for NWN (I use NWN to get away from creating art assets, as I'd rather make a full blown RPG than spend a year creating the assets for a game), I broke down and installed GMAX with the NWMAX plugin, DDSTools (a windows script I believe) and a dds compression script for windows.

(5) I'm getting nowhere, as I am actually a Mac user who prefers the Cheetah-Photoshop-Unity art asset pipeline, because this GMAX/NWMAX - NWN thing is arcane to me. The windows thing is odd to me as well. Give me a Unix command line and I'm happy, but I can't seem to get this damn DDSTools to do anything.

What I need:
(1) The same art assets already fixed by someone else and available on the Vault.
      failing that:
(2) Someone to help me through the steps of troubleshooting a troublesome texture in a placeable.

I figure the steps are: 
       1) Get a TGA out of the DDS so that GMAX can actually use the material. DDSTools isn't cooperating.
       2) Remake the alpha
       3) Recompile the DDS

Is that incorrect? How else do I go about fixing this?
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Xeno's trees (foliage and flowers) having transparency issues
« Reply #1 on: January 15, 2011, 08:29:00 pm »


               Get either of these explorer programs and select the DDS file then outside click on the picture and export it as a TGA

nwvault.ign.com/View.php

or the updated one

nwvault.ign.com/View.php
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Xeno's trees (foliage and flowers) having transparency issues
« Reply #2 on: January 15, 2011, 09:02:02 pm »


               Thanks. Thats a useful utility. Hopefully I'll make some headway.
               
               

               


                     Modifié par henesua, 15 janvier 2011 - 09:02 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Xeno's trees (foliage and flowers) having transparency issues
« Reply #3 on: January 16, 2011, 05:01:31 pm »


               I have looked at several textures, and they appear to be in decent shape. So... I backed up and looked at this from another angle, and tried different computers with different video cards. I am not seeing the problem with them.



I think this is a client side problem that I have become more aware of now that I am developing with this computer. My other machine doesn't have the problem.



However, this transparency issue only shows up with these particular placeables. Perhaps because they have an extraordinary number of transparent billboards? That seems unlikely, but I'l look into this more. I wonder if it has to do with lack of background color in the TGA. Often its a good idea to use a background color in an image file, and depend fully on the Alpha channel for transparency. But these placeables don't seem to go that route.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Xeno's trees (foliage and flowers) having transparency issues
« Reply #4 on: January 16, 2011, 09:07:44 pm »


               Could it be that lacking a TXI file is the problem? Anyone know where to get a tutorial on how to associate a TXI with a MDL?
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Xeno's trees (foliage and flowers) having transparency issues
« Reply #5 on: January 17, 2011, 03:54:40 pm »


               Actually, TXI's are texture functions.  Just little text files which tell the engine how the texture should be manipulated while being displayed.  To associate a TXI with a texture, just give the TXI file the same name as the texture and it will automatically be loaded and acted upon.

So if your texture is foo.tga or foo.dds, your TXI will be called foo.txi.

When a texture has an accompanying TXI, every model which uses the texture will also display it with the TXI settings you added.  So it usually helps to give the texture and TXI unique names so that you don't accidentally affect other models using the same texture. (e.g. mytex.tga & mytex.txi)

Great way to find a good TXI for your texture is just to find another piece of custom content whose textures have the same effect and copy and rename the TXI they used.

But is a TXI going to help your issue?  I'm not so sure about that.  If it displays on one machine fine but not on another, and if everything on both machines is the same hak & file wise then sounds like a display driver issue or something else, not the actual content.   Never hurts to post screenshots, BTW.  '<img'>  You can google around and find lots of threads on the old Bioware forums about driver issues regarding transparency and recommendations on the most NWN-friendly drivers.