When enabling Toggle Extrusion in Fontwork toolbar, and changing Surface on a Fontwork object, the following three surfaces show no difference: Matt, Plastic, Metal. (Wireframe is different) I'm not sure how each of those should look, but I assume they shouldn't look the same. Observed in LO 7.2.0.0.alpha0+ (066799b4a162aa0a4bc6aa28339f1f943a13971e), 3.3.0 / Ubuntu.
Can you list the steps to reproduce, and maybe add a png clip. Thanks.
Reproduced in Version: 7.2.0.0.alpha0+ / LibreOffice Community Build ID: 3dfe1df0f1084b06c7d4c95df387253b2e058cd6 CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded @Regina, any opinion here ?
It was never implemented, see https://bz.apache.org/ooo/show_bug.cgi?id=98334 and https://bz.apache.org/ooo/show_bug.cgi?id=67765. If implementing, then we should use the presets of OOXML.
It seems, that this four materials correspond to the OOXML material presets legacyMatte, legacyMetal, legacyPlastic and legacyWireframe, which are specified in section 20.1.10.50 ST_PresetMaterialType (Preset Material Type) in ISO/IEC 29500-1:2016(E). But in case someone really wants to implement it, I suggest to use material presets, which are currently available in the UI of MS Office.
ODF 1.3 has an exact definition for "draw:extrusion-metal": " •false: the specular color for the shading of an extruded shape is white. •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." https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#attribute-draw_extrusion-metal
We cannot make it the same as in MS Office, because that would need to set the specular color equal to the fill color. But ODF allows only white(255,255,255) or in case of Metal gray(200,200,200). But at least we can render it matte and apply the ODF values in case of Metal. This does not only effect FontWork, but extrusion of other custom shapes too.
First version of a patch is now in Gerrit https://gerrit.libreoffice.org/c/core/+/124720 Here some details about the changes: Changes to EnhancedCustomShape3d::Create3DObject(): Value 'false' of attribute 'FirstLightHarsh' and case 'matte' are now rendered correctly although in the 3D engine the first light is always specular. For that I use the forth light instead of the first light, because the forth light cannot be specular in the 3D engine. The forth light cannot be used in ODF custom shape extrusion, so there should be no conflict. ODF specifies specular color 'white' in case of value 'false' of attribute 'metal'. So I have changed 225->255. In addition, this makes the distance to value 'true' larger, for which ODF specifies gray(200,200,200). MS Office uses specular Color = fill color in case of surface 'matte' and 'metal'. That is not possible for ODF because ODF specifies 'white' or gray(200,200,200) respectively. So getting exact the same rendering is not possible. MS Office adds black to diffuse and ambient color in case of surface 'metal'. I have reduced fAmbientIntensity and fLight2Intensity by an -arbitrary- amount to get rendering nearer to MS Office in that case. Line: sal_Int32 nIntensity = static_cast<sal_Int32>(fSpecular) * 100; should have been: sal_Int32 nIntensity = static_cast<sal_Int32>(fSpecular * 100); Otherwise you get always nIntensity=0 because fSpecular is in [0;1]. The fix avoids '/100' then '*100' at all. If PowerPoint exports an ppt-file to odp, it sets shade mode to 'gouraud'. That gives rendering without steps. With the patch rendering is no longer forced to 'flat'. Besides keeping the setting when using the extrusion bar, it is necessary to use normal kinds other than 'flat'. Changes to extrusionbar.cxx: In consequence of now rendering value 'false' of property 'FirstLightHarsh', I have removed forcing property 'FirstLightHarsh' to 'true' from SID_EXTRUSION_LIGHTING_INTENSITY. If have removed forcing 'LightFace' to 'true' from SID_EXTRUSION_LIGHTING_INTENSITY. That value is nowhere evaluated and default value in ODF and in MS Office is 'true', so no need to be set explicitely. I have changed property 'SecondLightHarsh' to be always 'false' in SID_EXTRUSION_LIGHTING_INTENSITY. The second light harsh is always 'false' in the 3D engine, but the ODF default value is 'true', so we need to write it out as 'false'. I have changed SID_EXTRUSION_SURFACE so that values of 'Specularity' are kept. Only when changing to 'plastic' or 'metal', a value of 0 is replaced by value 80. The previous value 122 was wrong, because the data type is zeroToHundredPercent in ODF. The value 80 is freely chosen. It tries to get rendering near to MS binary formats. I have removed changes to the property 'Diffusion' from SID_EXTRUSION_SURFACE. The property 'Diffusion' is read or set in import/export with MS binary formats. But it is nowhere evaluated and its purpose is unclear. The ODF meaning is: 'The draw:extrusion-diffusion attribute specifies the amount of diffusion reflected by a shape.' Default value is 0% in ODF. The old value 122 is questionable, because the data type is percent in ODF. The meaning in binary MS Office is: 'DFF_Prop_c3DDiffuseAmt specifies the ratio of incident to diffuse light that is reflected on a shape. The default value for this property is 0x00010000.' (16.16 fixpoint). The 3D engine has no attribute to use it directly.
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/70a4cb766ed356bc17433ac1673e977bb0bf3d2f tdf#140321 enable 'matte', 'metal' extrusion surface It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
There are no tests yet because it is not clear, how to write a test for rendering of 3D. Any help is welcome. https://lists.freedesktop.org/archives/libreoffice/2021-November/088005.html
https://git.libreoffice.org/core/+/70a4cb766ed356bc17433ac1673e977bb0bf3d2f added a test for this (a typo in the bug # made it send a commit notification to the wrong bug). Thank you Regina!
Heh, and I followed a trend of providing wrong references ;) https://git.libreoffice.org/core/+/87e5caca7d3133a32d92503bfa8e5a1409545187
Thank you Mike. Using the material tab should work now. Because it didn't work before, old documents might have an undesired choice in the file. Switch to 'wireframe' and 'metal', then to the desired surface and save. That should replace the wrong values in file with the correct ones.
(In reply to Regina Henschel from comment #12) > Switch to 'wireframe' > and 'metal', then to the desired surface and save. That should replace the > wrong values in file with the correct ones. Correction: Switch to "Matt" and then to the desired surface.
verified as fixed in: Version: 7.3.0.2 / LibreOffice Community Build ID: f1c9017ac60ecca268da7b1cf147b10e244b9b21 CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded