MantraRenderManMappings
From Odwiki
Renderman Shading Language can be translated to VEX quite easily.
Syntactical Differences
There are a few syntactical differences to be aware of when you're translating from RSL to VEX. Here is a few of them:
- dot product. eg. RSL uses 'N.L' and VEX uses 'dot(N,L)'. In VEX the '.' is strictly used for subscripting an array element
- array syntax. Please see VEX's array syntax. Help > VEX > Arrays (http://www.sidefx.com/docs/houdini9.5/vex/arrays)
Mappings
Here are some equivalence tables for mapping expressions from VEX to RSL and vise-versa. Their values are understood to be functionally equivalent, but not necessarily "identical". Multiple expressions inside a single cell represent different ways of expressing the same value in a given language.
Many of these are defined in the include file shipped with Houdini here: $HIH/houdini/vex/include/prman.h. You can include these mapping in your source code but it is good to be aware of them.
#include "$HIH/houdini/vex/include/prman.h"
An official version of this table exists in the Houdini documentation under Help > Shading > Transitioning Between VEX and RSL (http://www.sidefx.com/docs/houdini9.5/shade/transitioning)
Partial Derivatives and Differentials
| VEX | RSL |
|---|---|
| dPds Du(P) | dPdu * du Du(P) * du |
| dPds / Du(s) Du(P) / Du(s) | dPdu Du(P) |
| Du(s) | du |
| s | u s (at default) |
| dPdt Dv(P) | dPdv * dv Dv(P) * dv |
| dPdt / Dv(t) Dv(P) / Dv(t) | dPdv Dv(P) |
| Dv(t) | dv |
| t | v t (at default) |
| not available | Deriv(a,b) |
| [H9] dPdTime | dPdtime * dtime (?) |
| [H9] not available (?) | dtime |
| [H9] Time | time |



