Hi there, I am reposting this question here (I also made a thread for this under C4D plugins)
I am trying to create an OSL shader that simulates realistic diffraction grating - like you would find on CDs or holographic stickers. I would love help creating an OSL shader for this as I have very limited coding experience.
I have tried a lot of various approaches manually (without OSL shaders) to create the specific iridescent grating effect with some success, but unfortunately it is not accurate under all lighting conditions and breaks when viewed from certain angles. I have seen users of other 3D programs share diffraction grating OSL shaders, however they unfortunately don't work inside of Octane / C4D. I can share those OSL shaders if it would be a helpful jumping off point.
I imagine the OSL shader would plug into the "film" slot with black to white float values to control the effect.
Here are some examples of my faux grating effect I created using manual methods.
Any help would be greatly appreciated!
Thanks
Diffraction grating OSL Shader
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Hi,
I have already answered you in the c4doctane forum section:
viewtopic.php?f=30&t=80972&p=420214#p420214
ciao,
Beppe
I have already answered you in the c4doctane forum section:
viewtopic.php?f=30&t=80972&p=420214#p420214
ciao,
Beppe