Alpha Question (sure it's simple)

 
Post new topic   Reply to topic    Unity Community Index // UniTree
View previous topic :: View next topic  
Author Message
meedja



Joined: 30 Jan 2007
Posts: 22

PostPosted: Thu Sep 20, 2007 1:02 pm    Post subject: Alpha Question (sure it's simple) Reply with quote
Hi All

Playing with unity and importing some members trees. I have the tree in, set the leaf shader to Nature/Soft Occlusion Leaves and selected the leafe texture as the main texture.

This maps the leaves on to the surface but the alpha does not seem to apply? It's there, names same os the leaf texture with 'alpha' appended but no amount of slider adjustment in the material dialog will apply it. So i'm left with green squares with nice leaf images on them.

Any thoughts on how I need to set this up so the alpha works and I see just the leaves, not the surfaces they are applied to?

Thanks

Peter
Back to top
View user's profile Send private message
Aras
Unity Graphics Developer


Joined: 07 Nov 2005
Posts: 3171
Location: Unity Technologies

PostPosted: Thu Sep 20, 2007 1:17 pm    Post subject: Reply with quote
What hardware are you running this on?
_________________
homepage | blog
Back to top
View user's profile Send private message Visit poster's website ICQ Number
meedja



Joined: 30 Jan 2007
Posts: 22

PostPosted: Thu Sep 20, 2007 1:37 pm    Post subject: Reply with quote
Hi Aras

iMac 2.16 Core 2 Duo
2GB RAM
Radeon X1600 128MB

In Debug, I see the alpha attached to Element1->Second->Texture.

Peter
Back to top
View user's profile Send private message
guategeek



Joined: 22 Jun 2005
Posts: 658
Location: Guatemala

PostPosted: Thu Sep 20, 2007 3:31 pm    Post subject: Reply with quote
You need one texture image with the Alpha included in a 4th color chanel. Sounds like you have two texture images one with the RGB chanels and one with the Alpha. You need to use an app like Photoshop or GIMP to put them together into a single file. - Jeff
_________________
Jeff McArthur | Guategeek
http://www.unifycommunity.com
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
meedja



Joined: 30 Jan 2007
Posts: 22

PostPosted: Thu Sep 20, 2007 3:54 pm    Post subject: Reply with quote
Jeff

That did the trick. Many thanks

Peter
Back to top
View user's profile Send private message
Morgan



Joined: 21 May 2006
Posts: 1107

PostPosted: Tue Sep 25, 2007 6:19 am    Post subject: Reply with quote
Probably a silly Q, but I haven't turned up the answer: can you use a .psd as an RGBA image source?

Unity seems to ignore both the psd's own transparency, and a 4th channel added to the psd. So I've been exporting PNGs, but that loses the benefit of rapid roundtrip psd editing.

_________________
Morgan
adams
immersive
Back to top
View user's profile Send private message Visit poster's website AIM Address
Eric5h5



Joined: 19 Jul 2006
Posts: 6930

PostPosted: Tue Sep 25, 2007 7:06 am    Post subject: Reply with quote
Morgan wrote:
Probably a silly Q, but I haven't turned up the answer: can you use a .psd as an RGBA image source?


Sure. I have no problems with the regular transparency or adding an alpha channel, though it's more often that using an actual alpha channel gets you the control you want. Make sure you're using RGBA uncompressed or DXT5 compression; I don't think anything else supports alpha channels.

--Eric
Back to top
View user's profile Send private message Visit poster's website
DocSWAB



Joined: 28 Aug 2006
Posts: 519
Location: Montana, USA

PostPosted: Tue Sep 25, 2007 3:25 pm    Post subject: Reply with quote
Morgan wrote:
Probably a silly Q, but I haven't turned up the answer: can you use a .psd as an RGBA image source?

Unity seems to ignore both the psd's own transparency, and a 4th channel added to the psd. So I've been exporting PNGs, but that loses the benefit of rapid roundtrip psd editing.


For whatever reason, you need to turn off the visiblity of the alpha channel (4th channel) in PhotoShop for Unity to read it right. But PSDs work like a charm, either with 4th channel alpha or transparency in the main image.
Back to top
View user's profile Send private message
Morgan



Joined: 21 May 2006
Posts: 1107

PostPosted: Thu Sep 27, 2007 9:48 pm    Post subject: Reply with quote
Thanks. I will play some more and see why it wasn't working for me.
_________________
Morgan
adams
immersive
Back to top
View user's profile Send private message Visit poster's website AIM Address
VICTOM



Joined: 28 Aug 2005
Posts: 221
Location: NYC - Hoboken -

PostPosted: Fri Sep 28, 2007 9:55 am    Post subject: Reply with quote
Make sure your using a shader that supports alphas.
Sometimes I just drag the .psd on the gO and say "hey what's wrong - no alpha?" then I remember that oh that shader doesn't support alpha channels.


Cheers,
Back to top
View user's profile Send private message
chrusion



Joined: 05 Nov 2009
Posts: 7

PostPosted: Thu Nov 05, 2009 4:56 am    Post subject: Reply with quote
Morgan wrote:
can you use a .psd as an RGBA image source?

Unity seems to ignore both the psd's own transparency, and a 4th channel added to the psd.

Yes. Make sure the PSD has a default Background layer. Unity can used multi-layered PSDs, but without that default Background, it seems to ignore the alpha channel in the channels palette.

I usually make my PSDs for leaves with the leaves cut out in a layer above a background layer having a similar color to the leaves so that "edge halos" are eliminated or reduced. With PNGs, even though Unity will take the transparency of a layer as the alpha, the 'default transparent' fill color is white, which can result in a light fringe or halo around leaves.

To convert a layer to a background in PS, use Layer -> New -> Background from Layer.


Dean Scott, mfa
.
Back to top
View user's profile Send private message
Post new topic   Reply to topic    Unity Community Index // UniTree All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum