If the colour swatches used float values instead of 0-255, can you not use the R values from the reflection calculator?
Announcement
Collapse
No announcement yet.
Complex fresnel using VRayOSLtex
Collapse
X
-
-
So, Reflectivity and Edgetint aren't N and K values, they are calculated from it. Which allows for easy picking and storing of the values. The falloff to white is handled by the shader. Haven't found a calculator for the colour values online, but the conversion is done with equation 14 and 15 from the paper.
Comment
-
I have no idea what this is all about, then
I thought that this osl texture should make the creation of realistic metals easier. So far I have always recreated the reflectance curves for each color component with the output curves from a falloff map. The results are great, but the process is tedious... I was expecting to just put the n and k values into the osl texture and there you go. Wishfull thinking
Comment
-
Well, you are welcome to contact the authors of the paper and explain this to themI was a bit puzzled myself what is the purpose of their work...
In any case, it is not too difficult to modify the shader to take n and k values directly instead of random colors - will see if I can do that if I get a bit of time.
Best regards,
VladoI only act like I know everything, Rogers.
Comment
-
That would be great Vlado! Sure would beat mapping the curves out by hand...
Although it would be even better if the two methods would work side by side. Essentially you could enter the rgb n and k values to get a starting point for 'reflectivity' and 'edgetint' and then switch over to 'artist friendly' color slots to tweak the color if needed. So if the client says, make that gold more rosy or less yellow - it would be easy and intuitive to do while still having physically correct starting point for the particular metal.
I hope that makes sense
Originally posted by vlado View PostWell, you are welcome to contact the authors of the paper and explain this to themI was a bit puzzled myself what is the purpose of their work...
In any case, it is not too difficult to modify the shader to take n and k values directly instead of random colors - will see if I can do that if I get a bit of time.
Best regards,
Vlado
Comment
-
-
Here is a shader that allows you to enter n and k values directly (for 0.65, 0.55 and 0.45 micrometers - you can get values directly from http://refractiveindex.info/)
Use as a reflection color map and make sure the Fresnel option in the VRayMtl material is disabled.
Best regards,
VladoAttached FilesI only act like I know everything, Rogers.
Comment
-
Originally posted by viscorbel View PostThat would be great Vlado! Sure would beat mapping the curves out by hand... Although it would be even better if the two methods would work side by side. Essentially you could enter the rgb n and k values to get a starting point for 'reflectivity' and 'edgetint' and then switch over to 'artist friendly' color slots to tweak the color if needed. So if the client says, make that gold more rosy or less yellow - it would be easy and intuitive to do while still having physically correct starting point for the particular metal.
Best regards,
VladoI only act like I know everything, Rogers.
Comment
-
Sure, that would be perfect
For now, I guess I'll just create a few preset maps for the most common metals manually and run them through a color correct node to slightly change the hue if needed for artistic purposes. I think that should work pretty well.
Thank you for the shader!
Originally posted by vlado View PostOr else, just have a drop-down with values from the refractiveindex website (copper, gold etc) so that you don't have to type those each time... would be much simpler
Best regards,
Vlado
Comment
-
Originally posted by vlado View PostHere is a shader that allows you to enter n and k values directly (for 0.65, 0.55 and 0.45 micrometers - you can get values directly from http://refractiveindex.info/)
Best regards,
Vlado
That's great Vlado!
you know I probably shouldn't have put n and k in there as those values need to be normalized to fit 0-255 (from refractiveindex.info) as was said. The idea is to make it easier to have a complex fresnel but be able to tweak those colours by eye.
just have a drop-down with values from the refractiveindex website (copper, gold etc) so that you don't have to type those each time...
even that thinFilm shader you wrote would be great to have some pre-sets for different materials.
Comment
Comment