Adding the sun to image based lighting environment

Hi list,

I have tried to add a description of the sun to my ibl environment generated
from a chrome ball. However the ‘added’ description of the sun is not taken
into account. If anyone can guide me on how to proceed I would really
appreciate it.

Thanks!

Anne

Below I have given you information on

1) Description of the lighting environment in Environment.rad

2) The commands I have used to run the environment – with and without
mksource.

For mapping the chrome ball image to the environment I have applied the
following approach, taken from the ‘High Dynamic Range Imaging Book’:

···

#-------------------------------------------------------------------------

Ad 1) Environment.rad:

void colorpict hdr_env
15 red green blue C_20091002ball@10h44_tilt38.hdr mirrorsphere.cal sb_u sb_v
-i 1 -rx 90 -rz 8 -ry 0
0
0

# specify a "glow" material that will use this image
hdr_env glow env_glow
0
0
4 1 1 1 0

env_glow sphere sphereenv
0
0
4 0 0 0 -1000

#To this I have added the description of the sun, the location of the sun
has been derived from the chrome ball image:

# simulation of the sun, radiance and location
void light lum_sun
0
0
3 46700 46700 46700

lum_sun source sun
-rx 90 -rz 8 -ry 0

0

4 0.6410 0.5537 -0.5315 0.5323

#----------------------------------------------------------------------------------------------------

Ad 2) When running the environment I have used following approach:

Without mksource, just an oconv:

oconv Environment.rad > ibl1.oct

With mksource:

oconv Environment.rad > iblmksource.oct

mksource –a 0.5 iblmksource.oct > srcs.rad

oconv -i iblmksource.oct srcs.rad > ibl1.oct

Hi Lars,
Yes - have tried both - and no difference. I get however an oconv warning
that my srcs.rad file is empty. The experience I have with this warning is
that it is related to a missing material description, which in this case is
included in the Environment.rad.

oconv Environment.rad > iblmksource.oct

mksource –a 0.5 iblmksource.oct > srcs.rad

oconv -i iblmksource.oct srcs.rad > ibl1.oct
/Anne

Hi!

lum_sun source sun
-rx 90 -rz 8 -ry 0

0

4 0.6410 0.5537 -0.5315 0.5323

Does this pass oconv without error messages? I think you just need to
remove everything in the second line except the zero here, so it becomes

lum_sun source sun
0
0
4 0.6410 0.5537 -0.5315 0.5323

Cheers, Lars.

···

--
Anne Iversen
Guldborgvej 44 3.th
2000 Frederiksberg

mobil: 20646857

Hi Anne!

Yes - have tried both - and no difference. I get however an oconv
warning that my srcs.rad file is empty. The experience I have with this
warning is that it is related to a missing material description, which
in this case is included in the Environment.rad.

The best for debugging is to render the scene before converting it by
mksource. If this does not work, you know that the initial scene
description has problems to get rendered.

One thing that just catches my eye, why does your sphere have a negative
radius (-1000)? If you wanted the normals to point inside, you should
use a bubble object instead of a sphere object still with positive
radius. I do not know about the effect of a negative radius at all and
would guess that it is not valid.

Cheers, Lars.