VraySamplerInfo - Grey Normal Vector with Vray2SidedMtl and Lights

Hi,

I’m using the VraySamplerInfo render element to get the normal vectors (with bump mapping) of my scene, in object space relative to a dummy. But all objects with a Vray2SidedMtl appears grey. My problem is a little similar to another post (VraySamplerInfo - Normal Vector & Single face objects - Issues - Chaos Forum), which has already been solved:

The ‘Normal vector with bump mapping’, however, considers the two-sidedness of materials, hence why it works as it does with a VRayMtl and not with a VRayLightMtl (turning off the ‘double-sided’ of the VRayMtl would end in matching results). Try applying a VRay2SidedMtl, in which you plug a VRayLightMtl and set a black translucency and see if that works out for you.

My objects are lampshades, with no shell (single sided) for the Vray2SidedMtl to work well. Based on the answer above, I guess that the normal is grey because the two vectors of the object (inside and outside the lampshade ) cancel each other. I’ve set the translucency color to a middle grey.

My questions:
- Is there a way or tip to get the bumped normal vector to work with this material? I know I could use a different material (like a VRayLightMaterial with a map, or a VrayMtl with self illumination), but the result is not very realistic, compared to the Vray2SidedMtl which uses a true light.

- In the same vein, visible lights (even mesh lights) render grey in the normal vector. Is there any way to avoid this?

I ask for this because I use these rendered textures in Unity, and the grey values in object space normals make the rendering quite messy (black screen flicker, depending of the point of view…).

Thanks for your help!

Marc

Doesn’t the normal vector mode (without bump mapping) suit your project?

Unfortunately no, retrieving the bump in the normal map allows me to keep all my texture detail in Unity.

Guess you would need to do a second render only for the SamplerInfo with another kind of material.

The VRay2SidedMtl material averages the normals on both sides so they tend to cancel each other; I agree that generally this is not very useful. I guess we could just output the normals for the material that is facing the camera?

Best regards,
Vlado

That would be perfect. If you think the grey value is not useful, would it be possible to remove the grey value generated from the VRay lights? Ignoring them or taking the shape of the light into account.
Thank you for your answer,

Marc