Jump to content

[SOLVED] mesh_reflection_2d_base should take face normal into account


photo

Recommended Posts

Try the following

1) create a mesh in 3D package mesh is piece of ceiling so normals face in the negative z direction & export.

2) import mesh into Unigine.

3) add mesh_reflection_2d_base as a material to the mesh.

4) mesh shows when looking at it at an angle but looking directly towards the mesh causes it to show no reflection.

5) changing the plane direction to (0,0,-1,0) doesn't seem to have an impact.

 

What should happen:

reflection should take mesh face normal into account when deciding direction.

 

As a workaround we can export the plane with face z up and rotate 180 degrees.

Link to comment
  • 3 weeks later...

If you want reflective surface to reflect what's beneath it, you need to set Plane to (0,0,-1,0). However, it would work only if the reflective mesh was exported in the origin of the world coordinates or in local coordinates (for example, Center option). In this case, reflections are fine (see the attachment).

 

Otherwise, you have to manually set the offset (the forth value of Plane expression) that defines how far from the world origin the reflective mesh is along its surface normal.

For example, if the floor is at zero, and the ceiling above it is exported in world coordinates, the offset will be the height of walls. Let's say, it's 3 meters. Thus, you need to set the Plane to (0,0,-1,3).

 

Judging by description, the problem lies in this. So it is much easier to reexport the ceiling and let the engine take care of reflection transformations automatically.

post-13-0-80204500-1314016351_thumb.jpg

post-13-0-89804600-1314016361_thumb.jpg

Link to comment
×
×
  • Create New...