[Radiance-general] rendering with environment maps

Thomas Bleicher tbleicher at gmail.com
Sun Jul 26 18:22:41 PDT 2015


I had some time over the weekend to an HDR map applied to a box. The glow
material does indeed block out the light from a directional light source.
You can work around this by using the "source" material type with a 360
degree angle to define a sky dome that has the HDR image applied.

void colorpict sky_map
7 red green blue envmap.hdr skymap.cal map_u map_v
0
1 1.0

sky_map glow sky_mat
0
0
4 1 1 1 0

sky_mat source sky
0
0
4 0 0 1 360

I have uploaded an example scene that contains an image based sky and a
light source. The necessary "skymap.cal" file and a suitable HDR image for
the sky map are included.

https://www.dropbox.com/s/t2d682sm1grrfbx/env_and_light.zip?dl=0

This mapping requires the image to be a rectangular panoramic image. I
think there was a command line to convert the angular HDR images to a
panoramic projection but I couldn't find it.

With this method you can place your object in the scene and place some
additional lights in addition to the lighting embedded in the environment
map. If you want to illuminate the object by a different HDR image than the
environment map you can create a scene and for the lighting and render the
object with clipping planes just before and after the object to remove all
of the lighting map from the image. Then you render the "background" using
the environment map without object and combine both images with pcomb:

pcomb -e 'ro=if(ri(1)-.5,ri(1),ri(2));go=if(gi(1)-.5,gi(1),gi(2));
bo=if(bi(1)-.5,bi(1),bi(2));' \
         object.hdr background.hdr > combined.hdr

You can read more on this here:

https://sites.google.com/site/tbleicher/radiance/stencil

Hth,
Thomas


On Wed, Jul 22, 2015 at 4:42 PM, Minjung Kim <mkim85 at gmail.com> wrote:

> Hi,
>
> 1) Perhaps your use of the "glow" material for the environment box stops
>> the direct calculation from reaching the light source? Can you post the
>> definition of your light source? I know a combination of HDR mapped to a
>> sky dome and other light sources can be done but I'm not sure if this works
>> with a box, too.
>>
>
> # Direct source
> void light lt
> 0
> 0
> 3 1 1 0  # The light colour is yellow, so if my white ball is lit yellow,
> I know that this light has an effect.
>              # I've also tried varying the intensity of the RGB values
> here with respect to the RGB values of the environment map.
>
> lt source ltsource
> 0
> 0
> 4 0 -1 1 1
>
> # Environment map
> void colorpict uff
> 9 red green blue uffizi_probe.hdr angmap.cal sb_u sb_v -rx 90
> 0
> 0
>
> uff glow uff_glow
> 0
> 0
> 4    1    1    1    0
>
> !genbox uff_glow boxenv 100 100 100 -i | xform -t -50 -50 -50
>
>
>
>>
>> 2a) You can render the image of the environment map on the reflecting
>> sphere separately from the main scene and then just combine the two images.
>> You won't have the lighting pattern on the mirrored object, though. Perhaps
>> there is a way to capture the lighting pattern with a lambertian material
>> and multiply the values from both images? You'd have to make sure that your
>> environment texture captures accurate lighting data.
>>
>> 2b) Instead of reflecting a texture in the mirror ball you could just
>> apply the texture directly to the mirror. What real-world physical effect
>> do you want to simulate?
>>
>
> My goal is to be able to render a completely specular object in different
> scenes ("worlds," let's say), e.g., white noise, 1/f noise, polka dots, &c.
> Normally, I would set up a scene thus:
>
> - put the object in the world origin
> - place a light source or light sources
> - place a giant box around the scene, and texture the inside of the box
> with the desired world (e.g., white noise)
>
> But what I actually want to do is use naturalistic lighting, captured from
> light probes, hence my question. But maybe this is a nonsensical thing to
> do, since the light probes contain scene structure in there? I'm not sure.
>
> Thanks so much for your help!
>
> Regards,
>
> MJ
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20150726/93695882/attachment.html>


More information about the Radiance-general mailing list