Jump to content
Sign in to follow this  
Wolfwood

Ray labels with VEX.

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

Share this post


Link to post
Share on other sites

Hey Wolfwood,

This is a pretty cool idea, well done! Of course it's second prize to hijack something intended for another purpose, but I guess if push comes to shove, this'll do it!

Thanks for the tip!

Jason

Share this post


Link to post
Share on other sites
Of course it's second prize to hijack something intended for another purpose, but I guess if push comes to shove, this'll do it!

Hehe first prize goes to SESI when they put in similar functionality. :P

jim.

Share this post


Link to post
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); //

}

}

Share this post


Link to post
Share on other sites

I was just trying to mimic ray labels in general. However, I think your way would be a lot better for SSS. :D

VEX cleverness...yummy. :P

jim.

Share this post


Link to post
Share on other sites

Then again couldn't you just use

string coolname = getobjectname() ;

yummy_color = reflectlight(P, N, "scope", coolname,....);

jim.

Share this post


Link to post
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:

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×