[SOLVED] How to create a receive shadows transparent material?


Recommended Posts

 When I add a plane to the world,

 I gave a texture with alpha channel and open alpha Test.

 This plane becomes transparent, but  can not see the receiving shadow.

 If I want to make like this  transparent material to receive shadows, how to create a material or create shader?



Link to post


The material is very useful when doing AR Project。

The  shadow of  AR ground  can make more real.

My solution is:

 1 .Create a plane added to the world.

 2. Inherited of this material mesh_base and modify Blending src = one minus src alpha , the Blending dest = dest Color.

 3. Set the color = (0.5f, 0.5f, 0.5f, 1.0f);

 4. Then make this plane as a floor receiving shadow.

 However, due to this plane is semitransparent and gray,
  Obscured background color reproduction is very low.
  So I need a better solution at present.



Thanks a lot.


post-289-0-82926000-1367812766_thumb.png  post-289-0-20823700-1367812828_thumb.png  post-289-0-44727100-1367812901_thumb.png  post-289-0-09894600-1367812974_thumb.png


Link to post

I was going to post a similar question today. I was surprised and happy to see your post.


As several people / companies are working on an Augmented Reality solution for Unigine, it would be worthwhile discussing some of the shader requirements.

  • matte_shadow --> shadow receive
  • matte_reflection --> planar reflection receive
  • matte_mask --> mask objects + shadow and reflection receive
1 & 2 are fairly self explanatory


3. This is for more specific application, where an installation would be permanently fixed and masking of objects would be required for overlaying unigine onto a more complex and occludable models; (which could open the way for some insanely cool installations).

For a simple example of use, a set of extruded blocks on a table exist in reality and an exact dimensioned, tracked and matched geometry version existed in unigine. The mesh in unigine could be used as the mask / matte object required to perform the masking on the AR result and thus performing the correct masking of physical version.


Shaders are not my skill, but I think it would involve the stencil & depth buffers (for shadow and reflection) and perhaps the auxillary buffer for masking


All ideas and suggestions welcome.

Link to post
  • 4 months later...

It will be possible to achieve that in the next SDK update.


The following settings are required:


* Render HDR must be disabled.

* Material blending mode set to zero:src_color.

* All material rendering passes are disabled except light.

* White diffuse texture on transparent material.



Link to post