Here is a tutorial about the Proximal shader and the Fusion shader. We will use them to get two textures on a globe, one for daylight and one night-lights. The sun will light the earth as seen below.

The Model.
Lets start with the model;
You will need one sphere for the earth,
A hemisphere, that is a sphere set to be a dome, converted to polygons ! important.
A spot-light placed far right, target the spot to the center of the earth.
An omni placed left with a dark blue shade, this will light the dark side of the earth.
Drop the hemisphere a a child of the light, this is useful when you want to rotate the 'sun' around the earth ![]()

The Texture.
Find a night and a day map of the earth on google images ("Earth map + night")
Copy them in one psd file at the same size and proportions in two layers, add a black layer too.
Back in Cinema4d, create a new texture with a color channel and a Luminance channel.
Open the color channel and add a Fusion shader.
Check the "Use Mask" box.
Now add the .psd file in the Base channel, click on it and choose the "Night" layer.
Copy this setup to the Blend channel and choose the "Day" layer of the psd file.

As a mask you will need the Proximal shader.
Click on the Proximal and drop the Hemisphere in the Object zone.
Now I checked the Use Vertices after some testing, probably other settings will do something too (?)

Make a test render in the viewer to see the result so far.
You will have to move the hemisphere away from the earth or closer to get the result you need.
To make the dark side of the earth more attractive we want some little lights shine up.
Copy the Fusion shader from the color channel and paste it in the Luminance channel.
Open the Blend layer ("Day") and choose the black layer you made in the psd file. This will block all lights on the day side of the earth.

Test again and again.
And hopefully you get the same results as I do...

This entry was posted on Feb 28, 2007 at 14:39:45 and is filed under Textures, Procedural. You can follow any responses to this entry through the RSS 2.0 feed, or leave a response (below) .
BASE...dude...you rock! Not only is the Proximal trick amazingly cool, but I had NO IDEA you could sub-select layers within a PSD file. How did I miss that?!!? Anyway, thanks for the uber-tip wrapped inside an already great tutorial :)
That is freakin awesome. I didn't know that and knowing is half the battle. Thanks Again
ottimo tutorial
Great tutorial!
That proximal shader is crazy nuts! I can't believe you can do this all in one shader. I would usually need to composite the day/night in After Effects.
great insight! thank you...I'm still seeing the night map on the "day" side thought...I've tried
everything and can't get rid of the lights...I'm using v10.
Thanks again for the website and all the valuable info.
URLs, email, AIM and ICQs will be converted automatically.