Material preset "Metal" for extruded custom shapes
rb.henschel at t-online.de
Sun Jan 30 22:20:33 UTC 2022
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  is different from how ODF specifies it  and how
MSO specifies it .
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  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.
 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."
 MSO specifies, "A bit that specifies whether the 3-D shape lighting
algorithm will treat the specular color as the diffuse color."
 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.
More information about the LibreOffice