To make my life easier in the addon, I am considering to add a black constantinfinite light (always) in order to fix problems caused by the runtime error LuxCore throws when there are no light sources in the scene.
Would this be detrimental to performance, or would this light just never be sampled by the light strategy anyway?
I'd set importance to 0 to account for the uniform light strategy.
Or would you prefer that I remove the runtime error in LuxCore and take care that everything still works with 0 lights?
Performance cost of a black constantinfinite light
Re: Performance cost of a black constantinfinite light
It is horrible, don't.B.Y.O.B. wrote: ↑Sun May 10, 2020 2:10 pm To make my life easier in the addon, I am considering to add a black constantinfinite light (always) in order to fix problems caused by the runtime error LuxCore throws when there are no light sources in the scene.
Would this be detrimental to performance, or would this light just never be sampled by the light strategy anyway?
I'd set importance to 0 to account for the uniform light strategy.
What is exactly the point in rendering a pitch black image ? Albedo AOV ?
Re: Performance cost of a black constantinfinite light
The main problem is when the runtimeerror is thrown when scene editing, on calling EndSceneEdit().
It is annoying to handle and even if it succeeds, it stops the whole rendering just because the user has hidden the only light source for a brief moment.
Getting a black render result would be much more convenient than an error message.
It is annoying to handle and even if it succeeds, it stops the whole rendering just because the user has hidden the only light source for a brief moment.
Getting a black render result would be much more convenient than an error message.
Re: Performance cost of a black constantinfinite light
But why to even start exporting the scene if there are no lights ? Can't you show a message/warning/error before start ?B.Y.O.B. wrote: ↑Sun May 10, 2020 5:00 pm The main problem is when the runtimeerror is thrown when scene editing, on calling EndSceneEdit().
It is annoying to handle and even if it succeeds, it stops the whole rendering just because the user has hidden the only light source for a brief moment.
Getting a black render result would be much more convenient than an error message.
Re: Performance cost of a black constantinfinite light
I meant that a viewport render is started with lights, but then the user for example enters local view on one object (which effectively removes all other objects and lights), or the user deletes the only light in the scene (e.g. to replace it with another).
Of course nobody would render a black viewport for an extended period of time, but during work it can sometimes happen that there are no lights in the scene for a few moments.
For final renders, I could still get the number of lights from the LuxCore API and show a warning if it is 0.
Of course nobody would render a black viewport for an extended period of time, but during work it can sometimes happen that there are no lights in the scene for a few moments.
For final renders, I could still get the number of lights from the LuxCore API and show a warning if it is 0.
Re: Performance cost of a black constantinfinite light
I agree with B.Y.O.B.
We need to be able to render a scene without lights, we may start in the dark, then add a light, then hide that light, add another one, and while usually you won’t be hiding all your lights, it’s possible that at a given point in time you do so, and that should not break or stop the render.
@B.Y.O.B. Maybe add an environment internally when there are no lights at all? A Black one, but like an HDRI, not sure if it’s the same you are proposing.
We need to be able to render a scene without lights, we may start in the dark, then add a light, then hide that light, add another one, and while usually you won’t be hiding all your lights, it’s possible that at a given point in time you do so, and that should not break or stop the render.
@B.Y.O.B. Maybe add an environment internally when there are no lights at all? A Black one, but like an HDRI, not sure if it’s the same you are proposing.
Re: Performance cost of a black constantinfinite light
Ho about a "Default Light" solution (like in C4D, Houdini...)?
No pitch black export or infinite black light or error report, but instead auto-created point light relative to where the camera/ viewpoint is. And, if possible, with custom setting (basically "use a light" from referenced/ linked scene).
No pitch black export or infinite black light or error report, but instead auto-created point light relative to where the camera/ viewpoint is. And, if possible, with custom setting (basically "use a light" from referenced/ linked scene).
Re: Performance cost of a black constantinfinite light
But it’s important to be able to have a pitch black scene, we don’t want a default light, at least we don’t want it, but may be an option to you or others, I always hated the default lights from 3Ds Max in the old days
Re: Performance cost of a black constantinfinite light
Honestly, I see no sense in having a pitch black scene. Please, enlighten me - what's your point?
Cuz' you can have a Default Light (preset scene) with 0.0001 light intensity (i.e. that 0.0 causes an error), if that's what you seek for. IMHO this seems the simplest way to prevent a whole new clusterfuck (Pardon my English.) in the code base while giving more power to the user (advancing and customizing its own tool set).
Cuz' you can have a Default Light (preset scene) with 0.0001 light intensity (i.e. that 0.0 causes an error), if that's what you seek for. IMHO this seems the simplest way to prevent a whole new clusterfuck (Pardon my English.) in the code base while giving more power to the user (advancing and customizing its own tool set).
Re: Performance cost of a black constantinfinite light
Detecting in the addon if a runtime error about missing light sources will be thrown is not easy, it is exactly this complexity that I want to avoid.
I will not add default lights.
Anyway, it would be a decision to be made in each individual addon/plugin integration, not on LuxCore level.
I will not add default lights.
Anyway, it would be a decision to be made in each individual addon/plugin integration, not on LuxCore level.
It would be very confusing for users if they disable a light for a second only to have a "default light" flash on out of nowhere, then vanish again once another light is enabled.B.Y.O.B. wrote: ↑Sun May 10, 2020 11:36 pm I meant that a viewport render is started with lights, but then the user for example enters local view on one object (which effectively removes all other objects and lights), or the user deletes the only light in the scene (e.g. to replace it with another).
Of course nobody would render a black viewport for an extended period of time, but during work it can sometimes happen that there are no lights in the scene for a few moments.