Print at Aug 20, 2019 4:48:56 PM View all posts in this thread on one page
Posted by connomar at Mar 25, 2011 9:58:27 AM
Daylight Room Rendering
When I render my room layouts, I would like to see how they look during the day, with no lights turned on. Unfortunately I always end up with sunlight streaming through the windows, and the rest of the room almost black. Is there any way of increasing the dynamic range to reproduce the room more as our eyes would see it, or providing a multiple exposure feature to allow for HDR software to process the results.

Thanks, Martin

Posted by Puybaret at Mar 25, 2011 1:29:05 PM
Re: Daylight Room Rendering
Never thought about HDR software to post process computed images ! smile
Even if this sounds as a good idea, I don't think it could work even if you add more light sources outside. It's because light reflections are limited in Sweet Home 3D, otherwise it would take too long to compute an image. I know computed images are therefore less realistic, but it's a tradeoff.

Sometimes, I'm tempted to add an additional higher quality level that would use the capabilities offered by SunFlow Instant GI, but I believe users prefer to add more lights and get faster a nicer image.
For example, the following image of an empty room was rendered in 3h50 (13800 seconds!) with Instant GI on an i7 processor (measured from the value displayed in a top command) :


With the current renderer that uses some ambient occlusion and no additional light the same image was rendered in 31 seconds:


With one large light added at the ceiling of the room, the image is computed in 42 seconds and looks much nicer at the end:


If ever you're a Java programmer, you can test Instant GI quite easily in Sweet Home 3D source code by changing the following lines in the PhotoRenderer class:
- replace the lines from 366 to 374 after the test on useAmbientOcclusion by the following ones:

this.sunflow.parameter("gi.engine", "igi");
this.sunflow.parameter("gi.igi.samples", 256);
this.sunflow.parameter("gi.igi.sets", 1);
this.sunflow.parameter("gi.igi.c", 0.0000005f);
this.sunflow.parameter("gi.igi.bias_samples", 8);
this.sunflow.options(SunflowAPI.DEFAULT_OPTIONS);

- change the diffuse value at line 301 from 1 to a higher value (this value is the number of bounces):

this.sunflow.parameter("depths.diffuse", 8);


You can try to change "gi.igi.samples" to get better or worse noise, change the number of bounces...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer

Posted by connomar at Mar 25, 2011 3:26:41 PM
Re: Daylight Room Rendering
May thanks such a comprehensive reply. I'll have a play with the changes you mention. I'm afraid my programming skills ran out after 'C' for Unix :(

Posted by Puybaret at May 30, 2013 1:32:54 PM
Re: Daylight Room Rendering
Recently, I made some additional tests and discovered that the "path" GI engine was a little faster than "Instant GI" one, with better results (but maybe I didn't program the numerous parameters of Instant GI engine correctly). For example, the following image required 3h10 of CPU on an Intel i7 processor (as this processor supports 8 threads, it means the image required 25 min to be computed) and doesn't show too much noise.



Note that from version 4, you can test this rendering engine without recompiling the program by passing some parameters to java at program launch. To get the previous image, I used the following parameters:
-Dcom.eteks.sweethome3d.j3d.PhotoRenderer.highQuality.globalIllumination=path
-Dcom.eteks.sweethome3d.j3d.PhotoRenderer.highQuality.diffusedBounces=8
(see also this thread).

Trying also to reduce the computing time, I tried smaller values for diffusedBounces parameter.
For diffusedBounces=3, the CPU load was reduced to 1h20 with still a nice effect even if the image is darker.




For diffusedBounces=1 (the default value if you don't specify that parameter), the CPU load was only 28 minutes but the image gets too dark.


----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer