Page 1 of 4
Light emitting instances
Posted: Wed Feb 17, 2021 12:20 pm
by daros
Hi, this scene, which has three instance groups, each of 5.000 instances of an 2200 polygons sphere, is making some troubles. Luxrender keeps doing something for 3 minutes and but then makes the redering itself in 15 seconds.
Are there some known issues with Lux dealing with many light source instances?
Re: Light emitting instances
Posted: Wed Feb 17, 2021 12:24 pm
by B.Y.O.B.
LuxCore seems to be doing some very time-consuming preprocessing on meshlights, which becomes noticeable even at low polygon counts.
It could be worth checking if this could be avoided or accelerated in the LuxCore code.
Re: Light emitting instances
Posted: Wed Feb 17, 2021 1:21 pm
by daros
Yes, that would be cool. It is needed for large scale night scenes.
Re: Light emitting instances
Posted: Wed Feb 17, 2021 2:36 pm
by Dade
I need a test scene.
Re: Light emitting instances
Posted: Wed Feb 17, 2021 3:24 pm
by Sharlybg
Dade wrote: Wed Feb 17, 2021 2:36 pm
I need a test scene.
Here it is :
Play with the number in green to increase or reduce instances (Put
150 or
1500 to not process forever)
BTW you can switch to cycles to see the difference.
Re: Light emitting instances
Posted: Wed Feb 17, 2021 5:12 pm
by daros
Thanks!
Re: Light emitting instances
Posted: Wed Feb 17, 2021 6:09 pm
by daros
By the way, the instanced shpere schene has almost the same total amount of light emitting polygons,1.2M, as the full geometry no instances spiral scene (1M).
The instance scene reaches 16GB ram.
35 seconds
4 minutes
Re: Light emitting instances
Posted: Thu Feb 18, 2021 12:06 pm
by Dade
Sharlybg wrote: Wed Feb 17, 2021 3:24 pm
Play with the number in green to increase or reduce instances (Put
150 or
1500 to not process forever)
I'm running the test with 4500 particles. The result is:
Code: Select all
# LuxCoreRender v2.5beta1 2021/02/18 0be225772cddcc30bb7e34ad41b2d5f533618ebb
#
# 82 secs total:
# [LuxCore][82.654] [GammaCorrectionPlugin] Kernels compilation time: 0ms
#
# 32secs parsing:
# [SDL][32.150] Scene objects count: 4502
#
# 35secs light preprocessing:
# [LuxRays][44.217] Total triangle count: 17860024
# [LuxRays][44.227] EmbreeAccel build time: 9ms
# [LuxCore][52.774] Light step #1 preprocessing time: 8.54706secs
# [LuxCore][54.918] Light step #2 preprocessing time: 2.14381secs
# [LuxCore][74.839] Light step #3 preprocessing time: 19.9207secs
# [LuxCore][74.839] Light step #4 preprocessing time: 3.69549e-05secs
# [LuxCore][80.045] Light step #5 preprocessing time: 5.20684secs
# [LuxCore][80.045] Light total preprocessing time: 35.8185secs
So 82secs before starting the rendering and most of the time is consumed by:
1) parsing (32secs)
2) light pre-processing (35secs)
Actually, with about 18,000,000 of light sources, the numbers are not so sky high. I will look into a way to accelerate the 2 expansive steps but it may be not easy given the innate serial nature of both.
Re: Light emitting instances
Posted: Thu Feb 18, 2021 12:38 pm
by B.Y.O.B.
One thing I'm wondering about is:
Is the slow speed caused by every triangle being a separate light source?
Would it speed things up to group all triangles of a light-emitting mesh into being one light source? And is that practical?
Re: Light emitting instances
Posted: Thu Feb 18, 2021 1:56 pm
by daros
B.Y.O.B. wrote: Thu Feb 18, 2021 12:38 pm
One thing I'm wondering about is:
Is the slow speed caused by every triangle being a separate light source?
Would it speed things up to group all triangles of a light-emitting mesh into being one light source? And is that practical?
This is the approach we are using in FELIX wen rendering with Maxwell (which too has serious issues with instanced light sources). Unfortunately this approach is not suitable for big projects since the merged meshes can easily run out of ram.
X Dade.
Is the parsing process related only to instanced emitters?
16.000 light emittings instances
4 minutes
16.000 simple instances
18 seconds