Is there any way to turn off the reflection or refraction visibility of an object
so it doesn't appear on the other objects in octane for C4D?
Reflection visibility on the other objects
Moderators: ChrisHekman, aoktar
Wrong.mitchino wrote:No.
This will hide a material from reflections:
- Add an OSLTexture to Opacity
- Script category:
utils
Script presets:Raytype.osl
- set Ray to:
Reflection
- Swap:
check
Of course, as usual, Alpha shadows option needs to be enabled for opacity to work correctly.
Regards
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
- simowlabrim
- Posts: 11
- Joined: Sun Jun 10, 2018 9:17 am
milanm wrote:Wrong.mitchino wrote:No.
This will hide a material from reflections:
Same works for refractions, shadows, ambient occlusion, diffuse/caustics and camera by changing the Ray menu to a different option.
- Add an OSLTexture to Opacity
- Script category:
utils
Script presets:Raytype.osl
- set Ray to:
Reflection
- Swap:
check
Of course, as usual, Alpha shadows option needs to be enabled for opacity to work correctly.
Regards
Milan
Hello Milan, Thank you so much!
you just introduced me to a new world ''The Open Shading Language'', because this method worked fine, I would like if I can exclude them both ''Reflection+Refraction'' but I don't know how yet, Is there any way to do that?
in the meantime, I found this Otoy OSL documentation https://docs.otoy.com/osl/index.html I would love to read-practice it and see what I can do with this. please if there is any other OSL documentation source share it please so I can learn more about it. thanks again.
You can daisy chain multiple raytype nodes together, each with a different Ray option, by connecting them to input
As for learning OSL, I started by deconstructing the existing scripts and changing some parameters and replacing some values with sliders just to see what happens when I change something. I'm not a programmer at all. So I would highly recommend checking out the presets first and experiment!. When it comes to raytype even almost a year later I'm still finding completely new ways to use it. OSL is really just 95% creativity and 5% coding.
For a good basic introduction, even if you skip all of the boring coding/math parts, here's a few links that really helped me:
If I could go back in time I would give myself this pdf from an old Renderman repository website:
https://github.com/tlanc007/RenderMan_R ... urse21.pdf
OSL is a descendant of RSL (most of the code actually works without changes) so I would leave GLSL and Shadertoy for later. This is from '92 but most of the concepts from there are in almost every single shader on shadertoy. It's really fundamental stuff. That entire repository is pure gold.
Also these videos from Zap are a great introduction, especially Lesson-3:
https://www.dropbox.com/s/mzzuu96rsr1ul ... D14EkwhYQA
https://www.youtube.com/watch?v=1e13oLq ... dex=7&t=0s
Regards
Milan
A
like this:
So, basically you can just ctrl-drag that OSLTexture node, connect it in the input A
of the first one and change the Ray to Refraction. That will now hide that material in both refractions and reflections.As for learning OSL, I started by deconstructing the existing scripts and changing some parameters and replacing some values with sliders just to see what happens when I change something. I'm not a programmer at all. So I would highly recommend checking out the presets first and experiment!. When it comes to raytype even almost a year later I'm still finding completely new ways to use it. OSL is really just 95% creativity and 5% coding.
For a good basic introduction, even if you skip all of the boring coding/math parts, here's a few links that really helped me:
If I could go back in time I would give myself this pdf from an old Renderman repository website:
https://github.com/tlanc007/RenderMan_R ... urse21.pdf
OSL is a descendant of RSL (most of the code actually works without changes) so I would leave GLSL and Shadertoy for later. This is from '92 but most of the concepts from there are in almost every single shader on shadertoy. It's really fundamental stuff. That entire repository is pure gold.
Also these videos from Zap are a great introduction, especially Lesson-3:
https://www.dropbox.com/s/mzzuu96rsr1ul ... D14EkwhYQA
https://www.youtube.com/watch?v=1e13oLq ... dex=7&t=0s
Regards
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
Hi there,
hey Milanm
Just to let you know about another flavor of the raytype osl utility shader, maybe more handy in some cases :
viewtopic.php?f=21&t=71597
hey Milanm

Just to let you know about another flavor of the raytype osl utility shader, maybe more handy in some cases :
viewtopic.php?f=21&t=71597
Pascal ANDRE
- simowlabrim
- Posts: 11
- Joined: Sun Jun 10, 2018 9:17 am
Hello guys,
Thank you Milan for the info you provided I'll check them all on the next days.
I would like to thank also Calus, but unfortunately, the script you provided is not working 100%, it has some Opacity issues to fix yet, but you inspired me to use better the Milan Method...
I created this little Shading network to better Exclude the Refraction and Reflection of an object on the other objects and have more control over them. it is working really well!
is there any chance you fix the opacity issue on your OSL script? or if is there a way to group that shading network in one window and make it with just one output that I can attach to Any Material Opacity?
for now, the LiveDB material I attached here is working fine!
thank you guys.
Insall the LiveDB Material: Copy and Past here C:\Users\YourPcName\AppData\Roaming\OctaneRender\localDb
Thank you Milan for the info you provided I'll check them all on the next days.
I would like to thank also Calus, but unfortunately, the script you provided is not working 100%, it has some Opacity issues to fix yet, but you inspired me to use better the Milan Method...
I created this little Shading network to better Exclude the Refraction and Reflection of an object on the other objects and have more control over them. it is working really well!
is there any chance you fix the opacity issue on your OSL script? or if is there a way to group that shading network in one window and make it with just one output that I can attach to Any Material Opacity?
for now, the LiveDB material I attached here is working fine!
thank you guys.
Insall the LiveDB Material: Copy and Past here C:\Users\YourPcName\AppData\Roaming\OctaneRender\localDb
Thanks for debugging ! or maybe this is just it has to be used another way, I will check this and try to fix or provide usage example.simowlabrim wrote: the script you provided is not working 100%, it has some Opacity issues to fix yet,
Pascal ANDRE
Hey Pascal
That's a great idea, as always! I'm writing this in a hurry so I apologize for not being able to thank you properly.
All you have to do to fix the "issue" is remove the "/6". You don't need it. Also in my tests actually max() operation worked better than +.
I'll be back over the weekend with more stuff and examples. And I have some normal mapping scripts to release that I've been working on for a while. (also I have some answers for that topic from James / baltort).
Thank you so much for taking the time to write that version, not quite what I had in mind when I said "replacing some values with sliders just to see what happens" though
Cheers
Milan
That's a great idea, as always! I'm writing this in a hurry so I apologize for not being able to thank you properly.
All you have to do to fix the "issue" is remove the "/6". You don't need it. Also in my tests actually max() operation worked better than +.
I'll be back over the weekend with more stuff and examples. And I have some normal mapping scripts to release that I've been working on for a while. (also I have some answers for that topic from James / baltort).
Thank you so much for taking the time to write that version, not quite what I had in mind when I said "replacing some values with sliders just to see what happens" though

Cheers
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780