Search code examples
shaderscenesurfacenormalshoudini

SideFX Houdini per pixel surface position and normals through whole scene


how can I get per pixel all surface positions and normals of the whole scene.

I don't want to stop at the first hitten surface. I need to get information about all object.

For example a cube is in front of the sphere. The camera position just shows the cube - the sphere gets at that camera position by the cube. My output of every pixel position of my camera rendered image data gives me information of the surface position in world space and the normal of the cube at the first hit. Then again for the other side of the cube. Then the two surfaces of the sphere.

How can that be achieved?

Thanks


Solution

  • In Vex, you can use intersect_all to get all the intersections along a ray, and gather information about the surface, such as normals, using primuv.