Originally posted by hsz
View Post
Announcement
Collapse
No announcement yet.
OSL goodness in Vray
Collapse
X
-
Originally posted by t.petrov View PostAre 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.
Comment
-
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.
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
-
Originally posted by mayanic View Postthere is a node (Create > V-Ray > Create form V-Ray Plugin) called OSLTex. should i use that one?
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
-
Originally posted by mayanic View Posthaha - 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?
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
-
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.
Comment
-
Comment
-
Originally posted by sharktacos View PostAs 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
-
Originally posted by sharktacos View PostFrom what I can tell, it looks to me like[COLOR=#000000] 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.
Best regards,
VladoI only act like I know everything, Rogers.
Comment
Comment