Announcement

Collapse
No announcement yet.

OSL goodness in Vray

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

  • #16
    Originally posted by sharktacos View Post
    I looked in the release notes in the nightlies and I do not see this mentioned there. Where could I get a list of the changes to OSL that have been implemented?
    It is in the changelog for the 3.20 releases:

    (*) VRayOSLMtl/VRayOSLTex: Support for drop-down controls;

    The nightly builds release notes are pulled automatically from Mantis, but this is not very reliable.

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

    Comment


    • #17
      Originally posted by vlado View Post
      It is in the changelog for the 3.20 releases:

      (*) VRayOSLMtl/VRayOSLTex: Support for drop-down controls;

      The nightly builds release notes are pulled automatically from Mantis, but this is not very reliable.

      Best regards,
      Vlado
      Are you possibly referring to Max? I do see a 3.20 release for Max (which we don't use), but I only see 3.0 for Maya in the downloads section. Thanks

      Comment


      • #18
        sorry for that dumb question, but how to wire up the nodes in order to get the osl shader to work?

        Click image for larger version

Name:	Screen Shot 2015-07-20 at 00.26.21.jpg
Views:	1
Size:	504.1 KB
ID:	857887

        Comment


        • #19
          Originally posted by mayanic View Post
          sorry for that dumb question, but how to wire up the nodes in order to get the osl shader to work?

          [ATTACH=CONFIG]25163[/ATTACH]
          Depends on the OSL shader. Which one are you using? Most are meant to go in the reflection with Fresnel off on the material.

          Comment


          • #20
            I'm trying to get the complex_ior to run ...

            when i plug the shader nothing changes and i wonder where the interface is?

            Comment


            • #21
              Can you post an image of the OSLTex in the attribute editor? Do you get an error message when you load the OSL?

              Comment


              • #22
                i already posted a pics of my node editor / ae ...

                i just connected the osl-texture to my reflection color and plugged a osl-file in there
                but nothing happened

                Comment


                • #23
                  Originally posted by mayanic View Post
                  i already posted a pics of my node editor / ae ...

                  i just connected the osl-texture to my reflection color and plugged a osl-file in there
                  but nothing happened
                  You need to turn off the Use Fresnel button and change in VRayTexOSL in Color Output of result for Col_Out. The same as this:
                  Click image for larger version

Name:	TexOSL.png
Views:	1
Size:	46.5 KB
ID:	857899

                  I hope this helps.

                  Comment


                  • #24
                    Originally posted by doark View Post
                    You need to turn off the Use Fresnel button and change in VRayTexOSL in Color Output of result for Col_Out. The same as this:
                    [ATTACH=CONFIG]25185[/ATTACH]

                    I hope this helps.
                    Right. It would probably be good to update the shader from this:


                    output color Col_Out = color(0.5))
                    {
                    float thetaCos = abs(dot(-I,N));
                    float red=fresnel(n[0], k[0], thetaCos);
                    float green=fresnel(n[1], k[1], thetaCos);
                    float blue=fresnel(n[2], k[2], thetaCos);
                    Col_Out=color(red, green, blue);
                    }

                    to this:

                    output color result = color(0.5))
                    {
                    float thetaCos = abs(dot(-I,N));
                    float red=fresnel(n[0], k[0], thetaCos);
                    float green=fresnel(n[1], k[1], thetaCos);
                    float blue=fresnel(n[2], k[2], thetaCos);
                    result=color(red, green, blue);

                    }

                    that way it will work by default in Maya.

                    Comment


                    • #25
                      what about if you want to use the fabric one where will you connect it?
                      thx

                      Comment


                      • #26
                        Originally posted by hsz View Post
                        what about if you want to use the fabric one where will you connect it?
                        thx

                        just follow the instructions here:
                        http://docs.chaosgroup.com/display/O.../Fabric+shader

                        Comment


                        • #27
                          Im getting this error, where do I set up the path?

                          // Error: OSL shader error: OSL include path not set

                          Comment


                          • #28
                            Originally posted by sharktacos View Post
                            I tweaked it so it would work in Maya
                            hmm I did test it in maya 2014 and an older version of VRay, nightly pre 3.2.
                            do you know what it was that was causing problems in maya?
                            I'll test again later when we are all up to date here.

                            Comment


                            • #29
                              Originally posted by R2J2 View Post
                              hmm I did test it in maya 2014 and an older version of VRay, nightly pre 3.2.
                              do you know what it was that was causing problems in maya?
                              I'll test again later when we are all up to date here.
                              "Col_Out" needs to be called "result"

                              Comment


                              • #30
                                @mayanic:
                                Your problem is that you're using the wrong node type - VRayPluginNodeTex:TexOSL instead of VRayTexOSL.
                                If you create the correct node it will work as expected. After you change the output as mentioned by others.
                                Last edited by t.petrov; 28-07-2015, 02:58 AM.
                                V-Ray developer

                                Comment

                                Working...
                                X