PDA

View Full Version : Problem with shadow buffer



vector
06-10-2013, 07:03 AM
hi

I tried to illuminate instanced grass and the beauty render is ok, but with shadow buffer (activating compositing buffer export) there are points where light doesn't affect the instances and there are no shadows (or white points in the shadow pass). Despite the fact programs like SoftImage let you include global shadow and resolve this problem, I don't know if LightWave can do it.

114846

114847

vector
06-11-2013, 09:00 AM
Probably the previous example maybe not easy to understand, so I post another images where I show what I need to get:

114871
Render

114872
Shadow info I get

114873
And what I need to get and I don't know how to do it.

Thank you

Sensei
06-11-2013, 10:26 AM
Dot product between normalized two normal vectors = angle between them. One is surface normal vector. Second one is light direction vector.
If you plug such dot result to logic, or to gradient, you can convert <0 to 0.0, and >0 to 1.0, or reverse. One side will be informing "light is hitting me", other one "light is not hitting me". Merge it with shadow info from 2nd picture.

Sensei
06-11-2013, 02:36 PM
114887

114888

vector
06-11-2013, 09:08 PM
"Magician" Sensei, thank you very much