RSL Shaders in Eilir

212,778pages on
this wiki
Add New Page
Add New Page Discuss this page0

Suppose you are trying to set up a very basic shader in Eilir:

surface myshader() { /* output */ Oi = Os; Ci = Oi * Cs; }

As a normal function node, set it up in eilir like this:

Image 1 1011965

(You can't see the O_in parameter, but it looks like the C_in except it is a float instead of a color).

This node would have two inputs and two outputs, it would not render unless plugged into a root.

As a root node:

Image 2 1011965

It has no outputs because it is the root node, but it sets the final value of Oi and Ci as is expected from a surface shader. This node would appear such in eilir with just the two inputs. To these inputs you could any other function nodes: textures, granite,etc.

Do not use Cs or Os directly in your code. Use general parameters and plug in the mapped_cs and mapped_os node instead, as they are specially hard coded to handle the special cases of Cs and Os.

A thing to remember is that RSL is very similar to C at least in its syntax. Chances are if you can compile it in an RSL compatible compiler (like 3delight) then your shader is viable. What remains is the hard work of seeing the code and translate it to Eilir.

Also RSL has Surface Shader Variables, Displacement Shader Variables, Light Shader Variables and Volume Shader Variables and this variables must be used according to RSL standards, so these variables must remain as they are (i.e. Oi, Ci, etc,etc) so this give us a stepping stone towards translation....

What remains to be seen is how locked is the 3delight engine that DAZ uses...

Here is a link to the Renderman Academy; [1]

This link provides at least some of the variables so that when you are looking at a piece of code you may know what it is trying to output... but the catch is how to convert them to inputs like those in Eilir.

Some general guidelines for nodes from rsl shaders:

  • Where possible develop functions instead of roots, this allows the most flexibility
  • When copying code over from an rsl shader, include any copyright information and note where you have made changes
  • If the shader involves pattern generation consider separating out the pattern code into a different function node. Do this especially if the pattern is the only novel part of the shader, and it otherwise uses standard specular,diffuse, etc.
  • If the shader requires includes, place them under the shaders folder and reference them from this folder. Be careful with included function names, to make sure they do not conflict with others. A modify set of includes from Advance Renderman set is already available in eilir as: "#include "/Eilir/includes/eilir_arman/eilir_aram_include.h". If the order of includes is important make a separate include that has the includes in order, as Eilir does not include in any particular order. Recursive includes do not usually work.

Example rsl shaders:

Also on Fandom

Random wikia