Why is there a limit of 8 lightgroups?

Use this forum for general user support and related questions.
Post Reply
juangea
Donor
Posts: 132
Joined: Thu Jan 02, 2020 6:23 pm

Why is there a limit of 8 lightgroups?

Post by juangea » Fri May 08, 2020 2:02 pm

That's it, simple question :)

Why is there a limit of 8 lightgroups?

Thanks!

User avatar
Dade
Developer
Posts: 4228
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Why is there a limit of 8 lightgroups?

Post by Dade » Fri May 08, 2020 4:30 pm

juangea wrote:
Fri May 08, 2020 2:02 pm
That's it, simple question :)

Why is there a limit of 8 lightgroups?
Mostly because of GPUs/OpenCL, I must have a finite number there.
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 3555
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Why is there a limit of 8 lightgroups?

Post by B.Y.O.B. » Fri May 08, 2020 4:43 pm

Technically there's only a limit if you use an OpenCL engine, the CPU engines have no limit.
But in the Blender addon I'm always using the limit of 8 to make my life easier.

juangea
Donor
Posts: 132
Joined: Thu Jan 02, 2020 6:23 pm

Re: Why is there a limit of 8 lightgroups?

Post by juangea » Sat May 09, 2020 10:04 am

Ok, so it's a GPU limitation, understood :)

(I don't think it's a big problem, and I'm with you regarding making your life easier hahaha)

User avatar
B.Y.O.B.
Developer
Posts: 3555
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Why is there a limit of 8 lightgroups?

Post by B.Y.O.B. » Sat May 09, 2020 10:54 am

We could use a higher number if requested.
@Dade, I guess this would not raise memory consumption when the max. number of light groups is not actually used, right?

User avatar
Dade
Developer
Posts: 4228
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Why is there a limit of 8 lightgroups?

Post by Dade » Sat May 09, 2020 11:11 am

B.Y.O.B. wrote:
Sat May 09, 2020 10:54 am
@Dade, I guess this would not raise memory consumption when the max. number of light groups is not actually used, right?
Yup, it would increase the size of the SampleResult structure, there is a SampleResult structure for each thread and there are hundred of thousands of GPU threads.
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 3555
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Why is there a limit of 8 lightgroups?

Post by B.Y.O.B. » Sat May 09, 2020 11:34 am

Oh, so my statement was wrong, it would have an impact even if no lightgroups are used at all.

User avatar
Dade
Developer
Posts: 4228
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Why is there a limit of 8 lightgroups?

Post by Dade » Sat May 09, 2020 11:57 am

B.Y.O.B. wrote:
Sat May 09, 2020 11:34 am
Oh, so my statement was wrong, it would have an impact even if no lightgroups are used at all.
Yes, GPU structures must have a fixed size or it would require conditional compilation (i.e. kernel re-compilation). There are other options (i.e. store the values in a dedicated buffer, not inside the SampleResult structure) but are complex.
Support LuxCoreRender project with salts and bounties

Post Reply