Diffraction grating OSL Shader

Generic forum to discuss Octane Render, post ideas and suggest improvements.
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
Post Reply
adzrozanski
Licensed Customer
Posts: 10
Joined: Wed Apr 12, 2017 9:30 pm

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
Attachments
DifGrating_v002_A.png
DifGrating_v002_0014.png
Post Reply

Return to “General Discussion”