Hi all, hi Miklos,
the UI of Microsoft Office provides a material preset "Metal". Our UI
provides that too. Both ODF and MSO standards have a Boolean attribute
whether "Metal" has to be used or not. But the way "Metal" is actually
rendered in MSO [3] is different from how ODF specifies it [1] and how
MSO specifies it [2].
I want to make rendering similar to actual rendering in MSO in case we
have an import from MSO. MSO uses for the attribute c3DDiffuseAmt the
special value 43712/65536 in case of "Metal", otherwise 65536/65536.
Currently I use this special value in my ongoing work [4] to detect,
that the shape 'wants' a Metal-rendering like MSO. The attribute
c3DDiffuseAmt has the corresponding attribute draw:extrusion-diffusion
in ODF. So a document imported from MSO binary format and then saved to
ODF looks still as MSO-kind, when reopening the document. But it is
somehow a misuse of that ODF attribute.
Do you think, that I should stay with that approach? Alternative would
be to use a marker in an interoperability bag. But that would loose the
information when writing to ODF.
Opinions?
[1] ODF specifies, "true: the specular color for the shading of an
extruded shape is gray (red green and blue values of 200) instead of
white and 15% is added to the specularity."
[2] MSO specifies, "A bit that specifies whether the 3-D shape lighting
algorithm will treat the specular color as the diffuse color."
[3] Actual the rendering in MSO looks as if the first light is evaluated
for specularity same as in material preset "Plastic" but the specular
color is not gray but it is the same as the object color.
[4] https://gerrit.libreoffice.org/c/core/+/128449
Kind regards,
Regina