08-25-2012 02:12 PM
I'm impressed of the speed of Intel Embree, but Embree contains not enough materials for me and I would like to write several shaders but I'm not sure, is it possible to make not BRDF material.
For example, I need a simplest shader that returns color = dot(I,N), where I is Eye verctor, directed from a shading point to a camera. N is a shading normal in a current shading point. I could easy implement it in renderman, vray or mental ray. But how to implement the shader like this in Embree?
08-27-2012 10:28 PM
Embree is not designed to be a full featured rendering engine, the included renderer is merely a sample implementation to demonstrate on howto use the ray tracing kernels. As the renderer is physically based, non BRDF materials are typically problematic.
What you could do without changing much code is putting a point light source at the camera location. However, as the Embree point light implements quadratic falloff you would have to modify it to add support for no falloff.
A second alternative would be to extend the material class with some additional shade call that simply does your calculation. You would have to modify the integrator to call this additional function and add the returned radiance.