Announcement

Collapse
No announcement yet.

Stretch/compress map?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stretch/compress map?

    Hi,

    I've never really dabbled in shader writing, so I'm not sure what is and what isn't possible.

    My goal is to output edge stretch/compression (with delay, ideally) for a deforming polygon mesh to drive shader values. I can do this with SOuP but I'd prefer to do it rendertime. So I guess my question is: How much info about the mesh being rendered is accessible to (OSL?) textures/shaders? Can I 'record' all initial edge lengths into a sort of dictionary, and compare against those in the shader at rendertime?

    /Dan

  • #2
    I'm not sure if it's doable in OSL; we don't provide a lot of mesh information to OSL shaders. It is possible to do it with a regular C++ shader if you bake the original vertex positions in a color set, for example.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Might be a bit beyond my reach, but good to know it's possible. I guess the VRayVertexColors texture would be my best reference, but I can't locate it in the samples (vray/samples/vray_plugins/textures/)?

      Comment

      Working...
      X