Import of lighting from MS Office for extruded shapes

Regina Henschel rb.henschel at t-online.de
Sat Feb 24 21:00:29 UTC 2024


Hi Thorsten,

Thorsten Behrens schrieb am 24.02.2024 um 17:29:
> Hi Regina,
> 
> Regina Henschel wrote:
>> Unfortunately, our 3d engine does not support all needed features. Most
>> important problem is, that in our 3d engine only the first light is
>> specular.
>>
> I suspect that might be quick to add - Armin, what do you think?

There is a member mbSpecular in class ImpSdr3DLightAttribute but 
ViewContactOfE3d::impCreateWithGivenPrimitive3DContainer() evaluates 
only the first light. But I don't know whether that is the correct area 
at all.

> 
>> Further problem with our 3d engine is, that we cannot render the
>> "Bevel" of MS Office. Not only the fancy ones, but the simple round
>> bevel is missing too. Our "Rounded edges" are in fact straight. In
>> MS Office you can use the bevel to create a sphere, for example.
>>
> Got it. Might also need some experimentation, such that we get the exact
> same look. Let me play with this features a little bit.

I have attached a file with examples using "Bevel". Note that these are 
no "true" 3D-objects, but they are all custom shapes. We are far away 
from what MS Office can do with custom shapes.

> 
>> The question is more whether to start that immediately or first
>> implement some ersatz lighting so that the shapes are approximately
>> as light as in MS Office. When you use the current import (in daily
>> build which has the 3d geometry) you can see, that our default
>> lighting gives bad results.
>>
> I guess the specular light & API changes for it are relatively
> straight-forward.

Perhaps. A solution might be to give the 'dr3d:foo' attributes 
precedence over the 'extrusion-foo' attributes and use 'loext:foo' until 
they available in ODF.

The 'extrusion-foo' attributes are available in API as properties in 
service EnhancedCustomShapeExtrusion.

The use of the 'D3DFoo' properties is strange. They are not mentioned in 
an idl file. And trying to get the properties of an object in a scene in 
the Development Tools crashes LibreOffice.

  Then again, getting the code merged as-is would
> perhaps be quite satisfying, and I take it you would need some sort of
> quick emulation for that, since it looks just too bad?

Yes, till August we need some sort of better lighting.

Kind regards,
Regina

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bevel examples.pptx
Type: application/vnd.openxmlformats-officedocument.presentationml.presentation
Size: 31244 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240224/34d7aa93/attachment.pptx>


More information about the LibreOffice mailing list