Uploaded October 2023 | Updated September 2026, 2 weeks ago
EDIT:
Marcus Rizzo asked me if I can change the OSL Script to also respect "Inverted Normals" or the "Inside of Objects". And yes, of course. You can update your OSl by switching out your Dot Product line with:
float Falloff = dot (-I , faceforward (N , I ));
MESSAGE:
---------------------------------------------------
This week again something I stumbled on while brainin around the Opal shader.
A normal respecting falloff shader that is doing a great job at giving your materials a much more lifelike falloff because it respects Bump and Normal maps.
Its a very nerdy one and also is the first tutorial of mine that also ventures into OSL coding. As always I hope you like it and appreciate the effort.
If you have any Ideas for follow up tutorials, feel free to let me know in the comments.
FOLLOW ME ON SOCIAL MEDIA:
---------------------------------------------------
Twitter: twitter.com/RaphaelRau
Instagram: instagram.com/silverwingvfx
Behance: behance.net/silverwing-vfx
TRAINING:
---------------------------------------------------
If you want to learn Shading / OSL, I also offer 1:1 training. Contact me, if you are interested.
PATREON:
---------------------------------------------------
You can support me and the community by becoming a PATREON.
This helps me to keep all my content free and accessible to everyone.
patreon.com/silverwingvfx
Thank you so much for all my existing PATREONs for your generosity!
VIDEO RELATED LINKS:
---------------------------------------------------
OSL PDF: github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/doc/osl-languagespec.pdf
CHAPTERS:
---------------------------------------------------
00:00 Intro
00:42 Preview
03:12 Shading: Ray Direction and Normals
04:58 Chart Time: Dot Product 1
06:03 Chart Time: Dor Product 2
07:02 Shading: Applying the Dot Product
07:48 Shading: Shading Normals
07:00 Shading: Linearize the Falloff
09:56 Chart Time: Dot Product Non-Linearity
10:28 Shading: Arc Cosine
12:22 Shading: 90° into Radians
12:43 Shading: Applying the Radians Number
14:31 Chart Time: Radians and Application Explained
16:04 Scripting: OSL Shader
17:24 Scripting: Looking closely at the Add Script
18:24 Scripting: Creating the Falloff Shader
19:50 Scripting: The OSL PDF
21:00 Scripting: Using the Global Variables I and N
22:35 Scripting: Linerization using Arc Cosine
25:20 Scripting: Testing the finished Script
26:56 Outro
27:09 Patreon Thanks
28:56 Conclusion
EDIT:
Marcus Rizzo asked me if I can change the OSL Script to also respect "Inverted Normals" or the "Inside of Objects". And yes, of course. You can update your OSl by switching out your Dot Product line with:
float Falloff = dot (-I , faceforward (N , I ));
MESSAGE:
---------------------------------------------------
This week again something I stumbled on while brainin around the Opal shader.
A normal respecting falloff shader that is doing a great job at giving your materials a much more lifelike falloff because it respects Bump and Normal maps.
Its a very nerdy one and also is the first tutorial of mine that also ventures into OSL coding. As always I hope you like it and appreciate the effort.
If you have any Ideas for follow up tutorials, feel free to let me know in the comments.
FOLLOW ME ON SOCIAL MEDIA:
---------------------------------------------------
Twitter: twitter.com/RaphaelRau
Instagram: instagram.com/silverwingvfx
Behance: behance.net/silverwing-vfx
TRAINING:
---------------------------------------------------
If you want to learn Shading / OSL, I also offer 1:1 training. Contact me, if you are interested.
PATREON:
---------------------------------------------------
You can support me and the community by becoming a PATREON.
This helps me to keep all my content free and accessible to everyone.
patreon.com/silverwingvfx
Thank you so much for all my existing PATREONs for your generosity!
VIDEO RELATED LINKS:
---------------------------------------------------
OSL PDF: github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/doc/osl-languagespec.pdf
CHAPTERS:
---------------------------------------------------
00:00 Intro
00:42 Preview
03:12 Shading: Ray Direction and Normals
04:58 Chart Time: Dot Product 1
06:03 Chart Time: Dor Product 2
07:02 Shading: Applying the Dot Product
07:48 Shading: Shading Normals
07:00 Shading: Linearize the Falloff
09:56 Chart Time: Dot Product Non-Linearity
10:28 Shading: Arc Cosine
12:22 Shading: 90° into Radians
12:43 Shading: Applying the Radians Number
14:31 Chart Time: Radians and Application Explained
16:04 Scripting: OSL Shader
17:24 Scripting: Looking closely at the Add Script
18:24 Scripting: Creating the Falloff Shader
19:50 Scripting: The OSL PDF
21:00 Scripting: Using the Global Variables I and N
22:35 Scripting: Linerization using Arc Cosine
25:20 Scripting: Testing the finished Script
26:56 Outro
27:09 Patreon Thanks
28:56 Conclusion










