Jump to content

Ray labels with VEX.


Wolfwood

Recommended Posts

For those of you who are fimilar with PRMan's ray labels you might want to check out this thread.

http://www.sidefx.com/forum/viewtopic.php?t=923

Its a poor man's version of how I think PRMan's ray labels work. Its a hack but it works and I provided a simple example. :ph34r: If you have any questions or flames let send 'em my way.

jim.

Pizza is calling me.... :P

Link to comment
Share on other sites

Not sure...but what if....

surface sss (

blabla = 0.8;

balbal = 0.2;

WhoAmI = "SSSObject1"; //object name

)

{

...

...

...

if (getraylevel() != 0 && getobjectname() == WhoAmI)

// secondary ray caused by irradiance call from THIS object

{

....

....

....

Cf = ambient + diffuse ; // simple BRDF...

}

else

// primary ray or secondary ray from unknown object (reflection,refraction...)

{

....

....

....

....

Cf = ambient + diffuse + specular + irradiance(P, -N); //

}

}

Link to comment
Share on other sites

It was hard to understand the sense

of the getobjectname function at 1 A.M. :ph34r::blink:

But it looks like irradiance(....."scope", getobjectname()) works properly. :D

It would be cool if there was

string getobjectname(int RayLevel) function in Houdini 6.5 :unsure:

Link to comment
Share on other sites

Yeah, we did - twice. You can get pretty far but we ran into accuracy and aliasing issues when we tried to treat the i3d as a photon map type of concept - and had to cope with deforming objects. You can get pretty good results on rigid objects, though. We didn't have time to finish it off before another project came in and took us away. It was a very interesting and fun exercise.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...