CGTalk > Software > Maxon Cinema 4D
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 11-22-2006, 07:53 AM   #1
mustardseed
Expert
 
mustardseed's Avatar
portfolio
Andrew Phang
Creative Director
Mustard Seed Creative
Singapore, Singapore
 
Join Date: Aug 2004
Posts: 864
Distance Falloff Shader?

Is there a shader that can apply colours from a gradient to a surface based on distance from the camera? I'm trying to simulate the way the ocean colour get deeper towards the horizon. The camera is animated from high angle (nearly bird's eye view) down to sea level pointing to horizon.

I've tried the Falloff shader but that doesn't seem to be tied to distance, only vector info...

Thanks in advance!
__________________
"...if you have faith as small as a mustard seed... Nothing will be impossible for you."
 
Old 11-22-2006, 08:27 AM   #2
moka.studio
*
 
moka.studio's Avatar
___________
Hamburg, Germany
 
Join Date: Mar 2003
Posts: 2,029
Quote:
Originally Posted by mustard seed
Is there a shader that can apply colours from a gradient to a surface based on distance from the camera? I'm trying to simulate the way the ocean colour get deeper towards the horizon. The camera is animated from high angle (nearly bird's eye view) down to sea level pointing to horizon.

I've tried the Falloff shader but that doesn't seem to be tied to distance, only vector info...

Thanks in advance!


you can use the gradient shader, setting the Type to: 'Linear',
Start 0 - 0 -0End 0 - (your distance) - 0
and 'Space:' to 'Camera'.
You could also mix this with a fresnel falloff to get an even better effect

edit: This does not exactly do what you want. I think Per's suggestion is much better, using the Falloff plugin / Fresnel, and if needed using an expresso rig to drive the distance parameter
__________________
moka

Last edited by moka.studio : 11-22-2006 at 08:36 AM.
 
Old 11-22-2006, 08:28 AM   #3
Per-Anders
helper bunny
 
Per-Anders's Avatar
CGTalk Forum Leader
portfolio
Per-Anders Edwards
Developer
The Third Party
USA
 
Join Date: Sep 2002
Posts: 12,748
the ocean gets deeper coloured the deeper it is, for that use the free "distance falloff" shader, (search at the sites listed on plugincafe.com), but you could also be talking about is fresnel, which makes the oceans color become closer to the sky's the more accute the angle between the viewer and the surface (i.e. reflectance) and hence closer towards the horizon the sea would get slightyl lighter, though also mist comes into play there to fully disolve the horizon. of course you might be looking at photos of carribean islands with clear water where you simply see the sand lightening the water to the point where there's nan actual shelf falloff (and that's where it gets quite a lot deeper). if you wanted to just fake it using any 3d gradient from the actual camera you can either make a 3d gradient and use xpresso to set drive one point of the gradient from the cameras position, or you could use a proximal shader in a coloriser with the camera as one of hte proximals targets.
__________________
The Third Party | Homepage | My Reel
"You need to know what you're doing before you start, and to start because you need what you're doing."
 
Old 11-22-2006, 09:04 AM   #4
mustardseed
Expert
 
mustardseed's Avatar
portfolio
Andrew Phang
Creative Director
Mustard Seed Creative
Singapore, Singapore
 
Join Date: Aug 2004
Posts: 864
Thanks moka! I can't believe that I've been using gradients without knowing that setting was there all along. I dropped that into my layers in the Color channel and got what I needed.

Per, your method sounds like it'll produce the most controllable and accurate-looking effect. I'll have to give it a go, once I can figure out some of the steps you've pointed out. And yes, I'm actually trying to create the effect where the sea water gets darker as it gets deeper further from shore. With proximal, does that mean I have to assign a null somewhere in the distance?

Would Vreel Skin/Translucent Pro work here as well?

Thank you very much!
__________________
"...if you have faith as small as a mustard seed... Nothing will be impossible for you."

Last edited by mustardseed : 11-22-2006 at 09:13 AM.
 
Old 11-22-2006, 03:04 PM   #5
moka.studio
*
 
moka.studio's Avatar
___________
Hamburg, Germany
 
Join Date: Mar 2003
Posts: 2,029
I think I would not go with Transluscent on this one, or any other kind of SubSurface shaders.

The distance falloff shader may prove usefull though if you have some object such as an island that are seen through the water, and you would like to show the depth of the water surrounding them.

Post your material setup when you have it, if you can;I would be curious to see what you came with!
__________________
moka
 
Old 11-23-2006, 10:06 AM   #6
ArndtvonKoenigsmarck
MAXON Trainer
 
ArndtvonKoenigsmarck's Avatar
portfolio
Arndt von Koenigsmarck
MAXON Trainer
Rodenburg Verlag/Akademie
Menden, Germany
 
Join Date: Mar 2006
Posts: 299
Hello,
I just tried to reproduce this effect with Translucen Pro. This is just a cube for the water surface, a landscape object below for the sand and a sphere as environment. I am posting 2 different views of the same scene:

http://www.vreel-3d.de/vreel/plugin...Doku/Ocean1.jpg
http://www.vreel-3d.de/vreel/plugin...Doku/Ocean2.jpg
__________________
Kind regards
Arndt von Koenigsmarck

private: http://www.vonkoenigsmarck.de
company/webshop: http://www.rodenburg-verlag.de
 
Old 11-23-2006, 10:17 AM   #7
ooo
actually my name is odo
 
ooo's Avatar
 
Join Date: May 2003
Posts: 2,757
Quote:
Originally Posted by ArndtvonKoenigsmarck
Hello,
I just tried to reproduce this effect with Translucen Pro. This is just a cube for the water surface, a landscape object below for the sand and a sphere as environment. I am posting 2 different views of the same scene:

http://www.vreel-3d.de/vreel/plugin...Doku/Ocean1.jpg
http://www.vreel-3d.de/vreel/plugin...Doku/Ocean2.jpg


That's looking great Arndt! Any chance of posting the file or settings?

Thanks,

odo
 
Old 11-23-2006, 10:36 AM   #8
ArndtvonKoenigsmarck
MAXON Trainer
 
ArndtvonKoenigsmarck's Avatar
portfolio
Arndt von Koenigsmarck
MAXON Trainer
Rodenburg Verlag/Akademie
Menden, Germany
 
Join Date: Mar 2006
Posts: 299
Quote:
Originally Posted by ooo
That's looking great Arndt! Any chance of posting the file or settings?

Thanks,

odo


Sure, no problem:

http://www.vreel-3d.de/vreel/plugin...u/Ocean.c4d.zip
__________________
Kind regards
Arndt von Koenigsmarck

private: http://www.vonkoenigsmarck.de
company/webshop: http://www.rodenburg-verlag.de
 
Old 11-23-2006, 10:40 AM   #9
ooo
actually my name is odo
 
ooo's Avatar
 
Join Date: May 2003
Posts: 2,757
Thanks Arndt! Much appreciated.

odo
 
Old 11-23-2006, 12:06 PM   #10
Katachi
Boss at Naviť
 
Katachi's Avatar
portfolio
Samir Kharchi
FX Artist & Software Dev
Naviť
Magdeburg, Germany
 
Join Date: May 2002
Posts: 2,835
Hi,

This effect is due to aerial perspective and it can be simulated physically correct within DPIT V4 (www.dpit2.de V4preview).

See this and the attached image:
http://www.dpit2.de/preview_imgs/fo...mallislands.jpg

The plugin is not yet available though.
Attached Images
File Type: jpg aerial.jpg (20.9 KB, 58 views)
__________________
FX & Design
www.naviť.com | YouTube | Facebook
 
Old 11-23-2006, 12:47 PM   #11
moka.studio
*
 
moka.studio's Avatar
___________
Hamburg, Germany
 
Join Date: Mar 2003
Posts: 2,029
Quote:
Originally Posted by ArndtvonKoenigsmarck
Hello,
I just tried to reproduce this effect with Translucen Pro. This is just a cube for the water surface, a landscape object below for the sand and a sphere as environment. I am posting 2 different views of the same scene:

http://www.vreel-3d.de/vreel/plugin...Doku/Ocean1.jpg
http://www.vreel-3d.de/vreel/plugin...Doku/Ocean2.jpg


Quote:
Originally Posted by Designer
Hi,
This effect is due to aerial perspective and it can be simulated physically correct within DPIT V4 (www.dpit2.de V4preview).
See this and the attached image:
http://www.dpit2.de/preview_imgs/fo...mallislands.jpg

The plugin is not yet available though.


nice exemples
__________________
moka
 
Old 11-24-2006, 09:12 AM   #12
mustardseed
Expert
 
mustardseed's Avatar
portfolio
Andrew Phang
Creative Director
Mustard Seed Creative
Singapore, Singapore
 
Join Date: Aug 2004
Posts: 864
Arndt's and Kataachi's look great!

Here's what I've managed so far with just Gradients and Falloffs layered in the Colour and Transparency channels. I did a test on r10 demo, and it looks better with SPD or Normals. On my 9.1 core, the closeup of the bump doesn't look too good.
__________________
"...if you have faith as small as a mustard seed... Nothing will be impossible for you."
 
Old 11-24-2006, 09:12 AM   #13
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:02 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.