Announcement

Collapse
No announcement yet.

OSL goodness in Vray

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

  • #31
    Originally posted by hsz View Post
    Im getting this error, where do I set up the path?

    // Error: OSL shader error: OSL include path not set
    Did you work out why this was happening? Same thing here, can't find any info on it...

    Comment


    • #32
      Are you both using the installer or are you using V-Ray from a network location?

      Do you have a variable like VRAY_OSL_PATH_MAYA2014_x64 set?
      It should point to the folder that contains oslutil.h and stdosl.h files.
      V-Ray developer

      Comment


      • #33
        Originally posted by t.petrov View Post
        Are you both using the installer or are you using V-Ray from a network location?

        Do you have a variable like VRAY_OSL_PATH_MAYA2014_x64 set?
        It should point to the folder that contains oslutil.h and stdosl.h files.
        Network location here - that explains it..! Thx

        Comment


        • #34
          Network locations as well. Thank you for your response!

          Comment


          • #35
            Originally posted by t.petrov View Post
            @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.
            sorry for the delay
            i still don't get the k value to show up

            there is a node (Create > V-Ray > Create form V-Ray Plugin) called OSLTex. should i use that one?

            Comment


            • #36
              Originally posted by mayanic View Post
              there is a node (Create > V-Ray > Create form V-Ray Plugin) called OSLTex. should i use that one?
              Nope, just used the VRayTexOSL node that is available in the HyperShade windows.
              The menu 'Create > V-Ray > Create form V-Ray Plugin' should be used to create nodes very rarely and for very special purposes.
              Creating OSL nodes is not one of them.
              V-Ray developer

              Comment


              • #37
                haha - that was easy
                THANKS

                one more question - i don't get n1, n2 and n3 values from websites like refractive index? so one has to guess what green and blue values to choose?

                Comment


                • #38
                  Originally posted by mayanic View Post
                  haha - that was easy
                  THANKS

                  one more question - i don't get n1, n2 and n3 values from websites like refractive index? so one has to guess what green and blue values to choose?
                  It should reference the website refractiveindex.com, but the process for colored metals like gold is quite complex, so I made a little tutorial about it: http://docs.sharktacos.com/misc.php?action=help&hid=66

                  If you scroll down to the section Artist Friendly Metal reflections (texture) you'll get an explanation of how to set it up, and why (at east as far as my non-physicist brain was able to comprehend from the info I've learned on these forums). Here's the relevant part of the tutorial:

                  The visible spectrum of light is measured in wavelengths. The human eye can see wavelengths from about 390 to 700 nanometers (nm). Because metals such as gold have colored reflections, we need to input the wavelength values for red, green, and blue to get the corresponding IOR values. Using this Wavelength to RGB calculator we can see that red is 645, green is 510, and blue is 440. Next we go to http://refractiveindex.info, choose the measured data we want (for example gold) and enter the wavelength we got for red, green and blue. These are in nanometers (nm), but refractiveindex.info wants micrometers (µm) which would be red 0.645, green is 0.51, and blue is 0.44. From this we will get the n and k values for the red, green, and blue wavelengths which we can then input into our complex_ior shader. For example, here are the values for gold:

                  n:
                  0.18627, 0.75314, 1.4324
                  k: 3.3758, 1.9238, 1.7915

                  Comment


                  • #39
                    The OSL's seem to transfer with DR on to nodes as an asset, but blackout during rendering, have anyone tried using those shaders with DR on?

                    Comment


                    • #40
                      The OSL shaders transfer and render fine on our side.
                      Which V-Ray for Maya version are you using? Make sure that you are using identical V-Ray version on all nodes.
                      Last edited by Zdravko.Keremidchiev; 24-08-2015, 07:50 AM.
                      Zdravko Keremidchiev | chaos.com
                      Chaos Support Representative | contact us

                      Comment


                      • #41
                        Yeah, just recently updated everything to 3.1 ( linux nodes ), 2 nodes spit out black buckets, i belive issue on my end will triupple double check, my bad didn't phrase it correctly, i assumed it wasn't transferring osl's since i was getting black buckets. Thanks, hope it's just on my end.Click image for larger version

Name:	screenshot_2015-08-24.jpg
Views:	1
Size:	329.9 KB
ID:	858159

                        Comment


                        • #42
                          Alright, let me know if the issue still persist.
                          Zdravko Keremidchiev | chaos.com
                          Chaos Support Representative | contact us

                          Comment


                          • #43
                            As I understand it, subsurface has not been implemented in OSL for Maya (although it has in Max). Any idea when it might be ready?
                            I was thinking it would be neat to make an SSS shader with OSL that divides the scatter values up into R G and B.

                            Comment


                            • #44
                              Originally posted by sharktacos View Post
                              As I understand it, subsurface has not been implemented in OSL for Maya (although it has in Max). Any idea when it might be ready?
                              I was thinking it would be neat to make an SSS shader with OSL that divides the scatter values up into R G and B.

                              Just tried this with 3.1 and it looks like it's now in Maya. Yay!

                              I had a question about the implementation. The OSL closure is defined as
                              Code:
                              [COLOR=#000000]closure color [COLOR=#666699]vray_subsurface[/COLOR] (float refractiveIndex, float phaseFunction, color meanFreePath, color albedo);[/COLOR]


                              From what I can tell, it looks to me like meanFreePath = scatter color in the SSS2, and albedo = subsurface color. So how would one control the scatter radius? Is this simply a multiplier for the scatter color (i.e the meanFreePath)?

                              Also, how would one adjust the scatter subdivs in OSL? I tried adding an "int subdivs" variable to the sss closure but it does not appear to have any affect.

                              Last edited by sharktacos; 28-08-2015, 03:16 PM.

                              Comment


                              • #45
                                Originally posted by sharktacos View Post
                                From what I can tell, it looks to me like[COLOR=#000000] meanFreePath = scatter color in the SSS2, and albedo = subsurface color.
                                This is correct, yes.


                                So how would one control the scatter radius? Is this simply a multiplier for the scatter color (i.e the meanFreePath)?
                                Simply multiply the scatter color by the scatter radius to get the final meanFreePath value.

                                Also, how would one adjust the scatter subdivs in OSL? I tried adding an "int subdivs" variable to the sss closure but it does not appear to have any affect.
                                It looks like the global min. shading rate is the only way to control this.

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

                                Comment

                                Working...
                                X