Announcement

Collapse
No announcement yet.

VrayTexOSL limitations

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

  • VrayTexOSL limitations

    Hi all,

    We're designing a new workflow to make a procedural texture which is achieved by authoring an OSL shader via VrayTexOSL and then plugging it into a VrayMtl or SSS. In concept it is working exactly as expected, however due to some VrayTexOSL limitations we have kind of hit a roadblock.

    The first issue is that I can't directly connect attributes. I've created 15 input matrices (well, 4x15 vectors which specify a projection matrix, due to the limitation that matrices can't be in shader input arguments) and tried to make connections from 15 orthogonal camera matrices, however the node can't be driven or keyframed at all. Is this possible to solve without making an ugly callback in Maya to change the values on frame changed?

    The second issue is that I'd like to use a second UV set for displacement. Now I know VrayMtlOSL doesn't support the displacement shader, but it seems to support it if I use a VrayTexOSL, however I can't seem to change the UV set for this. What would be nice is to have the ability to have access to all uvCoords in the OSL Tex shader (like u, v, there could be u2, v2 or perhaps an array for any that are not the first one) or at least a way to specify the set that you want using uvChooser (which would be fine for us in this use case).

    I haven't tried UVs in 3DS Max yet to see if it is working there, but I'm pretty sure I can't use param wires to drive input arguments.

    Kind regards
    -Alex

  • #2
    Originally posted by il_alex View Post
    The first issue is that I can't directly connect attributes. I've created 15 input matrices (well, 4x15 vectors which specify a projection matrix, due to the limitation that matrices can't be in shader input arguments) and tried to make connections from 15 orthogonal camera matrices, however the node can't be driven or keyframed at all. Is this possible to solve without making an ugly callback in Maya to change the values on frame changed?
    We are working on adding support for connecting parameters directly, but I'm not sure if we can add support for connecting matrix parameters. We have to research this.
    About the issue with keyframing - this is a separate issue and I've logged it in our issue tracker.

    Originally posted by il_alex View Post
    The second issue is that I'd like to use a second UV set for displacement. Now I know VrayMtlOSL doesn't support the displacement shader, but it seems to support it if I use a VrayTexOSL, however I can't seem to change the UV set for this. What would be nice is to have the ability to have access to all uvCoords in the OSL Tex shader (like u, v, there could be u2, v2 or perhaps an array for any that are not the first one) or at least a way to specify the set that you want using uvChooser (which would be fine for us in this use case).
    If you need just a single channel then this is easily doable.
    I'm not sure about the case where a shader needs to access multiple uv channels, but I guess such cases are rare.

    Hopefully for 3.20 we'll have a lot better integration of OSL in V-Ray for Maya.
    V-Ray developer

    Comment


    • #3
      Originally posted by t.petrov View Post
      We are working on adding support for connecting parameters directly, but I'm not sure if we can add support for connecting matrix parameters. We have to research this.
      About the issue with keyframing - this is a separate issue and I've logged it in our issue tracker.
      For the direct matrix connections, it would be nice to have these as shader input arguments, but I can get around it by using 4 VectorProduct nodes to split it into 4 rows and (when the support is in place for TexOSL) plug them into vector slots for the shader arguments. Thank you for looking into this, the keyframe stuff would be dependent on the parameter connections I'd assume.

      Originally posted by t.petrov View Post
      If you need just a single channel then this is easily doable.
      I'm not sure about the case where a shader needs to access multiple uv channels, but I guess such cases are rare.

      Hopefully for 3.20 we'll have a lot better integration of OSL in V-Ray for Maya.
      Using the uvChooser node in Maya to set the texture map to a second uvSet doesn't seem to work in this case unfortunately. I'm using Vray for Maya v3.05.04, 25177.

      I think the cases may not be too rare, at least at a previous company I've worked for would use multiple UV sets to set different texture mappings and mixed them in a GLSL shader (it was for a video game to mimic how the game engine rendered but in the Maya viewport, re-creating the shader in VRay using OSL might be a valid use case, for instance). Good to hear 3.20 has improved OSL support!

      Kind regards
      -Alex
      Last edited by il_alex; 12-08-2015, 05:14 PM. Reason: Added the uvChooser node info.

      Comment


      • #4
        Originally posted by il_alex View Post
        ... the keyframe stuff would be dependent on the parameter connections I'd assume.
        Nope, it is a separate issue.

        Originally posted by il_alex View Post
        Using the uvChooser node in Maya to set the texture map to a second uvSet doesn't seem to work in this case unfortunately. I'm using Vray for Maya v3.05.04, 25177.
        Yes, I know, I've logged an issue to fix this. Fixing this would be easy.
        Adding a second uv channel is a bit more complex.
        But if we limit ourselves to 2d or 3d coordinates then it might be doable.

        Originally posted by il_alex View Post
        Good to hear 3.20 has improved OSL support!
        In fact at the moment I'm just gathering issues and I hope to find time to fix as many of them as possible before 3.20 is released.
        V-Ray developer

        Comment

        Working...
        X