Light emitting instances

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Light emitting instances

Post 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?
light instnaces.jpg
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Light emitting instances

Post 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.
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Light emitting instances

Post by daros »

Yes, that would be cool. It is needed for large scale night scenes.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light emitting instances

Post by Dade »

I need a test scene.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Light emitting instances

Post by Sharlybg »

Dade wrote: Wed Feb 17, 2021 2:36 pm I need a test scene.
Here it is :
Light instances.blend
(1018.99 KiB) Downloaded 214 times
Play with the number in green to increase or reduce instances (Put 150 or 1500 to not process forever)
instances_light.jpg
BTW you can switch to cycles to see the difference.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Light emitting instances

Post by daros »

Thanks!
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Light emitting instances

Post 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
no instances.jpg
4 minutes
light instnaces.jpg
Last edited by daros on Thu Feb 18, 2021 1:58 pm, edited 1 time in total.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light emitting instances

Post 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.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Light emitting instances

Post 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?
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: Light emitting instances

Post 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
light instnaces.jpg

16.000 simple instances
18 seconds
instances only.jpg
Post Reply