x


I want to add a Self-Illumination map to a Transparent material...

I'm trying to add a Self-Illumination map to a material already using a Transparency map...

I am an extremely new Unity user, and have no scripting experience whatsoever. I'm very used to setting up materials like this in Max by simply having a 32-bit Targa with an alpha channel for the transparency in the Diffuse slot, and adding a simple black targa with painted glowy bits in the slot for Self-Illumination... In past game engines I've worked with, importing this object with such a material simply works...

I am now trying to replicate this simple effect in Unity, but am having no luck...

I have a window object I am using that's nothing but a square poly, with a texture on it that looks like a round window that is primarily totally opaque (for the window-panes and frame), but is surrounded by a degree of transparency that makes it seem like it's casting a shadow on whatever wall it's placed against... I want the window to look like there is glowing light coming from within, so I'd like to also add a map to the material to make it self-illuminating so that the material uses both the alpha layer transparency of the 32-bit targa used for its diffuse map, as well as the secondary self-illumination map...

Likewise, I'm also wanting to make plants using a transparent texture for the leaves, and a second self-illumination texture for glowing patterns on the leaves...

Unfortunately, there seems to be no base Unity material that allows this functionality, and when I go into part of the material's interface that has the phrase "Edit Shader" (where I was assuming I could add the Self-Illumination element to it), the words "Edit Shader" are grayed out... I at first assumed I could start with a Self-Illumination material in Unity, and then choose a 32-bit Targa with alpha for the Base, but Unity seems to ignore the alpha-layer data in the Base texture under this circumstance...

Am I doing something wrong or missing something? Is there a way to achieve this without writing a special script?

I'd really appreciate some help on this...

Jadugara ^_^

more ▼

asked Apr 27, 2012 at 10:35 PM

Jadugara gravatar image

Jadugara
45 18 12 16

(comments are locked)
10|3000 characters needed characters left

1 answer: sort oldest

You should go to the material in unity and select a transparent or self ilum shader. Unity uses the aplha on the difuse texture for translucency. before Unity 3.0 it also used the alpha for self ilumination (when you selected a self ilum shader for the material.) Since 3.0 we can add an extra material whats alpha is used for self ilumination.

If you want both at the same time, there is no proper shader for that. Found this on the forums: http://forum.unity3d.com/threads/1554-Materials-with-Both-Transparency-and-Self-Illumination.

This probably is not the awnser you are looking for ;) I too would like a shader where the diffuse alpha is used for translucency and another texture its alpha for self ilumination.

If you know something about writing shaders, the default unity shaders can not be edited but they can be downloaded from the resources page on the website.

more ▼

answered May 11, 2012 at 12:24 PM

Bluestrike gravatar image

Bluestrike
701 144 3696 175

Thanks,...I appreciate the info... Yeah,...it looks like I'm simply going to have to wait for our programmers to write a special shader for our needs.... Bummer...

May 13, 2012 at 08:10 PM Jadugara
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1364
x293
x262
x22

asked: Apr 27, 2012 at 10:35 PM

Seen: 5749 times

Last Updated: May 13, 2012 at 08:10 PM