Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2021-01-04 21:21:07 +0300
committerSebastian Parborg <darkdefende@gmail.com>2021-01-04 21:30:20 +0300
commit8c80299fc4493cac640ab4cd56b9bc34f606ee2c (patch)
tree6df5b79bb52097a153dd4d7f8615f6ed0af4665a /tests
parent5aab7f66a0bc5d7888c98fad3da697af8a623bff (diff)
Make mesh modifier tests not fail with optimized OSD lib
When building opensubdiv with more aggressive optimization flags (-march=native -02) the output meshes would differ a bit from what we expected in the current automated modifier test file. The differences in vertex position is within the 1e-6 range, which I would call is acceptable for floats. In addition to this, all the modifier test that tests the subdiv modifier in particular pass without any modifications. I've updated two tests in the modifier test file and script to make it pass (listed below). Updated following test categories: 1. Decimate test Here there was a subdiv modifier applied before the actual decimate modifier. Because the decimate modifier creates a queue of potential vertices it can remove, it is highly sensitive to even small changes as it drastically changes in which order the vertices are decimated in. As this test should only be testing the decimate modifier, I pre-applied the subdiv modifier in the test file. 2. RandomCubeModifier For these tests I removed the subdiv modifier as well. As with decimate, a small change in vertex position here can lead to quite different results. Reviewed By: Sergey, Bastien Differential Revision: http://developer.blender.org/D9004
Diffstat (limited to 'tests')
-rw-r--r--tests/python/modifiers.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/python/modifiers.py b/tests/python/modifiers.py
index 24f71c4066d..10393a0f493 100644
--- a/tests/python/modifiers.py
+++ b/tests/python/modifiers.py
@@ -64,7 +64,8 @@ def get_generate_modifiers_list(test_object_name, randomize=False):
# ModifierSpec('screw', 'SCREW', {}), # screw can make the test very slow. Skipping for now.
ModifierSpec('solidify', 'SOLIDIFY', {}),
- ModifierSpec('subsurf', 'SUBSURF', {}),
+ # Opensubdiv results might differ slightly when compiled with different optimization flags.
+ #ModifierSpec('subsurf', 'SUBSURF', {}),
ModifierSpec('triangulate', 'TRIANGULATE', {}),
ModifierSpec('wireframe', 'WIREFRAME', {})
@@ -92,16 +93,13 @@ def main():
MeshTest("CubeMaskFirst", "testCubeMaskFirst", "expectedCubeMaskFirst", mask_first_list),
MeshTest("CollapseDecimate", "testCollapseDecimate", "expectedCollapseDecimate",
- [ModifierSpec("subdivision", 'SUBSURF', {"levels": 2}),
- ModifierSpec('decimate', 'DECIMATE',
+ [ModifierSpec('decimate', 'DECIMATE',
{'decimate_type': 'COLLAPSE', 'ratio': 0.25, 'use_collapse_triangulate': True})]),
MeshTest("PlanarDecimate", "testPlanarDecimate", "expectedPlanarDecimate",
- [ModifierSpec("subdivision", 'SUBSURF', {"levels": 2}),
- ModifierSpec('decimate', 'DECIMATE',
+ [ModifierSpec('decimate', 'DECIMATE',
{'decimate_type': 'DISSOLVE', 'angle_limit': math.radians(30)})]),
MeshTest("UnsubdivideDecimate", "testUnsubdivideDecimate", "expectedUnsubdivideDecimate",
- [ModifierSpec("subdivision", 'SUBSURF', {"levels": 2}),
- ModifierSpec('decimate', 'DECIMATE', {'decimate_type': 'UNSUBDIV', 'iterations': 2})]),
+ [ModifierSpec('decimate', 'DECIMATE', {'decimate_type': 'UNSUBDIV', 'iterations': 2})]),
# 5
MeshTest("RadialBisectMirror", "testRadialBisectMirror", "expectedRadialBisectMirror",