Underwater caustics

Forums: Underwater caustics
Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)

Re: Underwater caustics

Postby milanm » Tue Mar 19, 2019 11:12 am

milanm Tue Mar 19, 2019 11:12 am
Yep, good old circular noise.

You can actually use the surface of the water as a "gobo". Back in V2 I used dirt in opacity but that produces a glich since V3 so I guess noise should do the trick for now.

Also, with raytype you can make the noise visible to shadow rays only . You can get some lovely caustics even in Ambient Occlusion mode.

256 samples only:
Image

Nodes.PNG


Btw. for the quick "fog" setup I just used a small plane in front of the camera and oriented towards the camera with this material: specular with no refraction + scattering medium. It's hard to see in the gif but there are some god rays there too. Super easy to setup and if you use emission instead of scattering it renders realtime on a single gtx780 in 1080p.

Cheers
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
milanm
Licensed Customer
Licensed Customer
 
Posts: 261
Joined: Tue Apr 30, 2013 7:23 pm

Re: Underwater caustics

Postby Whispermode » Tue Mar 19, 2019 11:29 am

Whispermode Tue Mar 19, 2019 11:29 am
milanm wrote:Yep, good old circular noise.

You can actually use the surface of the water as a "gobo". Back in V2 I used dirt in opacity but that produces a glich since V3 so I guess noise should do the trick for now.

Also, with raytype you can make the noise visible to shadow rays only . You can get some lovely caustics even in Ambient Occlusion mode.

Btw. for the quick "fog" setup I just used a small plane in front of the camera and oriented towards the camera with this material: specular with no refraction + scattering medium. It's hard to see in the gif but there are some god rays there too. Super easy to setup and if you use emission instead of scattering it renders realtime on a single gtx780 in 1080p.

Cheers
Milan


Thanks, Milan - this looks really good.

Just clarify some things for me, please:

1. On your first point, are you actually using the surface as a gobo, or just saying it can be done?
2. Is the method specific to OSL/C4D (the node setup is a C4D screenshot, right?)
3. Would you mind describing the lighting and surface setup?

Thanks in advance.
Whispermode
Licensed Customer
Licensed Customer
 
Posts: 126
Joined: Thu Aug 11, 2016 11:27 pm

Re: Underwater caustics

Postby milanm » Tue Mar 19, 2019 1:51 pm

milanm Tue Mar 19, 2019 1:51 pm
1. Yup, the surface of the water in that gif does have a texture in opacity just like the one from linograndiotoy.
2. It's just a node. Works everywhere where Octane is integrated (even in other engines that support OSL) The shader is from here.
3. It's just a daylight/sun. The water itself is casting shadows in the shape of the noise texture.

Here's how that might work in Blender.
It looks like the UI menu is replaced with integer numbers in the demo I'm using, If this is the same in the latest version you should complain to the plugin developer about that. The OSL script will work just fine regardless of UI and these are the settings I used:

BlenderNodes.PNG

Just for reference, the Ray input options are:
0 - Camera
1 - Shadow
2 - AO
3 - Diffuse
4 - Reflection
5 - Refraction

And it looks like the checkbox input is inverted compared to Standalone.

Water is animated so I didn't post an orbx example as usual--it would be huge. I'll see if I can reduce it to a single frame and post.

Cheers
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
milanm
Licensed Customer
Licensed Customer
 
Posts: 261
Joined: Tue Apr 30, 2013 7:23 pm

Re: Underwater caustics

Postby Whispermode » Tue Mar 19, 2019 2:38 pm

Whispermode Tue Mar 19, 2019 2:38 pm
milanm wrote:1. Yup, the surface of the water in that gif does have a texture in opacity just like the one from linograndiotoy.
2. It's just a node. Works everywhere where Octane is integrated (even in other engines that support OSL) The shader is from here.
3. It's just a daylight/sun. The water itself is casting shadows in the shape of the noise texture.

Here's how that might work in Blender.
It looks like the UI menu is replaced with integer numbers in the demo I'm using, If this is the same in the latest version you should complain to the plugin developer about that. The OSL script will work just fine regardless of UI and these are the settings I used:

BlenderNodes.PNG

Just for reference, the Ray input options are:
0 - Camera
1 - Shadow
2 - AO
3 - Diffuse
4 - Reflection
5 - Refraction

And it looks like the checkbox input is inverted compared to Standalone.

Water is animated so I didn't post an orbx example as usual--it would be huge. I'll see if I can reduce it to a single frame and post.

Cheers
Milan


This is awesome - much appreciated.

So, in layman's terms - because I know nothing about OSL/gobos/life in general - the following is happening:

Sunlight is being projected at a plane. The plane has holes in it in the shape of the noise pattern as it is plugged into opacity, therefore light hits the bottom of the pool in the desired pattern. How does the raytype node help?
Whispermode
Licensed Customer
Licensed Customer
 
Posts: 126
Joined: Thu Aug 11, 2016 11:27 pm

Re: Underwater caustics

Postby milanm » Tue Mar 19, 2019 2:43 pm

milanm Tue Mar 19, 2019 2:43 pm
Yup that's correct.

Raytype just makes sure that the surface of the water doesn't look like Swiss cheese. ;)

Cheers
Milan
Last edited by milanm on Tue Mar 19, 2019 2:57 pm, edited 2 times in total.
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
milanm
Licensed Customer
Licensed Customer
 
Posts: 261
Joined: Tue Apr 30, 2013 7:23 pm

Re: Underwater caustics

Postby linograndiotoy » Tue Mar 19, 2019 2:46 pm

linograndiotoy Tue Mar 19, 2019 2:46 pm
Very cool!


milanm wrote:Yep, good old circular noise.

You can actually use the surface of the water as a "gobo". Back in V2 I used dirt in opacity but that produces a glich since V3 so I guess noise should do the trick for now.

Also, with raytype you can make the noise visible to shadow rays only . You can get some lovely caustics even in Ambient Occlusion mode.

256 samples only:
Image

Nodes.PNG


Btw. for the quick "fog" setup I just used a small plane in front of the camera and oriented towards the camera with this material: specular with no refraction + scattering medium. It's hard to see in the gif but there are some god rays there too. Super easy to setup and if you use emission instead of scattering it renders realtime on a single gtx780 in 1080p.

Cheers
Milan
linograndiotoy
OctaneRender Team
OctaneRender Team
 
Posts: 1148
Joined: Thu Feb 01, 2018 7:10 pm

Re: Underwater caustics

Postby Whispermode » Tue Mar 19, 2019 3:06 pm

Whispermode Tue Mar 19, 2019 3:06 pm
milanm wrote:Yup that's correct.

Raytype just makes sure that the surface of the water doesn't look like Swiss cheese. ;)

Cheers
Milan


Ah, of course.

I'll try this out later. Just read your other thread on Raytype. Great work you've done here. Thanks so much.
Whispermode
Licensed Customer
Licensed Customer
 
Posts: 126
Joined: Thu Aug 11, 2016 11:27 pm

Re: Underwater caustics

Postby duskstudio » Tue Feb 04, 2020 5:46 pm

duskstudio Tue Feb 04, 2020 5:46 pm
Hey, sorry to pull this up after almost a year, but looking for some help.

Im trying to recreate the underwater setup in C4D and the caustics are working, but im struggling to get the reflections that can be seen on the underside of the surface? Any tips on how to achieve this and the raytype osl caustics at the same time?

Thanks!
duskstudio
Licensed Customer
Licensed Customer
 
Posts: 19
Joined: Tue Jan 10, 2017 1:38 pm
Previous

Return to Blender


Who is online

Users browsing this forum: orkindmitry and 14 guests

Fri Mar 29, 2024 7:12 am [ UTC ]