Announcement

Collapse
No announcement yet.

VRayGLSLTex for Maya?

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

  • VRayGLSLTex for Maya?

    Hello,

    I'm looking to write a custom shader for V-Ray for Maya. I've found the VRayGLSLMtl in Maya which looks really good, but can't see the VRayGLSLTex - is it available in Maya?

    If not, what's the next best way of writing a custom shader (before OSL is available) ?

    Thanks!

    Lindsey

  • #2
    What version of Maya and V-Ray are you using?
    The VRayGLSLTex should be available in the 2.45 night builds, but I don't think it is available in 2.40 unfortunately.
    V-Ray developer

    Comment


    • #3
      Ok thanks - I'm using 2.25 at the moment so perhaps I'll see if I can get the latest nightly and see if I can use it from there.

      Thanks very much!

      Lindsey

      Comment


      • #4
        Thanks very much for the help - I now have the VRayGLSLMtl and VRayGLSLTex available which is great.

        So I have a few questions about using GLSL shaders with vray for maya:
        - As GLSL is for OpenGL graphics drivers are there any hardware requirements when using these shaders? Or is it a software implementation of the language? Are there any limitations related to using the GLSL shaders?
        - I have used the examples in the online help to test materials using VRayGLSLMtl, but haven't managed to get any texture displacements working in GLSL, is there a simple example for that? Presumably I need to add the code in the VRayGLSLTex shader, but I've tried to use a simple GLSL displacement shader and it won't compile... any advice?

        Thanks very much - any help is much appreciated!

        Lindsey

        Comment


        • #5
          Originally posted by AardmanCGI View Post
          Thanks very much for the help - I now have the VRayGLSLMtl and VRayGLSLTex available which is great.
          - As GLSL is for OpenGL graphics drivers are there any hardware requirements when using these shaders? Or is it a software implementation of the language? Are there any limitations related to using the GLSL shaders?
          It is purely software implementation and doesn't have any hardware requirements.

          Originally posted by AardmanCGI View Post
          Thanks very much for the help - I now have the VRayGLSLMtl and VRayGLSLTex available which is great.
          - I have used the examples in the online help to test materials using VRayGLSLMtl, but haven't managed to get any texture displacements working in GLSL, is there a simple example for that? Presumably I need to add the code in the VRayGLSLTex shader, but I've tried to use a simple GLSL displacement shader and it won't compile... any advice?
          I'm not sure I understand this question.
          Can you describe in more detail what exactly do you want to achieve?

          As far as I know you can use VRayGLSLTex as any other texture in V-ray, so it should work if you plug it in the displacement nodes.
          I'm not sure that it is possible to implement your own version of displacement in GLSL, because in VRayGLSLMtl and VRayGLSLTex
          you can write only fragment shader type of code. Vertex, geometry and tessellation shaders are not possible.

          Hope it helps.
          V-Ray developer

          Comment


          • #6
            You should be able to use a GLSL texture as a displacement texture; I haven't tried it though, will do that.

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

            Comment


            • #7
              Thanks very much - that's really helpful.

              I am testing the VRayGLSLTex to try using it for displacement. I'm connecting the outAlpha to the displacement shader and I'm finding it just balloons the object (whatever value I output from gl_FragColor in my code). This still happens even when I put the displacement shader's scale to 0.0. Any idea where I'm going wrong?

              Click image for larger version

Name:	beforeGLSLTex.jpg
Views:	1
Size:	35.7 KB
ID:	850895Click image for larger version

Name:	afterGLSLTex.jpg
Views:	1
Size:	41.1 KB
ID:	850896

              Thank you!

              Lindsey

              Comment


              • #8
                Hm, it seems that there is some problem in the translator and it won't work.
                I'm looking at it and I'll see if I can fix it.
                V-Ray developer

                Comment


                • #9
                  This issue should be fixed in the next night build coming tomorrow.
                  Please test and report if there are any more problems with it.

                  Sorry for the inconvenience.
                  V-Ray developer

                  Comment


                  • #10
                    No worries, thank you for fixing it - I'll get the new nightly and then give it a try.

                    Thanks very much for the help,

                    Lindsey

                    Comment

                    Working...
                    X