MeshLights: Different behaviour with different n of faces even with same normal.

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.
FiatLux
Posts: 21
Joined: Sat Apr 21, 2018 8:41 pm

MeshLights: Different behaviour with different n of faces even with same normal.

Post by FiatLux »

Hi guyz.
The attached image is self-explainatory but I'll explain context anyway.
I've got a simple scene, with an emissive meshlight plane.
In the first case (left) the emissive plane is just 1 quad face, in the second is 49 quad faces.
Both planes have same material properties.
Is it normal this different behaviour?
My only explaination could be related to the case of a 3d emissive object, where normals are all different so light rays have different direction, but is it so even when the emissive faces have the same normals?
emissionfacesnoise.jpg
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: MeshLights: Different behaviour with different n of faces even with same normal.

Post by Dade »

It is normal to have a lot more noise with 49 light sources Vs 1 however it is not in your very specific case. Can you post the scene ?
Support LuxCoreRender project with salts and bounties
kintuX
Posts: 810
Joined: Wed Jan 10, 2018 2:37 am

Re: MeshLights: Different behaviour with different n of faces even with same normal.

Post by kintuX »

I get same/similar result too... :?
MeshEmitterDifference.jpg
MeshEmitterDiff.zip
(118.14 KiB) Downloaded 226 times
IIRC, it's something about the size of the polygon (as it was with angles) - the smaller it gets, more noise it produces? Or i may be totally wrong, kicking the dark :lol:
Last edited by kintuX on Wed May 02, 2018 4:46 pm, edited 1 time in total.
FiatLux
Posts: 21
Joined: Sat Apr 21, 2018 8:41 pm

Re: MeshLights: Different behaviour with different n of faces even with same normal.

Post by FiatLux »

Dade wrote: Wed May 02, 2018 4:24 pm It is normal to have a lot more noise with 49 light sources Vs 1 however it is not in your very specific case. Can you post the scene ?
Sure:
Layers 1and2 = scene+1face plane
Layers 1and3 = scene+49faces plane
Attachments
testemission.blend
(558.38 KiB) Downloaded 201 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: MeshLights: Different behaviour with different n of faces even with same normal.

Post by Dade »

Going to check what is going wrong.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: MeshLights: Different behaviour with different n of faces even with same normal.

Post by Dade »

Dade wrote: Wed May 02, 2018 4:43 pm Going to check what is going wrong.
Ah, right, by default, direct light sampling is disabled if you use a mesh with more than 24 triangles. You can re-enable direct light sampling (but I'm not sure if the option is available in BlendLuxCore) or split the mesh in multiple objects to keep the total triangle count under 24.

Mmm, I guess we should probably raise the default threshold of 24 triangle :?:
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: MeshLights: Different behaviour with different n of faces even with same normal.

Post by B.Y.O.B. »

Dade wrote: Wed May 02, 2018 4:50 pm You can re-enable direct light sampling (but I'm not sure if the option is available in BlendLuxCore)
It is not available.
Dade wrote: Wed May 02, 2018 4:50 pm Mmm, I guess we should probably raise the default threshold of 24 triangle
We should do tests to find out when disabling direct light sampling has a benefit over leaving it enabled.
Of course, the tests will be somewhat synthetic, as it depends on the scene.
But we can probably find a better default value.
FiatLux
Posts: 21
Joined: Sat Apr 21, 2018 8:41 pm

Re: MeshLights: Different behaviour with different n of faces even with same normal.

Post by FiatLux »

Dade wrote: Wed May 02, 2018 4:50 pm Ah, right, by default, direct light sampling is disabled if you use a mesh with more than 24 triangles. You can re-enable direct light sampling (but I'm not sure if the option is available in BlendLuxCore) or split the mesh in multiple objects to keep the total triangle count under 24.
Mmm, I guess we should probably raise the default threshold of 24 triangle :?:
Right thanks.
I wasn't able to find how to enable it in BlendLuxCore.
As for mesh splitting it's a per case solution, in the best scenario you'll have just to tweak once the emission's properties, in the worst scenario you could be forced to manage multiple materials with multiple emission properties.

Since I'm here in the matter, how the high number of triangles could make counterproductive the direct light sampling?
Is it because of possible small size of triangles?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: MeshLights: Different behaviour with different n of faces even with same normal.

Post by Dade »

FiatLux wrote: Wed May 02, 2018 5:31 pm Since I'm here in the matter, how the high number of triangles could make counterproductive the direct light sampling?
Is it because of possible small size of triangles?
Just try to render the scene above with one big light source and than add in a corner small light emitting sphere made of 960 triangles. This "auto" enabling/disabling direct light sampling according the number of triangles is intended for such a case (i.e. to sample only the big light).
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: MeshLights: Different behaviour with different n of faces even with same normal.

Post by B.Y.O.B. »

It would be cool if LuxCore could estimate the contribution of each light source after the first few samples and set the light importances accordingly :)
Post Reply