ray trace?

   3060   3   0
User Avatar
Member
313 posts
Joined: July 2005
Offline
Hi! I am a CG student .
I just downloaded a rtrace shader(rman). I am going to do some ray trace reflection in Houdini. Does anyone know how I can activate the raytrace function (for rman) in Houdini?
Any help will be appriciated!

surface rtrace (float Kr=0.25)
{
normal Nn = normalize(N);
vector In = normalize(I);

color Ct;
if (Nn.In < 0) {
vector r = reflect(In,Nn);
Ct = Kr*trace(P, r);
}

Ci = Cs + Kr*Ct;

Oi = Os;
Ci *= Oi;
}
User Avatar
Member
276 posts
Joined: July 2005
Offline
I believe you can turn on raytracing for RenderMan by setting the “Reflect/Trace Visibility” mask in the RenderMan ROP to ‘*’. It's about half-way down the ‘Specific’ tab. You can set it to the specific objects you want to ray trace or “*” for everything.

Take care,
George.
User Avatar
Member
313 posts
Joined: July 2005
Offline
George,
Thank you for your reply!
I did put “*” on “visible Reflection/Trace” but the rendered image looks quite weird! Its looks like the geometry is filled with long regtangles and squares.

Do you know why?
User Avatar
Member
276 posts
Joined: July 2005
Offline
Sorry, I can't tell off hand what might be going on. A good way to debug such things is to simplify your geometry as much as possible to still get the error. Then generate a RIB file from Houdini and render it manually. Step through the RIB to make sure it is as you expect and try to eliminate possibilities that way.

Good luck.

George.
  • Quick Links