Jump to content

vex of Lens Shader for Dome camera


Recommended Posts

Here is part of "Domemaster3D" for Mental ray, it is open source.

https://github.com/zicher3d-org/domemaster-stereo-shader/blob/master/mentalray/original/domeAFL_2013/sources/domeAFL_WxH.c

 

 

I would like to ask this part

 
/* Convert ray from camera space */
mi_vector_from_camera(state, &ray, &ray);
 /* Trace new ray... */
return(mi_trace_eye(result, state, &state->org, &ray));
 
 
 
How can I convert to Vex for houdini this part?
Based houdini help about lens shader..
  • export vector P – Ray origin in camera space

  • export vector I – Ray direction in camera space

How can I adjust metal ray code the line to vex with this variable?

Thanks

Edited by kidsreturnjj
Link to comment
Share on other sites

Hi kidsreturnjj.

I don't know enough Vex to be able to answer your question but the Houdini 13 notes did mention an ASAD Lens shader example exists so that might have the details you are looking for:
http://www.sidefx.com/docs/houdini13.0/nodes/shop/v_asadlens
 

 

I was wondering what your reason is to start with the domeAFL_WxH fulldome lens shader since the "diameter" and "height" interface controls are a bit counter intuitive. You would probably want to port a version of the domeAFL_FOV fulldome lens shader instead since the lens shader's "field of view" setting is easier to use and understand.

Link to comment
Share on other sites

  • 2 months later...

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...