EnvMap + (fake) Sun Tutorial

Tutorials/guides/tips on how to use Indigo and the Indigo exporters
User avatar
Zom-B
1st Place 100
Posts: 4657
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

EnvMap + (fake) Sun Tutorial

Post by Zom-B » Thu Nov 13, 2008 10:38 am

Hey guys, this tutorial will teach you how to get EnvMap HDRI lightning together with some (faked) Sun based Lightning and crispy shadows.

The Idea for it is based on some older work regarding the same problem, you can find the thread here.

I'm working here atm with Indigo 1.1.14 and Cinema 4D + Cindigo 1.1.14, but this tutorial should be also usable for older and newer versions in some way.

You guys are invited to link this tutorial or even copy it and post it somewhere else on a different Website or Forum or whatever, but please keep credit to Zom-B :)

Even the Best HDR Images to buy, generated for usage as 3d Environment Maps have the Problem of to soft shadows and unrealistic lightning regarding a Sun that they obviously contain. The following Image just shows you an example of such an EnvMap that should produce nice shadows (like can be seen in the image EnvMap itself):

Image
(EnvMap credit goes to www.hdrlabs.com)

But the result in a Scene rendering with this EnvMap shows you some very diffuse and soft shadows, the result isn't what you suggested for such an hard direct lightning!

Image
(Model credit goes to The Stanford 3D Scanning Repository

So in this Tutorial I'll show you how to fake a Sun via a BlackBody disc mesh and align the lightning to get some decent result!



Step 1 Scene Setup

First you need to load your EnvMap into your 3D Application and apply it to a Sky Object or otherwise a very very big Sphere. At this point most 3D Apps got the Problem that viewing your EnvMap from the Inside of the Sphere, the result is mirrored! So just mirror the Texture in The Material in your 3D App (C4D: right click material on the Object > Mirror horizon), or if not posible mirror it in a Image editor and save it, but this one is just for our Scene Setup (!) not for the final rendering (Indigo works around this mirroring issue!). Now generate a Camera and place it into the total middle of your scene and sky/sphere:



Step 2 Setting up the Sun

Having you camera on the XYT = 0, you look through it without moving position and check out in the viewport for the sun in the EnvMap, now generate a Disc shaped mesh and place it at the same spot as the EnVMap sun is in the Sky on your viewport.
The distance of the sun to the center of your scene should be as small as possible to optimize rendering speed, aligning the axis of the disc to face always to the center helps here in pushing it up in space or back too.
Some camera angels need the disc to be pushed further in space to prevent some shift between EnvMap sund & disc (see "Issues" at the bottom!).
Having your disc far away preserves the stencil like shadows, if you want some slightly softer edges, just move it nearer to the center or increase disc size.

Image



Step 3 Sun Material and Settings

Mixing Light sources with BG lightning is still a little bit tricky with Indigo, so I use here the most simple way, so everybody can follow.
For the Sun use a diffuse material with emission BalckBody 6000k and a gain of 0.005, and for the EnVMap use a gain of 10.000.000. If your Exporter supports so high values setting the EnvMap gain 200 higher and letting the BlackBody gain at 1 is OK to.
Now set the Sun material as a new Layer, so we can mix the strength easily via Indigo Layer system on the Fly.

Image
(the sun material settings in C4D)



The results

Here you can see the Two Layers and the final Mix of both.

Image
(HDRI only)

Image
(Direct light only)

Image
(The final mixed result)



The benefit

The biggest benefit with this technique is that for example Architecture visualization that nearly always only use sun for lightning, can now use a nice Sky EnvMap with clouds and maybe some BG stuff and have some lovely reflections in windows etc. also the (fake sun) shadow area gets some extra light from EnvMaps and the images can become more "lifelike"
Boring test Images using only sun light can be "pimped up" easily!

I can only recommend you guys to try the free Evermotion Sky Pack with this technique!

Feel free to post here some examples done with this technique :wink:



Issues
Different EnvMaps have a different max/min brightness so lowering or raising the gain of the BlackBody Sun is sometimes needed.

Regarding sun color the light changes in nature related to how high it stand. In the sunset for example a lot of light gets through the earth atmosphere and changes color to the orange/red we know. Here you have to align color to your needs.

if you got your some critical camera angles, you maybe end up in pushing your sun disc very far into space to ensure covering the disc with the EnvMap Sun... poorly this results in slower rendering speed ergo the noise takes longer to clear up. So if you can, try to use an camera angle that allows your sun to stay close close to the scene as possible. or even don't have it on your picture, so this shift isn't an issue!

In Some cases a disc is maybe not optimal for your final image, a sphere does the job too, but it also fires light out in space and is a little bit slower regarding rendering!
Last edited by Zom-B on Fri Nov 14, 2008 7:56 am, edited 2 times in total.
polygonmanufaktur.de

User avatar
pixie
Indigo 100
Posts: 2215
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Post by pixie » Thu Nov 13, 2008 10:47 am

Thanx ZomB, that's a neat tutor you've got here :)

User avatar
tungee
Posts: 482
Joined: Mon Jul 03, 2006 8:17 pm
Location: Gießen Germany

Post by tungee » Thu Nov 13, 2008 11:01 am

Nice work ZomB!
Music has the right to children!

User avatar
Borgleader
Posts: 2149
Joined: Mon Jun 16, 2008 10:48 am

Post by Borgleader » Thu Nov 13, 2008 11:13 am

Very nice :)
benn hired a mercenary to kill my sig...

User avatar
mrmoose
Posts: 130
Joined: Mon Jun 26, 2006 7:45 pm

Post by mrmoose » Thu Nov 13, 2008 9:10 pm

Thanks ;)

User avatar
manitwo
Posts: 1029
Joined: Wed Jul 05, 2006 4:50 am
Location: Tirol - Austria

Post by manitwo » Fri Nov 14, 2008 2:19 am

thank you ZomB :!:

User avatar
Zom-B
1st Place 100
Posts: 4657
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Fri Nov 14, 2008 2:49 am

Thanks guys, I'm happy being able to give something back to the community :)

I just Added the part "The benefit" together with a link to some nice free Sky EnvMaps with Clouds, a great point to start your experiments.... feel free to post some of them here!
polygonmanufaktur.de

User avatar
manitwo
Posts: 1029
Joined: Wed Jul 05, 2006 4:50 am
Location: Tirol - Austria

Re: EnvMap + (fake) Sun Tutorial

Post by manitwo » Fri Nov 14, 2008 2:51 am

ZomB wrote:The distance of the Sun to the center of your scene should really really big, aligning the axis of the sphere to face always to the center helps here in pushing it up in space further.
Having your sphere far away preservs the stencil like shadows, if you wan't some slightly softer edges, just move it nearer to the center or increase sphere size.
As far as i know moving an object(sun) further away increases the size of the AABB-bounding box and this results in longer rendertimes. So i think it's better to keep the sun at a reasonable distance and make it smaller. :wink:

User avatar
OnoSendai
Developer
Posts: 6180
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Post by OnoSendai » Fri Nov 14, 2008 3:51 am

Fantastic tut Zom-B, thanks.
One little thing: I suggest you use a simple disc-shaped emitter for the 'sun', facing the center of the scene, instead of a sphere. The disc-shaped emitter will be more efficient, because a larger fraction of the rays emitted from it will hit the part of the scene we are interested in.

User avatar
Zom-B
1st Place 100
Posts: 4657
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Fri Nov 14, 2008 7:57 am

hey Ono, thanks for this advice, I updated the Tutorial with this information and also added some lines under Issues regarding speed etc.
polygonmanufaktur.de

Rafaello
Posts: 138
Joined: Sat Jul 19, 2008 8:05 am
Location: Guanajuato, México

Post by Rafaello » Thu Dec 04, 2008 7:48 am

Hello ZomB, nice work, I actually did the sun part but I can't set the sky material in Cinema, can you tell me how to do it?
thanks.

User avatar
Zom-B
1st Place 100
Posts: 4657
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Thu Dec 04, 2008 9:29 am

Hey Rafaello...

to use env maps in C4d Cindigo you have to use the "Indigo render settings" Object from the cindigo Plugin menu.
Chose there your background light to EnvMap.

Hope this helps :)
polygonmanufaktur.de

Rafaello
Posts: 138
Joined: Sat Jul 19, 2008 8:05 am
Location: Guanajuato, México

Post by Rafaello » Fri Dec 05, 2008 5:10 am

thank you, I was thinking about the sky object as a light source, but now I know is just for reference for the sun disc.
I tryed yesterday but the render is too black because of the "sun" disc and when I use the light mixer doesn't change anything, I'm using Indigo 1.1.13 and Cindigo 1.1.13

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: EnvMap + (fake) Sun Tutorial

Post by madcoo » Thu Oct 08, 2009 1:09 am

Thanks for this great tut ZomB !!!
That'll be useful !!!
:D
Visit my website!
http://www.fairview-3d.com Studio 3D

User avatar
juan_irender
Indigo 100
Posts: 235
Joined: Tue Jun 23, 2009 12:37 pm
Location: Spain

Re: EnvMap + (fake) Sun Tutorial

Post by juan_irender » Thu Oct 08, 2009 3:57 am

Hi, ZomB!
Past night I was triying to model a scene with such elements. Your tutorial lets me see where it was my fails! Also, is time to remember the issue of using .exr files for use as environment maps in Indigo. For now, we have the choice of using 16 bit TIFF files for that.

Many thanks, ZomB!
C4D R17 Studio User - Modo 902 user
iMac Core i7, 16 Gb RAM, OSX 10.11
Intel Core 2 Quad Q9550, 8 Gb RAM, Windows 10 64 bits

Post Reply
43 posts

Who is online

Users browsing this forum: No registered users and 1 guest