office-gobmx/oox/CppunitTest_oox_testscene3d.mk

58 lines
1.5 KiB
Makefile
Raw Normal View History

tdf#70039 convert 3D effects to extrusion ODF allows a 3D mode for custom shapes. That can be used to render some of the 3D effects possible in MS Office. MS Office has not published, how they calculate the 3D-scenes. Thus most principles and values are found by experiments. My assumptions are contained as comments. This current solution does not work well for perspectiveFront camera with rotation on only y-axis or on only x-axis. If someone has an idea, what is wrong in my solution or what MS Office might specially do, please tell me. The tests do not cover whether the rendering in LO is the same as in MS Office. I have no idea how to write such tests. To test manually: In Powerpoint: Copy the shape and set the copy to wireframe. Cut the copy and insert it as svg image. Move the image so that the lines cover the original shape. Save it. In LibreOffice: Open the file and set the shape to wireframe. Now you can easily compare the rendering of PowerPoint and LibreOffice. Extrusion can be used for images, that have a 3D-scene applied like in tdf#45495. That would work with this patch, but the related places are commented out because of tdf#159515. This patch does not cover lighting and material and it does not contain export. 3D-text is not contained in the patch. There are principle problems with 3D-text. Thus a solution requieres a lot, including additions to the ODF standard. The comments in tdf#70039 contain more about aspects, where MS Office and ODF are in principle incompatible in regard to 3D-effects. Change-Id: I8a5da536ade2a4b67630af221ea47e0288450188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162594 Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-23 13:18:48 -06:00
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
#*************************************************************************
$(eval $(call gb_CppunitTest_CppunitTest,oox_testscene3d))
$(eval $(call gb_CppunitTest_use_externals,oox_testscene3d,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_add_exception_objects,oox_testscene3d, \
oox/qa/unit/testscene3d \
))
$(eval $(call gb_CppunitTest_use_libraries,oox_testscene3d, \
comphelper \
cppu \
cppuhelper \
oox \
sal \
tdf#70039 import lighting of extruded shapes The patch it a continuation of commit 6e5529d7, that handles import of the 3D-scene camera. This patch handles lighting of the 3D-scene. But lighting in MS Office has features which we cannot yet render, address in API or store in ODF. More than two lights, softing with Scale and and Offset, or Specular/Diffuse for all lights are not implemented for extruded shapes, for example. Thus the rendering results cannot be equal to MS Office. This patch contains a lot of workarounds and compromises to get a rendering which looks somewhat similar. Unit tests are not really meaningful in this situation. The included tests focus on the principle aspects modern/legacy lightRigs and lightRig rotation. The light rig values are taken from sections 2.1.1274 and 2.1.1321 in [MS-OI29500] - v20231113. https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500 That version does not specify the used coordinate system for the light directions. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1551836 topic: LightDirection on shape with 3D effect is rendered different than specified. That version does not specify the values 'Specular' and 'Diffuse' for legacy* light rigs. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1608333 topic: What is 'Specular' and 'Diffuse' in the lightRig table in section 2.1.1274 in [MS-OI29500]? Change-Id: I91750dc231d0ea09115424d896d3a1260ba766ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164510 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-03-06 14:52:39 -06:00
sfx \
tdf#70039 convert 3D effects to extrusion ODF allows a 3D mode for custom shapes. That can be used to render some of the 3D effects possible in MS Office. MS Office has not published, how they calculate the 3D-scenes. Thus most principles and values are found by experiments. My assumptions are contained as comments. This current solution does not work well for perspectiveFront camera with rotation on only y-axis or on only x-axis. If someone has an idea, what is wrong in my solution or what MS Office might specially do, please tell me. The tests do not cover whether the rendering in LO is the same as in MS Office. I have no idea how to write such tests. To test manually: In Powerpoint: Copy the shape and set the copy to wireframe. Cut the copy and insert it as svg image. Move the image so that the lines cover the original shape. Save it. In LibreOffice: Open the file and set the shape to wireframe. Now you can easily compare the rendering of PowerPoint and LibreOffice. Extrusion can be used for images, that have a 3D-scene applied like in tdf#45495. That would work with this patch, but the related places are commented out because of tdf#159515. This patch does not cover lighting and material and it does not contain export. 3D-text is not contained in the patch. There are principle problems with 3D-text. Thus a solution requieres a lot, including additions to the ODF standard. The comments in tdf#70039 contain more about aspects, where MS Office and ODF are in principle incompatible in regard to 3D-effects. Change-Id: I8a5da536ade2a4b67630af221ea47e0288450188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162594 Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-23 13:18:48 -06:00
subsequenttest \
tdf#70039 import lighting of extruded shapes The patch it a continuation of commit 6e5529d7, that handles import of the 3D-scene camera. This patch handles lighting of the 3D-scene. But lighting in MS Office has features which we cannot yet render, address in API or store in ODF. More than two lights, softing with Scale and and Offset, or Specular/Diffuse for all lights are not implemented for extruded shapes, for example. Thus the rendering results cannot be equal to MS Office. This patch contains a lot of workarounds and compromises to get a rendering which looks somewhat similar. Unit tests are not really meaningful in this situation. The included tests focus on the principle aspects modern/legacy lightRigs and lightRig rotation. The light rig values are taken from sections 2.1.1274 and 2.1.1321 in [MS-OI29500] - v20231113. https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500 That version does not specify the used coordinate system for the light directions. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1551836 topic: LightDirection on shape with 3D effect is rendered different than specified. That version does not specify the values 'Specular' and 'Diffuse' for legacy* light rigs. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1608333 topic: What is 'Specular' and 'Diffuse' in the lightRig table in section 2.1.1274 in [MS-OI29500]? Change-Id: I91750dc231d0ea09115424d896d3a1260ba766ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164510 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-03-06 14:52:39 -06:00
svx \
svxcore \
tdf#70039 convert 3D effects to extrusion ODF allows a 3D mode for custom shapes. That can be used to render some of the 3D effects possible in MS Office. MS Office has not published, how they calculate the 3D-scenes. Thus most principles and values are found by experiments. My assumptions are contained as comments. This current solution does not work well for perspectiveFront camera with rotation on only y-axis or on only x-axis. If someone has an idea, what is wrong in my solution or what MS Office might specially do, please tell me. The tests do not cover whether the rendering in LO is the same as in MS Office. I have no idea how to write such tests. To test manually: In Powerpoint: Copy the shape and set the copy to wireframe. Cut the copy and insert it as svg image. Move the image so that the lines cover the original shape. Save it. In LibreOffice: Open the file and set the shape to wireframe. Now you can easily compare the rendering of PowerPoint and LibreOffice. Extrusion can be used for images, that have a 3D-scene applied like in tdf#45495. That would work with this patch, but the related places are commented out because of tdf#159515. This patch does not cover lighting and material and it does not contain export. 3D-text is not contained in the patch. There are principle problems with 3D-text. Thus a solution requieres a lot, including additions to the ODF standard. The comments in tdf#70039 contain more about aspects, where MS Office and ODF are in principle incompatible in regard to 3D-effects. Change-Id: I8a5da536ade2a4b67630af221ea47e0288450188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162594 Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-23 13:18:48 -06:00
test \
tdf#70039 import lighting of extruded shapes The patch it a continuation of commit 6e5529d7, that handles import of the 3D-scene camera. This patch handles lighting of the 3D-scene. But lighting in MS Office has features which we cannot yet render, address in API or store in ODF. More than two lights, softing with Scale and and Offset, or Specular/Diffuse for all lights are not implemented for extruded shapes, for example. Thus the rendering results cannot be equal to MS Office. This patch contains a lot of workarounds and compromises to get a rendering which looks somewhat similar. Unit tests are not really meaningful in this situation. The included tests focus on the principle aspects modern/legacy lightRigs and lightRig rotation. The light rig values are taken from sections 2.1.1274 and 2.1.1321 in [MS-OI29500] - v20231113. https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500 That version does not specify the used coordinate system for the light directions. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1551836 topic: LightDirection on shape with 3D effect is rendered different than specified. That version does not specify the values 'Specular' and 'Diffuse' for legacy* light rigs. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1608333 topic: What is 'Specular' and 'Diffuse' in the lightRig table in section 2.1.1274 in [MS-OI29500]? Change-Id: I91750dc231d0ea09115424d896d3a1260ba766ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164510 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-03-06 14:52:39 -06:00
tl \
tdf#70039 convert 3D effects to extrusion ODF allows a 3D mode for custom shapes. That can be used to render some of the 3D effects possible in MS Office. MS Office has not published, how they calculate the 3D-scenes. Thus most principles and values are found by experiments. My assumptions are contained as comments. This current solution does not work well for perspectiveFront camera with rotation on only y-axis or on only x-axis. If someone has an idea, what is wrong in my solution or what MS Office might specially do, please tell me. The tests do not cover whether the rendering in LO is the same as in MS Office. I have no idea how to write such tests. To test manually: In Powerpoint: Copy the shape and set the copy to wireframe. Cut the copy and insert it as svg image. Move the image so that the lines cover the original shape. Save it. In LibreOffice: Open the file and set the shape to wireframe. Now you can easily compare the rendering of PowerPoint and LibreOffice. Extrusion can be used for images, that have a 3D-scene applied like in tdf#45495. That would work with this patch, but the related places are commented out because of tdf#159515. This patch does not cover lighting and material and it does not contain export. 3D-text is not contained in the patch. There are principle problems with 3D-text. Thus a solution requieres a lot, including additions to the ODF standard. The comments in tdf#70039 contain more about aspects, where MS Office and ODF are in principle incompatible in regard to 3D-effects. Change-Id: I8a5da536ade2a4b67630af221ea47e0288450188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162594 Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-23 13:18:48 -06:00
unotest \
utl \
tdf#70039 import lighting of extruded shapes The patch it a continuation of commit 6e5529d7, that handles import of the 3D-scene camera. This patch handles lighting of the 3D-scene. But lighting in MS Office has features which we cannot yet render, address in API or store in ODF. More than two lights, softing with Scale and and Offset, or Specular/Diffuse for all lights are not implemented for extruded shapes, for example. Thus the rendering results cannot be equal to MS Office. This patch contains a lot of workarounds and compromises to get a rendering which looks somewhat similar. Unit tests are not really meaningful in this situation. The included tests focus on the principle aspects modern/legacy lightRigs and lightRig rotation. The light rig values are taken from sections 2.1.1274 and 2.1.1321 in [MS-OI29500] - v20231113. https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500 That version does not specify the used coordinate system for the light directions. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1551836 topic: LightDirection on shape with 3D effect is rendered different than specified. That version does not specify the values 'Specular' and 'Diffuse' for legacy* light rigs. Find the discussion about that in https://learn.microsoft.com/en-us/answers/questions/1608333 topic: What is 'Specular' and 'Diffuse' in the lightRig table in section 2.1.1274 in [MS-OI29500]? Change-Id: I91750dc231d0ea09115424d896d3a1260ba766ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164510 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-03-06 14:52:39 -06:00
vcl \
tdf#70039 convert 3D effects to extrusion ODF allows a 3D mode for custom shapes. That can be used to render some of the 3D effects possible in MS Office. MS Office has not published, how they calculate the 3D-scenes. Thus most principles and values are found by experiments. My assumptions are contained as comments. This current solution does not work well for perspectiveFront camera with rotation on only y-axis or on only x-axis. If someone has an idea, what is wrong in my solution or what MS Office might specially do, please tell me. The tests do not cover whether the rendering in LO is the same as in MS Office. I have no idea how to write such tests. To test manually: In Powerpoint: Copy the shape and set the copy to wireframe. Cut the copy and insert it as svg image. Move the image so that the lines cover the original shape. Save it. In LibreOffice: Open the file and set the shape to wireframe. Now you can easily compare the rendering of PowerPoint and LibreOffice. Extrusion can be used for images, that have a 3D-scene applied like in tdf#45495. That would work with this patch, but the related places are commented out because of tdf#159515. This patch does not cover lighting and material and it does not contain export. 3D-text is not contained in the patch. There are principle problems with 3D-text. Thus a solution requieres a lot, including additions to the ODF standard. The comments in tdf#70039 contain more about aspects, where MS Office and ODF are in principle incompatible in regard to 3D-effects. Change-Id: I8a5da536ade2a4b67630af221ea47e0288450188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162594 Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-23 13:18:48 -06:00
))
$(eval $(call gb_CppunitTest_use_sdk_api,oox_testscene3d))
$(eval $(call gb_CppunitTest_use_ure,oox_testscene3d))
$(eval $(call gb_CppunitTest_use_vcl,oox_testscene3d))
$(eval $(call gb_CppunitTest_use_rdb,oox_testscene3d,services))
$(eval $(call gb_CppunitTest_use_custom_headers,oox_testscene3d,\
officecfg/registry \
))
$(eval $(call gb_CppunitTest_use_configuration,oox_testscene3d))
$(eval $(call gb_CppunitTest_add_arguments,oox_testscene3d, \
-env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
))
# vim: set noet sw=4 ts=4: