• News

• Industries

• Learning & Support

• Community

• Marketplace

# Making a Reflective material stick to Mesh

Just wondering if there was a way to make a reflective material “sticky” - in other words, behave as a UV map instead of a reflection, whereby if I rotate a viewing camera around the mesh with the reflective material applied, the view doesn’t change corresponding to the camera but stays on the object at its default reflective position.

Think of it as an actual physical mirror ball where if you move around it, the reflections don’t move along with you.

You would have to bake a reflection to a texture. There might be some more advanced ways of adjusting the reflection in the material so it gets the same reflection no matter what the camera angle is

Reflection direction is related to view direction. Formula is this: viewDirection - 2.0 * dot(normal, viewDirection) * normal.
Could you explain in terms of math what you want to achieve? If you want reflection always give some pseudo reflection look you could try to transfrom world space normal with inverse view transfrom.(Just use Transform node from view to world for your normal)

Darthviper,
How would I go about to baking the reflection out. I think your second solution is more applicable to what I’m trying to achieve - do explain.
Thank you!

Jenny,
Basically the reflection is just to capture the environment (it comes from the Scene Capture Cube). I noticed that if I have a camera pointing and moving around the mesh with the render target, the reflection doesn’t stick.
Not really sure how to explain that in math but I suppose the idea is that the reflection is mainly to capture the surrounding environment to be mapped onto a mesh.

If you use scene capture cube then you can just use that in material and lookup with pixel normal and output result to emissive.

Thanks Jenny!
Did you mean the PixelNormalWS under “Vectors” or “Coordinates” or, does that not matter?

Thank you so much.

Category does not matter but only name. PixelNormalWS is what I mean.