Jump to content

  • Log In with Google      Sign In   
  • Create Account


Transparent Textures ( what format to use? and how to save it out )


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 riuthamus   Moderators   -  Reputation: 4816

Like
0Likes
Like

Posted 23 February 2013 - 06:15 PM

So, we are trying to get the grass working again and in doing so have run into some issues.

 

RuinValor%202013-02-23%2005-52-15-38.png

 

This is done with a PNG file exported and no alpha associated with it at all. I know that is an issue so we have tried to use several different options and none of them seem to work. I have saved this out to be a TGA with an alpha channel and I have saved it as a DXT5, but none of them are working.

 

We are attempting to load the alpha's via premultiplied rednering. Is this the proper technique? Should we be doing something else? Is there a setup we need to use so our alpha's can load with these texture formats?

 

Furthermore, we read that premultiplied works with DXT4 and DXT2 but the photoshop plugin that lets me make DDS files does not have an option to export as DXT4 or DXT2, only 1, 3, or 5. Thanks for your help with this as this is a very annoying problem.

 

Note: I have tried to save this out using superPNG but when I do it removes the background and doesnt keep the alpha layer, even though i told it to do so....


Edited by riuthamus, 23 February 2013 - 06:17 PM.


Sponsor:

#2 Paradigm Shifter   Crossbones+   -  Reputation: 5253

Like
1Likes
Like

Posted 23 February 2013 - 06:22 PM

DXT2 and DXT4 are identical formats (except for the header) to their DXT1/5 counterparts, so save them out as DXT1/5. You need to set the alpha blend mode on the GPU to use premultiplied alpha though (on all platforms I have worked on, which doesn't include PC).


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#3 riuthamus   Moderators   -  Reputation: 4816

Like
0Likes
Like

Posted 23 February 2013 - 06:46 PM

I dont see that option in photoshop when saving out as a DDS. Is there a preset I need to load into it? or some options I need to modify?

 


Edited by riuthamus, 23 February 2013 - 06:47 PM.


#4 Paradigm Shifter   Crossbones+   -  Reputation: 5253

Like
1Likes
Like

Posted 23 February 2013 - 06:52 PM

It's an option when setting up the renderstate before using shaders, it's not an option for the file. Like I said, the file format is identical apart from the header.


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#5 riuthamus   Moderators   -  Reputation: 4816

Like
0Likes
Like

Posted 23 February 2013 - 06:59 PM

Telanor, our shader guy, says that I am explaining it wrong. I have dispatched him to this post to express it further. I have done some searching and everything I find suggests that the issue should be the shader since photoshop already exports in the alpha mode suggested.

 

http://forum.unity3d.com/threads/18604-Alpha-Straight-vs-Premultiplied

 

but.... Telanor insists that I do not understand! So, I will have him explain this better. Thanks Para



#6 Paradigm Shifter   Crossbones+   -  Reputation: 5253

Like
1Likes
Like

Posted 23 February 2013 - 07:01 PM

Shaders just set the alpha of a pixel, they don't read the existing colour value. So it is the renderstate that needs to set the alpha blend operation before the shader is run.


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#7 riuthamus   Moderators   -  Reputation: 4816

Like
0Likes
Like

Posted 24 February 2013 - 03:37 AM

Ah, thanks!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS