Making a light 'soft' in a 3D scene

Armin Le Grand armin_le_grand at
Tue Jan 25 09:13:41 UTC 2022

Hi Regina,

On 1/24/22 15:51, Regina Henschel wrote:
> Hi Armin, hi all,
> a light can be 'harsh' or 'not harsh' (that means 'soft') in an 
> extruded custom shape. This is independent from the material property 
> 'specular'. A 'soft' light is rendered in MS Office, as if the light 
> has a wider emitting area in real world.

There are of course possible definitions for that. 'Our' light source is 
kept pretty simple. We have a point light source with direction, no 
position (all parallel). I remember that only a fraction of 
possibilities - the needed ones as so often - were taken into account at 
that time. I already had to fight to get all those 3D features we have 
today :-) Sure technically these can be extended. We could add a 
point/position, so make lighting position-dependent if wanted. Also 
definitions for a size of a light source are common/possible - that 
would lead to the light coming not only from one point, but from a 
sphere surrounding that point. I am not straightforward sure how to do 
that mathematically, but this just means to dig out the standards & 
integrate them. AFAIR we tried to keep as close to OpenGL at that time, 
so the 'old' OpenGL definitions should be most 
doable/integratable/fitting/implementable (due to that 1st integration 
of OpenGL 20++ years ago, had to be removed after 1y due to OpenGL not 
being stable enough on target systems - a problem on SW even with just 
1% problems but scales to millions of users...).

As so often problem will be more to adapt the model data, processing, 
file formats, UI, etc..., then the visualization I guess. The 3D 
fallback SW renderer can/should be easily extended if you know what you 
do, it is modular. Also always a good point is to keep an eye on 
compatibility to standards, if we want to impl system-dependent 3D 
renderers, too.

One Q stays open, though: AFAIR those defs will/may also influence 
shadow which in case of soft light with non-hard boundaries will have to 
soften/fade, too. That would be expensive since shadow of 3D is not part 
of 3D scene, but generated 2D geometry that then would have to be faded 
-> pixel operations & in theory full back/forth transform 2D/3D to do 
that mathematically correctly. Also shadow on other 3D objects would be 
more difficult/expensive if we would once need that (not yet needed). 
Does our competitor do that...?

HTH for the moment,


> The UI of our 3D-Scenes does not have something in this kind. Is there 
> in the internal handling of 3D-Scenes something, that can easily be 
> extended to produce such light effect?
> Currently I experiment with using additional lights in the 3D-scene 
> that is used to render an extruded custom shape. But that emulates the 
> effect not really good and means a large effort.
> Kind regards,
> Regina
ALG (PGP: EE1C 4B3F E751 D8BC C485 DEC1 3C59 F953 D81C F4A2)

More information about the LibreOffice mailing list