LuxCore: new IRRADIANCE AOV channel (aka light design)

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby B.Y.O.B. » Fri Dec 26, 2014 12:50 pm

Dade wrote:Wait, still work in progress (anyway, it is going to be on "for_v1.5" branch).

No hurry, just wanted to check.
User avatar
B.Y.O.B.
Developer
 
Posts: 5181
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby Dade » Mon Dec 29, 2014 3:17 am

I have added the support for IRRADIANCE AOV to OpenCL rendering modes too and to LuxCore Python API. I have also added a new Image Pipeline plugin do draw contour lines:

light.jpg


The image pipeline definition of the above image is:

Code: Select all
# Film image pipeline plug-ins
film.imagepipeline.0.type = TONEMAP_LINEAR
film.imagepipeline.1.type = GAMMA_CORRECTION
film.imagepipeline.1.value = 2.2
film.imagepipeline.2.type = CONTOUR_LINES
film.imagepipeline.2.range = 20
film.imagepipeline.2.steps = 10
film.imagepipeline.2.zerogridsize = 8
# AOVs
film.outputs.1.type = RGB
film.outputs.1.filename = bigmonkey.hdr
film.outputs.2.type = IRRADIANCE
film.outputs.2.filename = bigmonkey-irr.hdr


Where "CONTOUR_LINES" is the new plugin in charge to draw the contour lines. It requires (and reads) from the IRRADIANCE AOV and write the lines over "RGB" AOV. The parameters are:

- "film.imagepipeline.<number>.scale": the scale used for irradiance values, the default is 179 like in Radiance to convert to lux with the same Radiance white point.
- "film.imagepipeline.<number>.range": the range of of the lines, the minimum is always 0 while the maximum is defined with this parameter(default: 100, with the default scale correspond to 100lux).
- "film.imagepipeline.<number>.steps": the number of lines to draw inside the interval defined with the .range parameter (default: 8).
- "film.imagepipeline.<number>.zerogridsize": the size of the black grid to draw on image where irradiance values are not avilable (-1 => no grid, 0 => all black, >0 => size of the black grid, default: 8).

Note: irradiance values are available only for Matte material because it is the only material to sample all the hemisphere over the surface (exactly like in Radiance).

This could be the basic building block for a quite spectacular light design analysis software: it would be possible to check and modify interactively the light sources of an ArchViz rendering in order to optimize the light design and to comply with the EU normative (i.e. about 500lux on a reading table, etc.).

light2.jpg


P.S. indeed, it would require also a validation phase to check the validity of results with reality and/or reference software like Radiance.
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby zsolnai » Mon Dec 29, 2014 6:39 am

Nothing like a bit of coding between the two holidays. Very creative, awesome stuff. Lovin' it! :)
zsolnai
Developer
 
Posts: 519
Joined: Sun May 22, 2011 6:17 pm

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby tomb » Mon Dec 29, 2014 12:54 pm

Awesomeness :)
User avatar
tomb
Developer
 
Posts: 2677
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby Abel » Mon Dec 29, 2014 1:46 pm

Dade wrote:This could be the basic building block for a quite spectacular light design analysis software: it would be possible to check and modify interactively the light sources of an ArchViz rendering in order to optimize the light design and to comply with the EU normative (i.e. about 500lux on a reading table, etc.).

Yes, this would truly be a spectacular development! I would not be surprised to see other renderers following suit eventually - this is really a potential killer feature.

Dade wrote:Note: irradiance values are available only for Matte material because it is the only material to sample all the hemisphere over the surface (exactly like in Radiance).

I can see the logic behind that, but from the user perspective it is a bit of a limitation - for example when studying the effect of the glossiness of the wall in an empty room, it would be useful to see the effect both on the floor and on the walls themselves. I presume that getting irradiance values for glossy materials would require a separate sampling calculation and would thus involve an undesirable amount of complexity; however if would be any sensible way to get the irradiance for glossy surfaces, that would make the program even more interesting for people currently depending on Radiance.

Dade wrote:P.S. indeed, it would require also a validation phase to check the validity of results with reality and/or reference software like Radiance.

I would be happy to run some tests comparing the results with Radiance at some point. However, I'm still not sure if I should start working on supporting the LuxCore syntax in SU2LUX or if eventually this will all be accessible using the classic syntax - in case of the former, I might as well start working on it soonish.
User avatar
Abel
Developer
 
Posts: 1847
Joined: Sat Oct 20, 2007 8:13 am
Location: Stuttgart, Germany

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby Dade » Mon Dec 29, 2014 4:01 pm

Abel wrote:Yes, this would truly be a spectacular development! I would not be surprised to see other renderers following suit eventually - this is really a potential killer feature.


I'm so suprised people are still using Radiance: the Ward's irradiance caching paper was the base for the very first global illumination render I have ever implemented ... and it was something like 25 years ago ! 24 hours on an Amiga to render the cornel box ! I used Radiance few year after, I have recently looked into its code and is still mostly the same Oo

Not like there is something wrong in old code but still ... I would be surprised if LuxCore isn't 10 time faster on the CPU and 50 on GPUs.

Abel wrote:I can see the logic behind that, but from the user perspective it is a bit of a limitation - for example when studying the effect of the glossiness of the wall in an empty room, it would be useful to see the effect both on the floor and on the walls themselves. I presume that getting irradiance values for glossy materials would require a separate sampling calculation and would thus involve an undesirable amount of complexity; however if would be any sensible way to get the irradiance for glossy surfaces, that would make the program even more interesting for people currently depending on Radiance.


It is quite easy to get full irradiance information on any kind of material, it is just that it can not be done at the same time of a normal rendering, like AOVs do: it can not be done in a single pass/endering. I could add an specific option to render engines to output irradiance but you would have to run the rendering for 2 times: one to get the normal rendering and another to get the irradiance output.

Doable, may be in the future.

Abel wrote:I would be happy to run some tests comparing the results with Radiance at some point. However, I'm still not sure if I should start working on supporting the LuxCore syntax in SU2LUX or if eventually this will all be accessible using the classic syntax - in case of the former, I might as well start working on it soonish.


The problem is that LuxCoreRenderer uses classic Lux image pipeline so all AOVs and LuxCore image pipeline are not used or avilable.

The best solution for you still looks like the LuxCore LXS parser. You can basically output the .lxs as for classic Lux then you will have only to add 7-8 properties to define the image pipeline in the LuxCore way. If you want go trought this path I could also refresh/update a bit the LXS paser.
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby jeanphi » Tue Dec 30, 2014 3:56 pm

Dade wrote:Note: irradiance values are available only for Matte material because it is the only material to sample all the hemisphere over the surface (exactly like in Radiance).

I don't understand that limitation: except for pure specular materials like perfect mirrors or glass, all directions are sampled. Allowing computation of irradiance on glossy materials is thus perfectly doable in a single pass, the only detrimental effect could be a slightly higher noise level due to the fact that directions won't be sampled according to the irradiance.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby Dade » Tue Dec 30, 2014 8:29 pm

jeanphi wrote:I don't understand that limitation: except for pure specular materials like perfect mirrors or glass, all directions are sampled


Well, there are only 3 types of BSDF events: DIFFUSE, GLOSSY, SPECULAR (and all possible combinations due to Mix material). I'm computing irradiance only if the material has only DIFFUSE events, I guess I can transform the condition in not having SPECULAR events. Effectively including also GLOSSY events.

BTW, the above red monkey material is a mix between matte and mirror so it will be still off-limit.
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby Abel » Tue Dec 30, 2014 11:51 pm

Dade wrote:I guess I can transform the condition in not having SPECULAR events. Effectively including also GLOSSY events.

That would resolve the limitation that I brought up earlier almost completely. :)
User avatar
Abel
Developer
 
Posts: 1847
Joined: Sat Oct 20, 2007 8:13 am
Location: Stuttgart, Germany

Re: LuxCore: new IRRADIANCE AOV channel (aka light design)

Postby Dade » Sun Jan 04, 2015 5:10 am

I have added the support for computing irradiance values on any no SPECULAR surface:

glossy.png


Note: you can use glossy material with very low roughness values to emulate specular surfaces and still get irradiance values.
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

PreviousNext

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest