iamjaideep80 Posted August 13, 2005 Share Posted August 13, 2005 Hi Everybody, I am trying to creat Renderman Shaders using VEX network. But i don't know how to use Raytracing in VEX. How to get a TRACE function here in VEX ,like in RSL. Or is that, we have to do something else. Thanking in advance........ ...... Jaideep Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 13, 2005 Share Posted August 13, 2005 This is from the vex help html doc. If you are working in VOPs there is a ray trace vop or in code use the below. # void trace(vector &cv, &of; float ⁡ vector P, D; float bias, max_contrib, [options]) This function will send a ray starting at P and in the direction specified by the normalized vector D. The resulting color, opacity and alpha will be returned. The bias parameter is typically a small number which is used to prevent self-shading of the trace() function. The max_contrib parameter is used to give the renderer an idea of how much the result of the trace() call will contribute to the resulting pixel color. The max_contrib parameter has no effect on the results of the trace() call. # float rayhittest(vector P, D; float bias, [ options]) float rayhittest(vector P, D; vector &pHit, &nHit; float bias, [options]) This function will send a ray from the position P along the direction specified by the direction D. The length of the D vector represents the farthest distance considered when check for occlusion. The function will return the distance to the object intersected. If no object is hit, the distance will less than 0. If pHit and nHit are specified, they will be set to the position and normal of the hit surface. Note: Though it is possible, in many cases, the area sampling features will not produce usable results with the rayhittest() function. Quote Link to comment Share on other sites More sharing options...
iamjaideep80 Posted August 16, 2005 Author Share Posted August 16, 2005 Thank u very much for ur immediate Reply...... Jaideep Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.