Creating new iRay shaders?

Back before I took a break from rendering, I was starting to learn programming of Renderman based shaders. In particular, I had an idea about adapting Pixar's hair shader to our transmapped hair products. Since iRay is the engine of choice now, I was wondering if there are resources for creating new custom shaders for this engine?

Comments

  • The official nVidia MDL (shader languange used by Iray) refrence is https://www.nvidia.com/en-us/design-visualization/technologies/material-definition-language/

  • JonnyRayJonnyRay Posts: 1,744

    Thanks, Richard. I should have thought of looking at nVidia's site. MDL doesn't look too bad. Similar enough to RSL. But I'll also have to figure out how to get MDL into DAZ Studio eventually. :)

  • If the MDL file is in a mapped MDL Directory (set from the Edit menu of Shader Mixer) you can just drag it in - hold Alt while doing so to add a parameter brick.

  • JonnyRayJonnyRay Posts: 1,744

    Totally blanked on Shader Mixer. I used to use Shader Builder exclusively, but since that's RSL only wasn't working out for me. I need to take some more time poking around before I ask these questions. :(

  • JonnyRayJonnyRay Posts: 1,744

    I have to admit that my learning has been challenged. The reference manual is really good. But there are precious few actual tutorials on writing / using the APIs. Most searches for MDL authoring tutorials end up being directed to Substance Desginer. Which seems like a very cool product, but it's hard to justify that cost for a hobbiest.

    For instance, I have some ideas about shaders that would be affected by the geometry of the surface they are applied to. However it's very difficult to find any references to how I would create an MDL surface that looks at the mesh of the object.

  • oomuoomu Posts: 175

    would it be possible to create a real procedural fur/hair shader for iray ?

  • JonnyRayJonnyRay Posts: 1,744

    Probably not with the technology we have today. The reason is because Iray shaders are technically material settings. Other than displacement (like Oso does in his procedural fur shader), there aren't any tools right now to create new geometry.

    That said, the latest updates to Iray (which are being tested in the beta version of Studio) include support for polylines. Polylines are how most higher end tools create and work with hair. since they are a collection of points rather than full geometric objects they are more lightweight for the rendering engine to process. So, we can be hopeful that at some point in the future polyline based hair / fur may be a reality for Studio.

  • hphoenixhphoenix Posts: 1,335
    JonnyRay said:

    Probably not with the technology we have today. The reason is because Iray shaders are technically material settings. Other than displacement (like Oso does in his procedural fur shader), there aren't any tools right now to create new geometry.

    That said, the latest updates to Iray (which are being tested in the beta version of Studio) include support for polylines. Polylines are how most higher end tools create and work with hair. since they are a collection of points rather than full geometric objects they are more lightweight for the rendering engine to process. So, we can be hopeful that at some point in the future polyline based hair / fur may be a reality for Studio.

    This isn't quite accurate.  Shaders have been used for hair/fur for quite a while.  The issue is that while Renderman and 3DeLight both support microdisplacement (where the polygon is subdivided by the shader and the newly created vertices are used) while Iray does not (it's Physcially Based Rendering, so it's not going to let you re-define the mesh within the shader.)

    There are some tricks to get around some of it.

    Polylines are still geometry.  And enough to make decently dense hair or fur will be a BIG chunk of memory.  They're great for realism, though.....once DS has proper full support for them (right now, at least one report has them crashing DS if you try to dForce simulate on them.)

    Part of the reason we use shaders is to simplify a scene where detail is needed but we don't want to model in every little bit.  Textures?  Normal/Bump maps?  Displacement maps?  All part of, and handled by, the shaders.  But fur is a little tricky to simulate when the shader is designed around being physically-based.

     

Sign In or Register to comment.