Page 2 of 4

Re: Light emitting instances

Posted: Thu Feb 18, 2021 4:28 pm
by B.Y.O.B.
My post was about the handling of light-emitting meshes inside LuxCore. I didn't mean that you should merge the instances.

Re: Light emitting instances

Posted: Thu Feb 18, 2021 5:14 pm
by Dade
daros wrote: Thu Feb 18, 2021 1:56 pm X Dade.
Is the parsing process related only to instanced emitters?
Yes, it is.

Re: Light emitting instances

Posted: Thu Feb 18, 2021 6:33 pm
by daros
B.Y.O.B. wrote: Thu Feb 18, 2021 4:28 pm My post was about the handling of light-emitting meshes inside LuxCore. I didn't mean that you should merge the instances.
Sorry for the misunderstanding B.Y.O.B. , thanks.

Re: Light emitting instances

Posted: Thu Feb 18, 2021 6:33 pm
by daros
Dade wrote: Thu Feb 18, 2021 5:14 pm
daros wrote: Thu Feb 18, 2021 1:56 pm X Dade.
Is the parsing process related only to instanced emitters?
Yes, it is.
Thanks!

Re: Light emitting instances

Posted: Thu Feb 18, 2021 11:54 pm
by daros
Dade wrote: Thu Feb 18, 2021 12:06 pm
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.
Hi Dade, so the reason why get about 3 minutes and half for parsing+light preprocessing for 32 millions lightsources is probably because we are running Lux under CPU, right?

Re: Light emitting instances

Posted: Fri Feb 19, 2021 9:11 am
by TAO
I think you can optimize it more. Gpu vs Cpu can give you a big advantage.
In my personal project, i will never use this much light at the same time instead i use bigger light with more segments, not the exact same but LuxCore uses every segment as a different light emitter source.
Like in this render, all done with mesh light and just in 120 seconds.
mesh-light.jpg
Of course, too many lights will take too much time to process.

Re: Light emitting instances

Posted: Fri Feb 19, 2021 9:59 am
by Sharlybg
Strangelly with Cycles there is almost no processing time. With this blend file you can switch to Cycles and see how fast it is : download/file.php?id=9583

Re: Light emitting instances

Posted: Fri Feb 19, 2021 10:12 am
by TAO
I tried a scene with 1.000.000 lights in 3dsmax, and it takes no time to translate, and with 80 sec of rendering is pretty good looking.
Milion lights 02.jpg
i used particles as light sources and material light emission. so all lights are cube mesh light sources.
Screenshot 2021-02-19 110911.jpg

Re: Light emitting instances

Posted: Fri Feb 19, 2021 11:12 am
by Dade
TAO wrote: Fri Feb 19, 2021 10:12 am i used particles as light sources and material light emission. so all lights are cube mesh light sources.
The previous test scene uses a sphere with ~4000 triangles as particle. It is a huge difference when compared to the 12 triangles of a cube.

Re: Light emitting instances

Posted: Fri Feb 19, 2021 11:29 am
by daros
Sharlybg wrote: Fri Feb 19, 2021 9:59 am Strangelly with Cycles there is almost no processing time. With this blend file you can switch to Cycles and see how fast it is : download/file.php?id=9583
Yes, Cycles starts to render immediately with this scene.