EnvMap + (fake) Sun Tutorial

Tutorials/guides/tips on how to use Indigo and the Indigo exporters
User avatar
Jay-ko
Posts: 136
Joined: Mon Nov 12, 2012 7:28 pm
Location: Paris

Re: EnvMap + (fake) Sun Tutorial

Post by Jay-ko » Wed Feb 13, 2013 7:23 am

Hi folks!

Can you assist me to have crips shadows??

Etienne Say in 2010 that's a common problem with the exr that they do not have enougth dynamic range between sun pixel and the other one.

He propose to do something with photoshop.

I never do something like that with my friend photoshop! First toshop poorly open my EXR file!

Then when i try to pickup some pixel info.... i don't know how to read it!

normal pixel:
http://img11.hostingpics.net/pics/92543 ... 32bits.jpg
sun pixel:
http://img11.hostingpics.net/pics/92543 ... 32bits.jpg

Ok i have an "intensity slot" but it's about a 3,41 factor, not 30000/100000!!!
how to putting it there?

By the way, the maximun parameters for that is 20.
And as toshop say, i need to transform my pictures into 16bits by layers to edit it?

But if i do that i fall all the interest of an exr file no?
errare humanum est

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

Re: EnvMap + (fake) Sun Tutorial

Post by Zom-B » Wed Feb 13, 2013 7:59 am

Simply create a "artificial sun" over yours by doing a circle selection and filling it with foreground color.
That color needs to be white with Intensity from 7 to 15, depends on how you like it most.
The artificial Sun shouldn't be to small btw, otherwise Indigo gets trouble sampling it.
polygonmanufaktur.de

User avatar
Jay-ko
Posts: 136
Joined: Mon Nov 12, 2012 7:28 pm
Location: Paris

Re: EnvMap + (fake) Sun Tutorial

Post by Jay-ko » Thu Feb 21, 2013 10:24 pm

Thank you for your help Zom-B!

I created my own exr for a sunny day with tiny clouds
my clouds was build by brush in 16bits, then i put a sun and after i changed the mode and retreived my selection of my sun.
I finally fill this selection by a +7 color.

It's hard to explain but when i try to do much more than 7 indigo render a strange picture.

All my other pixels was at 0

I made this texture to help me to use the Z orientation, because use radian is not natural for me, maybe it can help someone so i share it here:

http://www.hostingpics.net/viewer.php?i ... 0ruler.jpg

You can save it in exr or no and put it in background, usually the sun is in the middle of the pic, so the values on the horizon can help you to correctly orient your sun for your subjet.
errare humanum est

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

Re: EnvMap + (fake) Sun Tutorial

Post by Zom-B » Thu Feb 21, 2013 10:39 pm

Jay-ko wrote:It's hard to explain but when i try to do much more than 7 indigo render a strange picture.
in my test quite some time ago, the sun turned black once I raised the brightness over +15.
I should redo some test with actual version and see what happens.
If you get strange output, maybe try to raise the scale of your sun disc, that should speed up rendering and also make the shadows not super perfectly sharp, but with a little softer edges :)
polygonmanufaktur.de

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: EnvMap + (fake) Sun Tutorial

Post by galinette » Fri Feb 22, 2013 4:56 am

Jay-ko wrote:Thank you for your help Zom-B!

I created my own exr for a sunny day with tiny clouds
my clouds was build by brush in 16bits, then i put a sun and after i changed the mode and retreived my selection of my sun.
I finally fill this selection by a +7 color.

It's hard to explain but when i try to do much more than 7 indigo render a strange picture.
It's better to work in 32 bits. However, only a recent photoshop (CS5 I think) added proper support for 32bit editing.
I use a +14 intensity value for the sun. For a 16384x8192 envmap, the sun should be 22 pixels high. Width will vary between 22 near the horizon (sunrise/sunset) and increase with sun elevation in 1/cos(elevation), which means that at 45° elevation it is about 31 pixels wide and 32 pixels high, making an ellipse.

With these values, and a blackbody base emitter of 6500K , gain=1E-5, you will have roughly correct renders. Decrease sun disc intensity if the shadows are too dark, and vice-versa. Don't make your tests with reinhard, as you may end with much too bright or dark environment, causing numerical issues.

The best way is:
- Make some renders with indigo sunsky, camera tonemapping, and adjust your camera shutter and aperture to have correct result.
- Keep the camera and tonemapping settings, and switch to your envmap, with 6500K 1E-5 base emitter.
- Your envmap ground should be roughly correctly exposed when opened in photoshop without adjusting the display exposure
- Adjust your sun disc values with photoshop with trial and error, keeping the same camera settings in Indigo
- Work in 32bit with photoshop! The intensity>7 error is likely to be a 16bit limitation

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
Jay-ko
Posts: 136
Joined: Mon Nov 12, 2012 7:28 pm
Location: Paris

Re: EnvMap + (fake) Sun Tutorial

Post by Jay-ko » Fri Mar 15, 2013 2:57 am

You rock dude! :D
errare humanum est

User avatar
wlf_alex
Posts: 99
Joined: Tue Aug 28, 2012 9:26 pm
Location: Russia-Moscow, Spain-Alicante
Contact:

Re: EnvMap + (fake) Sun Tutorial

Post by wlf_alex » Mon Apr 08, 2013 2:26 am

Tell somebody, because I'm so confused! The method "EnvMap + (fake) Sun" or "EnvMap + Sun" still relevant? Or Indigo now has a mode to render "EnvMap + Indigo Sun" lighting?

regards...
ArchiCAD 14, Cinema 4D r13, IndigoRender, VrayforC4D

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

Re: EnvMap + (fake) Sun Tutorial

Post by Zom-B » Mon Apr 08, 2013 3:03 am

wlf_alex wrote:Tell somebody, because I'm so confused! The method "EnvMap + (fake) Sun" or "EnvMap + Sun" still relevant? Or Indigo now has a mode to render "EnvMap + Indigo Sun" lighting?
Yes, Indigo has nowadays a method to render HDRi and overlay the sun on it, using the "SumMaterial".
Sadly it isn't implemented in C4D exporter atm (Blendigo has afaik support for that feature!) :/
here some example code if you wanna put hand on the igs:


You can set up a background material that is a sum of both the sun+sky mat (with sky turned off) and an env map, like so:

Code: Select all

<material>
    <name>env_map_material</name>
   
    <diffuse>
      <texture>
        <uv_set>albedo</uv_set>
        <path>uffizi-large.exr</path>
        <exponent>1.0</exponent>

        <tex_coord_generation>
          <spherical>
            <rotation>
              <axis_rotation>
                <axis>0 0 1</axis>
                <angle>1.6</angle>
              </axis_rotation>
            </rotation>
          </spherical>

        </tex_coord_generation>
      </texture>

      <base_emission>
        <constant>
          <blackbody>
            <temperature>6500</temperature>
            <gain>0.000001</gain>
          </blackbody>
        </constant>
      </base_emission>

      <emission>
        <texture>
          <texture_index>0</texture_index>
        </texture>
      </emission>
    </diffuse>
  </material>

  <material>
    <name>sunsky</name>
    <sunsky>
      <sundir>1 0 1</sundir>
      <turbidity>2</turbidity>
      <enable_sky>false</enable_sky>
      <sun_layer>1</sun_layer>
    </sunsky>
  </material>


  <background_settings>
      <background_material>
         <material>
            <name>background</name>
        <sum>

          <mat>
            <mat_name>sunsky</mat_name>
            <weight>
              <constant>1</constant>
            </weight>
          </mat>
          <mat>
            <mat_name>env_map_material</mat_name>
            <weight>
              <constant>1</constant>
            </weight>
          </mat>
        </sum>
         </material>
      </background_material>

      <emission_scale>
         <material_name>background_material</material_name>
         <measure>luminance</measure>
         <value>8000</value>
      </emission_scale>
   </background_settings>
Set up your sun as you wish, and copy the Sun coordinates from exported igs into the code above, then place it all together back in the IGS and hit render :)
polygonmanufaktur.de

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: EnvMap + (fake) Sun Tutorial

Post by galinette » Mon Apr 08, 2013 5:00 am

Jay-ko wrote:Hi folks!

Ok i have an "intensity slot" but it's about a 3,41 factor, not 30000/100000!!!
how to putting it there?

By the way, the maximun parameters for that is 20.
I forgot to mention, but the "Intensity" parameter in photoshop HDR modes is an EV stop value, which means a power of two.

This means Intensity=+14 equals a factor of 2^14 = 16384.

Stupidly, in the "32-bit value" RGB values of the color picker, photoshop clamps the displayed value to 20.0, which is a simple display bug, since the good values such as 16384 are used when painting with intensity = 14.
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
wlf_alex
Posts: 99
Joined: Tue Aug 28, 2012 9:26 pm
Location: Russia-Moscow, Spain-Alicante
Contact:

Re: EnvMap + (fake) Sun Tutorial

Post by wlf_alex » Mon Apr 08, 2013 5:09 am

Many thanks for the reply, Zom-B! But I do not know much ISL. I would be very grateful if you could show an example of how to use this feature. Was not able to use your "EnvMap + (fake) Sun Tutorial" because it was not possible to combine the shadow of the EnvMap and "artificial sun" :(

regards...
ArchiCAD 14, Cinema 4D r13, IndigoRender, VrayforC4D

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

Re: EnvMap + (fake) Sun Tutorial

Post by Zom-B » Mon Apr 08, 2013 5:21 am

wlf_alex wrote:Many thanks for the reply, Zom-B! But I do not know much ISL
That is no ISL but simple IGS scene code (xml based) to be put by hand in your scene :)
So this is actually your example scene code.
wlf_alex wrote:Was not able to use your "EnvMap + (fake) Sun Tutorial" because it was not possible to combine the shadow of the EnvMap and "artificial sun" :(
I don't really get what you want to say by that?
best to place the artificial sun over the existing (weak) one in the HDRI, so new sun & shadows are plausible with the displayed background.
polygonmanufaktur.de

User avatar
wlf_alex
Posts: 99
Joined: Tue Aug 28, 2012 9:26 pm
Location: Russia-Moscow, Spain-Alicante
Contact:

Re: EnvMap + (fake) Sun Tutorial

Post by wlf_alex » Mon Apr 08, 2013 6:05 am

Yes, it came out! It was necessary to raise the "sun" as high as possible above the scene.
But I do not know anything about IGS code. What does it do and how to use it? So I think that this opportunity does not exist for me. :(

PS And it is strange that there is no detailed description of this feature!
ArchiCAD 14, Cinema 4D r13, IndigoRender, VrayforC4D

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: EnvMap + (fake) Sun Tutorial

Post by CTZn » Mon Apr 08, 2013 11:26 pm

IGS: Indigo Scene

it's nothing but the scene description, listing objects, materials and so on. There can you change all the scene values, even some that the GUI would not expose.

An IGS file can be opened with any text editor.

For instance, an IGM can be thought of as an excerpt of an IGS.
obsolete asset

Post Reply
43 posts

Who is online

Users browsing this forum: No registered users and 1 guest