PDA

View Full Version : How to give opaque material translucent shadows?



AreDub3D
11-13-2009, 04:35 PM
Been trying to figure this out, but to be honest, I can't make much sense out of the bit about translucent shadow color on this UDN page about a third of the way down the page:

(http://udn.epicgames.com/Three/Lightmass.html#World%20Settings)
_____

There's no material input for Transmission, so currently it is derived from the other material inputs as follows:

* Lit materials
o BLEND_Translucent and BLEND_Additive: Transmission = Lerp(White, Diffuse, Opacity)
o BLEND_Modulate: Transmission = Diffuse

________

Can someone please explain to me how to do this with an opaque material?

The larger blue and orange squares in the stained glass images they use to illustrate this are doing what I would like my material to do.

But how?

Thanks!

ffejnosliw
11-13-2009, 04:43 PM
You can't do it with an opaque material. It has to be a translucent, additive, or modulated material. If it is translucent or additive, the color of the shadow is determined by the diffuse input and the opacity input. Basically, it interpolated between white and the diffuse color based on the opacity. For modulated, it either used the diffuse color or the emissive color outright depending on if the material is lit or unlit.

AreDub3D
11-14-2009, 02:57 PM
You can't do it with an opaque material. It has to be a translucent, additive, or modulated material. If it is translucent or additive, the color of the shadow is determined by the diffuse input and the opacity input. Basically, it interpolated between white and the diffuse color based on the opacity. For modulated, it either used the diffuse color or the emissive color outright depending on if the material is lit or unlit.

Got it. Thanks for explaining that. The world settings UDN page that talks about this doesn't mention a specific setting to enable the translucent shadow color and I don't see one. Does this happen automatically in lightmass? (Seems everything has an "Enable?" check box in UE ...)

AreDub3D
11-16-2009, 09:34 AM
So if a material is set to BLEND_Translucent, is it supposed to always be somewhat transparent, no matter if the Opacity mask is all black? I want translucence not transparency. Is there a way to get the former without the latter?

Would Transmission Mask/Color give me the effect I want? (I thought that only affected how the material looks directly — light passing through skin. Is there a way to make this affect the color of shadows?)