diff --git a/pxr/usd/usdSkel/bakeSkinning.cpp b/pxr/usd/usdSkel/bakeSkinning.cpp index 3b48822d8c..b751790383 100644 --- a/pxr/usd/usdSkel/bakeSkinning.cpp +++ b/pxr/usd/usdSkel/bakeSkinning.cpp @@ -879,6 +879,7 @@ struct _SkinningAdapter bool _ComputeRestPoints(const UsdTimeCode time); bool _ComputeRestNormals(const UsdTimeCode time); + bool _ComputeFaceVertexIndices(const UsdTimeCode time); bool _ComputeGeomBindXform(const UsdTimeCode time); bool _ComputeJointInfluences(const UsdTimeCode time); @@ -917,6 +918,11 @@ struct _SkinningAdapter VtVec3fArray _restNormals; UsdAttributeQuery _restNormalsQuery; + // Topology for face-varying normals. + _Task _faceVertexIndicesTask; + VtIntArray _faceVertexIndices; + UsdAttributeQuery _faceVertexIndicesQuery; + // Geom bind transform. _Task _geomBindXformTask; GfMatrix4d _geomBindXform; @@ -1003,10 +1009,26 @@ _SkinningAdapter::_SkinningAdapter( UsdSkelBakeSkinningParms::ModifiesNormals) { _restNormalsQuery = UsdAttributeQuery(pointBased.GetNormalsAttr()); const TfToken& normalsInterp = pointBased.GetNormalsInterpolation(); - // Can only process vertex/varying normals. - if (!_restNormalsQuery.HasAuthoredValue() || - (normalsInterp != UsdGeomTokens->vertex && - normalsInterp != UsdGeomTokens->varying)) { + + // Face-varying normals are supported for mesh prims and require + // the faceVertexIndices attribute. + // Otherwise, can only process vertex/varying normals. + if (normalsInterp == UsdGeomTokens->faceVarying && + skinningQuery.GetPrim().IsA()) { + + const UsdGeomMesh mesh(skinningQuery.GetPrim()); + _faceVertexIndicesQuery = + UsdAttributeQuery(mesh.GetFaceVertexIndicesAttr()); + + if (!_restNormalsQuery.HasAuthoredValue() || + !_faceVertexIndicesQuery.HasAuthoredValue()) { + _faceVertexIndicesQuery = UsdAttributeQuery(); + _restNormalsQuery = UsdAttributeQuery(); + } + + } else if (!_restNormalsQuery.HasAuthoredValue() || + (normalsInterp != UsdGeomTokens->vertex && + normalsInterp != UsdGeomTokens->varying)) { _restNormalsQuery = UsdAttributeQuery(); } } @@ -1066,9 +1088,12 @@ _SkinningAdapter::_SkinningAdapter( UsdSkelBakeSkinningParms::DeformPointsWithBlendShapes; } } + // Only vertex/varying normals are supported for blendshapes. + // Supporting faceVarying normals would require extending the + // schema. if ((parms.deformationFlags & UsdSkelBakeSkinningParms::DeformNormalsWithBlendShapes) && - _restNormalsQuery) { + _restNormalsQuery && !_faceVertexIndicesQuery) { _subShapeNormalOffsets = _blendShapeQuery->ComputeSubShapeNormalOffsets(); @@ -1165,6 +1190,12 @@ _SkinningAdapter::_SkinningAdapter( _restNormalsTask.SetActive(true); _restNormalsTask.SetMightBeTimeVarying( _restNormalsQuery.ValueMightBeTimeVarying()); + + if (_faceVertexIndicesQuery.IsValid()) { + _faceVertexIndicesTask.SetActive(true); + _faceVertexIndicesTask.SetMightBeTimeVarying( + _faceVertexIndicesQuery.ValueMightBeTimeVarying()); + } } if (_flags & RequiresGeomBindXform) { @@ -1228,6 +1259,7 @@ _SkinningAdapter::_SkinningAdapter( "[UsdSkelBakeSkinning]\n Computation state for skinnable prim <%s>:\n" " _restPointsTask: %s\n" " _restNormalsTask: %s\n" + " _faceVertexIndicesTask: %s\n" " _geomBindXformTask: %s\n" " _geomBindInvTransposeXformTask: %s\n" " _jointInfluencesTask: %s\n" @@ -1237,6 +1269,7 @@ _SkinningAdapter::_SkinningAdapter( _skinningQuery.GetPrim().GetPath().GetText(), _restPointsTask.GetDescription().c_str(), _restNormalsTask.GetDescription().c_str(), + _faceVertexIndicesTask.GetDescription().c_str(), _geomBindXformTask.GetDescription().c_str(), _geomBindInvTransposeXformTask.GetDescription().c_str(), _jointInfluencesTask.GetDescription().c_str(), @@ -1263,6 +1296,12 @@ _SkinningAdapter::ExtendTimeSamples(const GfInterval& interval, times->insert(times->end(), tmpTimes.begin(), tmpTimes.end()); } } + if (_faceVertexIndicesTask) { + if (_faceVertexIndicesQuery.GetTimeSamplesInInterval( + interval, &tmpTimes)) { + times->insert(times->end(), tmpTimes.begin(), tmpTimes.end()); + } + } if (_geomBindXformTask && _geomBindXformQuery) { if (_geomBindXformQuery.GetTimeSamplesInInterval( interval, &tmpTimes)) { @@ -1376,6 +1415,17 @@ _SkinningAdapter::_ComputeRestNormals(const UsdTimeCode time) } +bool +_SkinningAdapter::_ComputeFaceVertexIndices(const UsdTimeCode time) +{ + return _faceVertexIndicesTask.Run( + time, GetPrim(), "compute face vertex indices", + [&](UsdTimeCode time) { + return _faceVertexIndicesQuery.Get(&_faceVertexIndices, time); + }); +} + + bool _SkinningAdapter::_ComputeGeomBindXform(const UsdTimeCode time) { @@ -1598,11 +1648,20 @@ _SkinningAdapter::_DeformNormalsWithLBS(const GfMatrix4d& skelToGprimXf) _normals.value = _restNormals; } - _normals.hasSampleAtCurrentTime = - UsdSkelSkinNormalsLBS(_geomBindInvTransposeXform, xformsForPrim, - _jointIndices, _jointWeights, - _skinningQuery.GetNumInfluencesPerComponent(), - _normals.value); + if (_faceVertexIndicesTask) { + _normals.hasSampleAtCurrentTime = + UsdSkelSkinFaceVaryingNormalsLBS(_geomBindInvTransposeXform, + xformsForPrim, _jointIndices, _jointWeights, + _skinningQuery.GetNumInfluencesPerComponent(), + _faceVertexIndices, _normals.value); + } else { + _normals.hasSampleAtCurrentTime = + UsdSkelSkinNormalsLBS(_geomBindInvTransposeXform, xformsForPrim, + _jointIndices, _jointWeights, + _skinningQuery.GetNumInfluencesPerComponent(), + _normals.value); + } + if (!_normals.hasSampleAtCurrentTime) { return; } @@ -1700,6 +1759,7 @@ _SkinningAdapter::Update(const UsdTimeCode time, const size_t timeIndex) // Compute inputs. _ComputeRestPoints(time); _ComputeRestNormals(time); + _ComputeFaceVertexIndices(time); // Blend shapes precede LBS skinning. if (_flags & UsdSkelBakeSkinningParms::DeformWithBlendShapes) { diff --git a/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/baseline/lbs.baked.usda b/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/baseline/lbs.baked.usda index c17b0fd690..2735592648 100644 --- a/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/baseline/lbs.baked.usda +++ b/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/baseline/lbs.baked.usda @@ -12,36 +12,36 @@ def Xform "Root" ( ) { float3[] extentsHint.timeSamples = { - 1: [(-0.55, -1.1, -0.55), (0.6, 1.1, 0.6)], - 2: [(-0.55, -1.1, -0.55), (0.6, 1.1065071, 0.61312914)], - 3: [(-0.55, -1.1, -0.55), (0.6, 1.1231614, 0.6478765)], - 4: [(-0.55, -1.1, -0.55), (0.6, 1.1452192, 0.6969908)], - 5: [(-0.55, -1.1, -0.55), (0.6, 1.1681643, 0.7532618)], - 6: [(-0.55, -1.1, -0.55), (0.6, 1.1884793, 0.8099986)], - 7: [(-0.55, -1.1, -0.55), (0.6, 1.2040887, 0.86140347)], - 8: [(-0.55, -1.1, -0.55), (0.6, 1.2144165, 0.90273696)], - 9: [(-0.55, -1.1, -0.55), (0.6, 1.2200208, 0.9301543)], - 10: [(-0.55, -1.1, -0.55), (0.6, 1.2217903, 0.9401407)], - 11: [(-0.56543094, -1.1, -0.55), (0.6, 1.224238, 0.9479468)], - 12: [(-0.60701656, -1.1, -0.55), (0.6, 1.2307667, 0.9687131)], - 13: [(-0.667194, -1.1, -0.5602656), (0.6, 1.2400937, 0.9979057)], - 14: [(-0.73815393, -1.1, -0.57598823), (0.6, 1.2508192, 1.0308162)], - 15: [(-0.81238395, -1.1, -0.5918639), (0.6, 1.2614484, 1.0631835)], - 16: [(-0.88321716, -1.1, -0.6063359), (0.6069435, 1.2705263, 1.0917066)], - 17: [(-0.9452665, -1.1, -0.61833394), (0.6153661, 1.2768508, 1.1143962)], - 18: [(-0.99459726, -1.1, -0.627342), (0.6215924, 1.2796712, 1.1306907)], - 19: [(-1.0285345, -1.1, -0.6333591), (0.62615085, 1.2787417, 1.1412908)], - 20: [(-1.045087, -1.1, -0.63674504), (0.6298773, 1.274113, 1.1476965)], - 21: [(-1.0516249, -1.1, -0.6386975), (0.6331462, 1.2677301, 1.1519566)], - 22: [(-1.0569466, -1.1, -0.6401472), (0.63580716, 1.2616183, 1.1551195)], - 23: [(-1.0611994, -1.1, -0.6411766), (0.6379335, 1.2558869, 1.1573654)], - 24: [(-1.0645281, -1.1, -0.6418665), (0.63959783, 1.2506415, 1.1588707)], - 25: [(-1.0670716, -1.1, -0.6422943), (0.64086956, 1.2459813, 1.159804)], - 26: [(-1.0689579, -1.1, -0.64253145), (0.64181274, 1.2419995, 1.1603214)], - 27: [(-1.0703001, -1.1, -0.64264154), (0.64248383, 1.2387818, 1.1605617)], - 28: [(-1.0711914, -1.1, -0.64267826), (0.64292955, 1.2364055, 1.1606417)], - 29: [(-1.0717006, -1.1, -0.64268243), (0.64318407, 1.2349387, 1.160651)], - 30: [(-1.071867, -1.1, -0.64268076), (0.64326733, 1.2344389, 1.1606473)], + 1: [(-0.55, -1.1, -0.55), (1.1500001, 1.1, 0.6)], + 2: [(-0.55, -1.1, -0.55), (1.1500001, 1.1065071, 0.61312914)], + 3: [(-0.55, -1.1, -0.55), (1.1500001, 1.1231614, 0.6478765)], + 4: [(-0.55, -1.1, -0.55), (1.1500001, 1.1452192, 0.6969908)], + 5: [(-0.55, -1.1, -0.55), (1.1500001, 1.1681643, 0.7532618)], + 6: [(-0.55, -1.1, -0.55), (1.1500001, 1.1884793, 0.8099986)], + 7: [(-0.55, -1.1, -0.55), (1.1500001, 1.2040887, 0.86140347)], + 8: [(-0.55, -1.1, -0.55), (1.1500001, 1.2144165, 0.90273696)], + 9: [(-0.55, -1.1, -0.55), (1.1500001, 1.2200208, 0.9301543)], + 10: [(-0.55, -1.1, -0.55), (1.1500001, 1.2217903, 0.9401407)], + 11: [(-0.56543094, -1.1, -0.55), (1.1500001, 1.224238, 0.9479468)], + 12: [(-0.60701656, -1.1, -0.55), (1.1500001, 1.2307667, 0.9687131)], + 13: [(-0.667194, -1.1, -0.5602656), (1.1500001, 1.2400937, 0.9979057)], + 14: [(-0.73815393, -1.1, -0.57598823), (1.1500001, 1.2508192, 1.043793)], + 15: [(-0.81238395, -1.1, -0.5918639), (1.1500001, 1.2614484, 1.1175785)], + 16: [(-0.88321716, -1.1, -0.6063359), (1.1500001, 1.2705263, 1.1887603)], + 17: [(-0.9452665, -1.1, -0.61833394), (1.1500001, 1.2768508, 1.2523702)], + 18: [(-0.99459726, -1.1, -0.627342), (1.1500001, 1.2796712, 1.3050969)], + 19: [(-1.0285345, -1.1, -0.6333591), (1.1500001, 1.2787417, 1.3452278)], + 20: [(-1.045087, -1.1, -0.63674504), (1.1500001, 1.274113, 1.3721766)], + 21: [(-1.0516249, -1.1, -0.6386975), (1.1500001, 1.2677301, 1.3911098)], + 22: [(-1.0569466, -1.1, -0.6401472), (1.1500001, 1.2616183, 1.4074625)], + 23: [(-1.0611994, -1.1, -0.6411766), (1.1500001, 1.2558869, 1.4214001)], + 24: [(-1.0645281, -1.1, -0.6418665), (1.1500001, 1.2506415, 1.4330891)], + 25: [(-1.0670716, -1.1, -0.6422943), (1.1500001, 1.2459813, 1.4426905)], + 26: [(-1.0689579, -1.1, -0.64253145), (1.1500001, 1.2419995, 1.450351)], + 27: [(-1.0703001, -1.1, -0.64264154), (1.1500001, 1.2387818, 1.4561967)], + 28: [(-1.0711914, -1.1, -0.64267826), (1.1500001, 1.2364055, 1.4603246)], + 29: [(-1.0717006, -1.1, -0.64268243), (1.1500001, 1.2349387, 1.4627949)], + 30: [(-1.071867, -1.1, -0.64268076), (1.1500001, 1.2344389, 1.4636234)], } rel skel:skeleton = @@ -271,6 +271,124 @@ def Xform "Root" ( uniform token subdivisionScheme = "none" } + def Mesh "MeshWithFaceVaryingNormals" ( + prepend apiSchemas = ["SkelBindingAPI"] + ) + { + float3[] extent.timeSamples = { + 1: [(1.05, -1, 0.45), (1.1500001, 1, 0.55)], + 2: [(1.05, -1, 0.44998384), (1.1500001, 0.9945397, 0.56193525)], + 3: [(1.05, -1, 0.44978154), (1.1500001, 0.979205, 0.5935197)], + 4: [(1.05, -1, 0.4490786), (1.1500001, 0.95522165, 0.63815486)], + 5: [(1.05, -1, 0.44761878), (1.1500001, 0.9241211, 0.68928087)], + 6: [(1.05, -1, 0.44535378), (1.1500001, 0.8883731, 0.7408139)], + 7: [(1.05, -1, 0.44251508), (1.1500001, 0.8516306, 0.78748834)], + 8: [(1.05, -1, 0.4396073), (1.1500001, 0.8186258, 0.8250055)], + 9: [(1.05, -1, 0.43732792), (1.1500001, 0.7947925, 0.8498843)], + 10: [(1.05, -1, 0.43642125), (1.1500001, 0.7856884, 0.85894454)], + 11: [(1.0352827, -1, 0.44329005), (1.1500001, 0.7907433, 0.8739726)], + 12: [(0.99405515, -1, 0.45), (1.1500001, 0.80357623, 0.91463876)], + 13: [(0.9300751, -1, 0.45), (1.1500001, 0.8201066, 0.9737435)], + 14: [(0.84729534, -1, 0.45), (1.1500001, 0.8360248, 1.043793)], + 15: [(0.7507665, -1, 0.45), (1.1500001, 0.8474747, 1.1175785)], + 16: [(0.64700764, -1, 0.45), (1.1500001, 0.8517289, 1.1887603)], + 17: [(0.54387426, -1, 0.45), (1.1500001, 0.8477215, 1.2523702)], + 18: [(0.45008212, -1, 0.45), (1.1500001, 0.8362505, 1.3050969)], + 19: [(0.3746358, -1, 0.45), (1.1500001, 0.819702, 1.3452278)], + 20: [(0.3264075, -1, 0.45), (1.1500001, 0.8012425, 1.3721766)], + 21: [(0.2955728, -1, 0.45), (1.1500001, 0.7835966, 1.3911098)], + 22: [(0.26676354, -1, 0.45), (1.1500001, 0.76753396, 1.4074625)], + 23: [(0.24031153, -1, 0.45), (1.1500001, 0.7531274, 1.4214001)], + 24: [(0.21653181, -1, 0.45), (1.1500001, 0.7404428, 1.4330891)], + 25: [(0.1957213, -1, 0.45), (1.1500001, 0.7295414, 1.4426905)], + 26: [(0.17815928, -1, 0.45), (1.1500001, 0.72048193, 1.450351)], + 27: [(0.16410631, -1, 0.45), (1.1500001, 0.7133228, 1.4561967)], + 28: [(0.1538045, -1, 0.45), (1.1500001, 0.70812464, 1.4603246)], + 29: [(0.14747661, -1, 0.45), (1.1500001, 0.70495236, 1.4627949)], + 30: [(0.14532582, -1, 0.45), (1.1500001, 0.7038776, 1.4636234)], + } + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [1, 4, 5, 0, 4, 8, 9, 5, 8, 10, 11, 9, 10, 6, 7, 11, 6, 2, 3, 7, 2, 1, 0, 3, 2, 6, 4, 1, 6, 10, 8, 4, 0, 5, 7, 3, 5, 9, 11, 7] + normal3f[] normals = [(0, 0, 1), (0, 0, 1), (-0, -0, 1), (-0, -0, 1), (0, 0, 1), (-0, -0, 1), (-0, -0, 1), (-0, -0, 1), (-0, 1, -0), (-0, 1, -0), (-0, 1, -0), (0, 1, 0), (-0, 0, -1), (-0, 0, -1), (0, -0, -1), (-0, -0, -1), (-0, 0, -1), (-0, -0, -1), (0, -0, -1), (0, -0, -1), (-0, -1, -0), (0, -1, -0), (-0, -1, -0), (-0, -1, 0), (1, -0, -0), (1, 0, 0), (1, -0, -0), (1, -0, -0), (1, 0, 0), (1, 0, 0), (1, -0, -0), (1, -0, -0), (-1, -0, -0), (-1, -0, 0), (-1, 0, -0), (-1, 0, -0), (-1, -0, 0), (-1, -0, 0), (-1, -0, -0), (-1, 0, -0)] ( + interpolation = "faceVarying" + ) + normal3f[] normals.timeSamples = { + 1: [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 2: [(0, 0, 1), (0, -0.0059874505, 0.9999821), (0, -0.0059874505, 0.9999821), (0, 0, 1), (0, -0.0059874505, 0.9999821), (0, -0.011974686, 0.9999283), (0, -0.011974686, 0.9999283), (0, -0.0059874505, 0.9999821), (0, 0.9999283, 0.011974686), (0, 0.9999283, 0.011974686), (0, 0.9999283, 0.011974686), (0, 0.9999283, 0.011974686), (0, 0.011974686, -0.9999283), (0, 0.0059874505, -0.9999821), (0, 0.0059874505, -0.9999821), (0, 0.011974686, -0.9999283), (0, 0.0059874505, -0.9999821), (0, 0, -1), (0, 0, -1), (0, 0.0059874505, -0.9999821), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 3: [(0, 0, 1), (0, -0.022032166, 0.99975723), (0, -0.022032166, 0.99975723), (0, 0, 1), (0, -0.022032166, 0.99975723), (0, -0.044053636, 0.99902916), (0, -0.044053636, 0.99902916), (0, -0.022032166, 0.99975723), (0, 0.99902916, 0.044053636), (0, 0.99902916, 0.044053636), (0, 0.99902916, 0.044053636), (0, 0.99902916, 0.044053636), (0, 0.044053636, -0.99902916), (0, 0.022032166, -0.99975723), (0, 0.022032166, -0.99975723), (0, 0.044053636, -0.99902916), (0, 0.022032166, -0.99975723), (0, 0, -1), (0, 0, -1), (0, 0.022032166, -0.99975723), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 4: [(0, 0, 1), (0, -0.045249943, 0.9989757), (0, -0.045249943, 0.9989757), (0, 0, 1), (0, -0.045249943, 0.9989757), (0, -0.090407185, 0.9959049), (0, -0.090407185, 0.9959049), (0, -0.045249943, 0.9989757), (0, 0.9959049, 0.090407185), (0, 0.9959049, 0.090407185), (0, 0.9959049, 0.090407185), (0, 0.9959049, 0.090407185), (0, 0.090407185, -0.9959049), (0, 0.045249943, -0.9989757), (0, 0.045249943, -0.9989757), (0, 0.090407185, -0.9959049), (0, 0.045249943, -0.9989757), (0, 0, -1), (0, 0, -1), (0, 0.045249943, -0.9989757), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 5: [(0, 0, 1), (0, -0.07274352, 0.99735063), (0, -0.07274352, 0.99735063), (0, 0, 1), (0, -0.07274352, 0.99735063), (0, -0.14510162, 0.9894168), (0, -0.14510162, 0.9894168), (0, -0.07274352, 0.99735063), (0, 0.9894168, 0.14510162), (0, 0.9894168, 0.14510162), (0, 0.9894168, 0.14510162), (0, 0.9894168, 0.14510162), (0, 0.14510162, -0.9894168), (0, 0.07274352, -0.99735063), (0, 0.07274352, -0.99735063), (0, 0.14510162, -0.9894168), (0, 0.07274352, -0.99735063), (0, 0, -1), (0, 0, -1), (0, 0.07274352, -0.99735063), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 6: [(0, 0, 1), (0, -0.10161159, 0.9948242), (0, -0.10161159, 0.9948242), (0, 0, 1), (0, -0.10161159, 0.9948242), (0, -0.20217134, 0.9793502), (0, -0.20217134, 0.9793502), (0, -0.10161159, 0.9948242), (0, 0.9793502, 0.20217134), (0, 0.9793502, 0.20217134), (0, 0.9793502, 0.20217134), (0, 0.9793502, 0.20217134), (0, 0.20217134, -0.9793502), (0, 0.10161159, -0.9948242), (0, 0.10161159, -0.9948242), (0, 0.20217134, -0.9793502), (0, 0.10161159, -0.9948242), (0, 0, -1), (0, 0, -1), (0, 0.10161159, -0.9948242), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 7: [(0, 0, 1), (0, -0.12896946, 0.99164855), (0, -0.12896946, 0.99164855), (0, 0, 1), (0, -0.12896946, 0.99164855), (0, -0.25578478, 0.9667338), (0, -0.25578478, 0.9667338), (0, -0.12896946, 0.99164855), (0, 0.9667338, 0.25578478), (0, 0.9667338, 0.25578478), (0, 0.9667338, 0.25578478), (0, 0.9667338, 0.25578478), (0, 0.25578478, -0.9667338), (0, 0.12896946, -0.99164855), (0, 0.12896946, -0.99164855), (0, 0.25578478, -0.9667338), (0, 0.12896946, -0.99164855), (0, 0, -1), (0, 0, -1), (0, 0.12896946, -0.99164855), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 8: [(0, 0, 1), (0, -0.15197003, 0.98838514), (0, -0.15197003, 0.98838514), (0, 0, 1), (0, -0.15197003, 0.98838514), (0, -0.30040982, 0.9538102), (0, -0.30040982, 0.9538102), (0, -0.15197003, 0.98838514), (0, 0.9538102, 0.30040982), (0, 0.9538102, 0.30040982), (0, 0.9538102, 0.30040982), (0, 0.9538102, 0.30040982), (0, 0.30040982, -0.9538102), (0, 0.15197003, -0.98838514), (0, 0.15197003, -0.98838514), (0, 0.30040982, -0.9538102), (0, 0.15197003, -0.98838514), (0, 0, -1), (0, 0, -1), (0, 0.15197003, -0.98838514), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 9: [(0, 0, 1), (0, -0.16780986, 0.98581934), (0, -0.16780986, 0.98581934), (0, 0, 1), (0, -0.16780986, 0.98581934), (0, -0.33086044, 0.9436797), (0, -0.33086044, 0.9436797), (0, -0.16780986, 0.98581934), (0, 0.9436797, 0.33086044), (0, 0.9436797, 0.33086044), (0, 0.9436797, 0.33086044), (0, 0.9436797, 0.33086044), (0, 0.33086044, -0.9436797), (0, 0.16780986, -0.98581934), (0, 0.16780986, -0.98581934), (0, 0.33086044, -0.9436797), (0, 0.16780986, -0.98581934), (0, 0, -1), (0, 0, -1), (0, 0.16780986, -0.98581934), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 10: [(0, 0, 1), (0, -0.17370942, 0.98479694), (0, -0.17370942, 0.98479694), (0, 0, 1), (0, -0.17370942, 0.98479694), (0, -0.342137, 0.9396501), (0, -0.342137, 0.9396501), (0, -0.17370942, 0.98479694), (0, 0.9396501, 0.342137), (0, 0.9396501, 0.342137), (0, 0.9396501, 0.342137), (0, 0.9396501, 0.342137), (0, 0.342137, -0.9396501), (0, 0.17370942, -0.98479694), (0, 0.17370942, -0.98479694), (0, 0.342137, -0.9396501), (0, 0.17370942, -0.98479694), (0, 0, -1), (0, 0, -1), (0, 0.17370942, -0.98479694), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)], + 11: [(0, 0, 1), (-0.005485988, -0.17374784, 0.9847749), (-0.005485988, -0.17374784, 0.9847749), (0, 0, 1), (-0.005485988, -0.17374784, 0.9847749), (-0.010804928, -0.34220505, 0.9395632), (-0.010804928, -0.34220505, 0.9395632), (-0.005485988, -0.17374784, 0.9847749), (-0.008673689, 0.9396148, 0.34212404), (-0.008673689, 0.9396148, 0.34212404), (-0.008673689, 0.9396148, 0.34212404), (-0.008673689, 0.9396148, 0.34212404), (0.010804928, 0.34220505, -0.9395632), (0.005485988, 0.17374784, -0.9847749), (0.005485988, 0.17374784, -0.9847749), (0.010804928, 0.34220505, -0.9395632), (0.005485988, 0.17374784, -0.9847749), (0, 0, -1), (0, 0, -1), (0.005485988, 0.17374784, -0.9847749), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.99997604, 0.0022264805, 0.0065604816), (0.99997604, 0.0022264805, 0.0065604816), (1, 0, 0), (0.99997604, 0.0022264805, 0.0065604816), (0.99990404, 0.004452854, 0.013120648), (0.99990404, 0.004452854, 0.013120648), (0.99997604, 0.0022264805, 0.0065604816), (-1, 0, 0), (-0.99997604, -0.0022264805, -0.0065604816), (-0.99997604, -0.0022264805, -0.0065604816), (-1, 0, 0), (-0.99997604, -0.0022264805, -0.0065604816), (-0.99990404, -0.004452854, -0.013120648), (-0.99990404, -0.004452854, -0.013120648), (-0.99997604, -0.0022264805, -0.0065604816)], + 12: [(0, 0, 1), (-0.020613281, -0.17424497, 0.9844865), (-0.020613281, -0.17424497, 0.9844865), (0, 0, 1), (-0.020613281, -0.17424497, 0.9844865), (-0.040586997, -0.34308368, 0.93842757), (-0.040586997, -0.34308368, 0.93842757), (-0.020613281, -0.17424497, 0.9844865), (-0.032211393, 0.93916255, 0.34195924), (-0.032211393, 0.93916255, 0.34195924), (-0.032211393, 0.93916255, 0.34195924), (-0.032211393, 0.93916255, 0.34195924), (0.040586997, 0.34308368, -0.93842757), (0.020613281, 0.17424497, -0.9844865), (0.020613281, 0.17424497, -0.9844865), (0.040586997, 0.34308368, -0.93842757), (0.020613281, 0.17424497, -0.9844865), (0, 0, -1), (0, 0, -1), (0.020613281, 0.17424497, -0.9844865), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.99966407, 0.008177225, 0.024592755), (0.99966407, 0.008177225, 0.024592755), (1, 0, 0), (0.99966407, 0.008177225, 0.024592755), (0.9986567, 0.016348956, 0.049168993), (0.9986567, 0.016348956, 0.049168993), (0.99966407, 0.008177225, 0.024592755), (-1, 0, 0), (-0.99966407, -0.008177225, -0.024592755), (-0.99966407, -0.008177225, -0.024592755), (-1, 0, 0), (-0.99966407, -0.008177225, -0.024592755), (-0.9986567, -0.016348956, -0.049168993), (-0.9986567, -0.016348956, -0.049168993), (-0.99966407, -0.008177225, -0.024592755)], + 13: [(0, 0, 1), (-0.04333884, -0.17604402, 0.9834278), (-0.04333884, -0.17604402, 0.9834278), (0, 0, 1), (-0.04333884, -0.17604402, 0.9834278), (-0.08524124, -0.34625316, 0.93426055), (-0.08524124, -0.34625316, 0.93426055), (-0.04333884, -0.17604402, 0.9834278), (-0.06686223, 0.9375475, 0.3413709), (-0.06686223, 0.9375475, 0.3413709), (-0.06686223, 0.9375475, 0.3413709), (-0.06686223, 0.9375475, 0.3413709), (0.08524124, 0.34625316, -0.93426055), (0.04333884, 0.17604402, -0.9834278), (0.04333884, 0.17604402, -0.9834278), (0.08524124, 0.34625316, -0.93426055), (0.04333884, 0.17604402, -0.9834278), (0, 0, -1), (0, 0, -1), (0.04333884, 0.17604402, -0.9834278), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9985275, 0.016708536, 0.05161048), (0.9985275, 0.016708536, 0.05161048), (1, 0, 0), (0.9985275, 0.016708536, 0.05161048), (0.9941144, 0.033367865, 0.10306897), (0.9941144, 0.033367865, 0.10306897), (0.9985275, 0.016708536, 0.05161048), (-1, 0, 0), (-0.9985275, -0.016708536, -0.05161048), (-0.9985275, -0.016708536, -0.05161048), (-1, 0, 0), (-0.9985275, -0.016708536, -0.05161048), (-0.9941144, -0.033367865, -0.10306897), (-0.9941144, -0.033367865, -0.10306897), (-0.9985275, -0.016708536, -0.05161048)], + 14: [(0, 0, 1), (-0.0715251, -0.17998084, 0.98106635), (-0.0715251, -0.17998084, 0.98106635), (0, 0, 1), (-0.0715251, -0.17998084, 0.98106635), (-0.14034173, -0.35314628, 0.92498213), (-0.14034173, -0.35314628, 0.92498213), (-0.0715251, -0.17998084, 0.98106635), (-0.10882607, 0.9340696, 0.34010425), (-0.10882607, 0.9340696, 0.34010425), (-0.10882607, 0.9340696, 0.34010425), (-0.10882607, 0.9340696, 0.34010425), (0.14034173, 0.35314628, -0.92498213), (0.0715251, 0.17998084, -0.98106635), (0.0715251, 0.17998084, -0.98106635), (0.14034173, 0.35314628, -0.92498213), (0.0715251, 0.17998084, -0.98106635), (0, 0, -1), (0, 0, -1), (0.0715251, 0.17998084, -0.98106635), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9960182, 0.026571484, 0.08509908), (0.9960182, 0.026571484, 0.08509908), (1, 0, 0), (0.9960182, 0.026571484, 0.08509908), (0.9841042, 0.052931357, 0.16952044), (0.9841042, 0.052931357, 0.16952044), (0.9960182, 0.026571484, 0.08509908), (-1, 0, 0), (-0.9960182, -0.026571484, -0.08509908), (-0.9960182, -0.026571484, -0.08509908), (-1, 0, 0), (-0.9960182, -0.026571484, -0.08509908), (-0.9841042, -0.052931357, -0.16952044), (-0.9841042, -0.052931357, -0.16952044), (-0.9960182, -0.026571484, -0.08509908)], + 15: [(0, 0, 1), (-0.10296059, -0.18652555, 0.9770401), (-0.10296059, -0.18652555, 0.9770401), (0, 0, 1), (-0.10296059, -0.18652555, 0.9770401), (-0.20119324, -0.3644859, 0.9092147), (-0.20119324, -0.3644859, 0.9092147), (-0.10296059, -0.18652555, 0.9770401), (-0.15427068, 0.9284015, 0.33804014), (-0.15427068, 0.9284015, 0.33804014), (-0.15427068, 0.9284015, 0.33804014), (-0.15427068, 0.9284015, 0.33804014), (0.20119324, 0.3644859, -0.9092147), (0.10296059, 0.18652555, -0.9770401), (0.10296059, 0.18652555, -0.9770401), (0.20119324, 0.3644859, -0.9092147), (0.10296059, 0.18652555, -0.9770401), (0, 0, -1), (0, 0, -1), (0.10296059, 0.18652555, -0.9770401), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.99179816, 0.03642564, 0.122513644), (0.99179816, 0.03642564, 0.122513644), (1, 0, 0), (0.99179816, 0.03642564, 0.122513644), (0.9673272, 0.07225376, 0.24301761), (0.9673272, 0.07225376, 0.24301761), (0.99179816, 0.03642564, 0.122513644), (-1, 0, 0), (-0.99179816, -0.03642564, -0.122513644), (-0.99179816, -0.03642564, -0.122513644), (-1, 0, 0), (-0.99179816, -0.03642564, -0.122513644), (-0.9673272, -0.07225376, -0.24301761), (-0.9673272, -0.07225376, -0.24301761), (-0.99179816, -0.03642564, -0.122513644)], + 16: [(0, 0, 1), (-0.13545798, -0.19555421, 0.97129285), (-0.13545798, -0.19555421, 0.97129285), (0, 0, 1), (-0.13545798, -0.19555421, 0.97129285), (-0.2631387, -0.37988076, 0.8868194), (-0.2631387, -0.37988076, 0.8868194), (-0.13545798, -0.19555421, 0.97129285), (-0.19939105, 0.9207824, 0.33526558), (-0.19939105, 0.9207824, 0.33526558), (-0.19939105, 0.9207824, 0.33526558), (-0.19939105, 0.9207824, 0.33526558), (0.2631387, 0.37988076, -0.8868194), (0.13545798, 0.19555421, -0.97129285), (0.13545798, 0.19555421, -0.97129285), (0.2631387, 0.37988076, -0.8868194), (0.13545798, 0.19555421, -0.97129285), (0, 0, -1), (0, 0, -1), (0.13545798, 0.19555421, -0.97129285), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.98588246, 0.04493563, 0.16129626), (0.98588246, 0.04493563, 0.16129626), (1, 0, 0), (0.98588246, 0.04493563, 0.16129626), (0.94392866, 0.088602506, 0.31803834), (0.94392866, 0.088602506, 0.31803834), (0.98588246, 0.04493563, 0.16129626), (-1, 0, 0), (-0.98588246, -0.04493563, -0.16129626), (-0.98588246, -0.04493563, -0.16129626), (-1, 0, 0), (-0.98588246, -0.04493563, -0.16129626), (-0.94392866, -0.088602506, -0.31803834), (-0.94392866, -0.088602506, -0.31803834), (-0.98588246, -0.04493563, -0.16129626)], + 17: [(0, 0, 1), (-0.16699407, -0.20625873, 0.96414226), (-0.16699407, -0.20625873, 0.96414226), (0, 0, 1), (-0.16699407, -0.20625873, 0.96414226), (-0.3220121, -0.39772555, 0.85914063), (-0.3220121, -0.39772555, 0.85914063), (-0.16699407, -0.20625873, 0.96414226), (-0.24048585, 0.91207445, 0.33209464), (-0.24048585, 0.91207445, 0.33209464), (-0.24048585, 0.91207445, 0.33209464), (-0.24048585, 0.91207445, 0.33209464), (0.3220121, 0.39772555, -0.85914063), (0.16699407, 0.20625873, -0.96414226), (0.16699407, 0.20625873, -0.96414226), (0.3220121, 0.39772555, -0.85914063), (0.16699407, 0.20625873, -0.96414226), (0, 0, -1), (0, 0, -1), (0.16699407, 0.20625873, -0.96414226), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9786937, 0.05092127, 0.19891123), (0.9786937, 0.05092127, 0.19891123), (1, 0, 0), (0.9786937, 0.05092127, 0.19891123), (0.91568273, 0.09967265, 0.38934636), (0.91568273, 0.09967265, 0.38934636), (0.9786937, 0.05092127, 0.19891123), (-1, 0, 0), (-0.9786937, -0.05092127, -0.19891123), (-0.9786937, -0.05092127, -0.19891123), (-1, 0, 0), (-0.9786937, -0.05092127, -0.19891123), (-0.91568273, -0.09967265, -0.38934636), (-0.91568273, -0.09967265, -0.38934636), (-0.9786937, -0.05092127, -0.19891123)], + 18: [(0, 0, 1), (-0.1958295, -0.21719266, 0.95628357), (-0.1958295, -0.21719266, 0.95628357), (0, 0, 1), (-0.1958295, -0.21719266, 0.95628357), (-0.37453702, -0.41539553, 0.8289563), (-0.37453702, -0.41539553, 0.8289563), (-0.1958295, -0.21719266, 0.95628357), (-0.27401134, 0.903687, 0.32904044), (-0.27401134, 0.903687, 0.32904044), (-0.27401134, 0.903687, 0.32904044), (-0.27401134, 0.903687, 0.32904044), (0.37453702, 0.41539553, -0.8289563), (0.1958295, 0.21719266, -0.95628357), (0.1958295, 0.21719266, -0.95628357), (0.37453702, 0.41539553, -0.8289563), (0.1958295, 0.21719266, -0.95628357), (0, 0, -1), (0, 0, -1), (0.1958295, 0.21719266, -0.95628357), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9710301, 0.05350277, 0.23289049), (0.9710301, 0.05350277, 0.23289049), (1, 0, 0), (0.9710301, 0.05350277, 0.23289049), (0.885799, 0.103905596, 0.45228735), (0.885799, 0.103905596, 0.45228735), (0.9710301, 0.05350277, 0.23289049), (-1, 0, 0), (-0.9710301, -0.05350277, -0.23289049), (-0.9710301, -0.05350277, -0.23289049), (-1, 0, 0), (-0.9710301, -0.05350277, -0.23289049), (-0.885799, -0.103905596, -0.45228735), (-0.885799, -0.103905596, -0.45228735), (-0.9710301, -0.05350277, -0.23289049)], + 19: [(0, 0, 1), (-0.22054033, -0.22643511, 0.9487303), (-0.22054033, -0.22643511, 0.9487303), (0, 0, 1), (-0.22054033, -0.22643511, 0.9487303), (-0.4184666, -0.4296517, 0.80017823), (-0.4184666, -0.4296517, 0.80017823), (-0.22054033, -0.22643511, 0.9487303), (-0.2965754, 0.8973754, 0.32674214), (-0.2965754, 0.8973754, 0.32674214), (-0.2965754, 0.8973754, 0.32674214), (-0.2965754, 0.8973754, 0.32674214), (0.4184666, 0.4296517, -0.80017823), (0.22054033, 0.22643511, -0.9487303), (0.22054033, 0.22643511, -0.9487303), (0.4184666, 0.4296517, -0.80017823), (0.22054033, 0.22643511, -0.9487303), (0, 0, -1), (0, 0, -1), (0.22054033, 0.22643511, -0.9487303), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.963962, 0.05217139, 0.2608742), (0.963962, 0.05217139, 0.2608742), (1, 0, 0), (0.963962, 0.05217139, 0.2608742), (0.8584456, 0.10058248, 0.5029457), (0.8584456, 0.10058248, 0.5029457), (0.963962, 0.05217139, 0.2608742), (-1, 0, 0), (-0.963962, -0.05217139, -0.2608742), (-0.963962, -0.05217139, -0.2608742), (-1, 0, 0), (-0.963962, -0.05217139, -0.2608742), (-0.8584456, -0.10058248, -0.5029457), (-0.8584456, -0.10058248, -0.5029457), (-0.963962, -0.05217139, -0.2608742)], + 20: [(0, 0, 1), (-0.23991236, -0.23185027, 0.94270223), (-0.23991236, -0.23185027, 0.94270223), (0, 0, 1), (-0.23991236, -0.23185027, 0.94270223), (-0.45233184, -0.43713152, 0.77737504), (-0.45233184, -0.43713152, 0.77737504), (-0.23991236, -0.23185027, 0.94270223), (-0.3048477, 0.8949245, 0.32584968), (-0.3048477, 0.8949245, 0.32584968), (-0.3048477, 0.8949245, 0.32584968), (-0.3048477, 0.8949245, 0.32584968), (0.45233184, 0.43713152, -0.77737504), (0.23991236, 0.23185027, -0.94270223), (0.23991236, 0.23185027, -0.94270223), (0.45233184, 0.43713152, -0.77737504), (0.23991236, 0.23185027, -0.94270223), (0, 0, -1), (0, 0, -1), (0.23991236, 0.23185027, -0.94270223), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9586791, 0.04672511, 0.28062642), (0.9586791, 0.04672511, 0.28062642), (1, 0, 0), (0.9586791, 0.04672511, 0.28062642), (0.8381312, 0.08958877, 0.5380613), (0.8381312, 0.08958877, 0.5380613), (0.9586791, 0.04672511, 0.28062642), (-1, 0, 0), (-0.9586791, -0.04672511, -0.28062642), (-0.9586791, -0.04672511, -0.28062642), (-1, 0, 0), (-0.9586791, -0.04672511, -0.28062642), (-0.8381312, -0.08958877, -0.5380613), (-0.8381312, -0.08958877, -0.5380613), (-0.9586791, -0.04672511, -0.28062642)], + 21: [(0, 0, 1), (-0.25556487, -0.23446234, 0.9379307), (-0.25556487, -0.23446234, 0.9379307), (0, 0, 1), (-0.25556487, -0.23446234, 0.9379307), (-0.47940427, -0.43981886, 0.759428), (-0.47940427, -0.43981886, 0.759428), (-0.25556487, -0.23446234, 0.9379307), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (0.47940427, 0.43981886, -0.759428), (0.25556487, 0.23446234, -0.9379307), (0.25556487, 0.23446234, -0.9379307), (0.47940427, 0.43981886, -0.759428), (0.25556487, 0.23446234, -0.9379307), (0, 0, -1), (0, 0, -1), (0.25556487, 0.23446234, -0.9379307), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.95471084, 0.039434, 0.29491043), (0.95471084, 0.039434, 0.29491043), (1, 0, 0), (0.95471084, 0.039434, 0.29491043), (0.8229456, 0.075296134, 0.5631084), (0.8229456, 0.075296134, 0.5631084), (0.95471084, 0.039434, 0.29491043), (-1, 0, 0), (-0.95471084, -0.039434, -0.29491043), (-0.95471084, -0.039434, -0.29491043), (-1, 0, 0), (-0.95471084, -0.039434, -0.29491043), (-0.8229456, -0.075296134, -0.5631084), (-0.8229456, -0.075296134, -0.5631084), (-0.95471084, -0.039434, -0.29491043)], + 22: [(0, 0, 1), (-0.26986712, -0.23671272, 0.9333482), (-0.26986712, -0.23671272, 0.9333482), (0, 0, 1), (-0.26986712, -0.23671272, 0.9333482), (-0.50376, -0.44187078, 0.7422777), (-0.50376, -0.44187078, 0.7422777), (-0.26986712, -0.23671272, 0.9333482), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (0.50376, 0.44187078, -0.7422777), (0.26986712, 0.23671272, -0.9333482), (0.26986712, 0.23671272, -0.9333482), (0.50376, 0.44187078, -0.7422777), (0.26986712, 0.23671272, -0.9333482), (0, 0, -1), (0, 0, -1), (0.26986712, 0.23671272, -0.9333482), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.95085907, 0.032671273, 0.3078955), (0.95085907, 0.032671273, 0.3078955), (1, 0, 0), (0.95085907, 0.032671273, 0.3078955), (0.8082659, 0.06213155, 0.58553046), (0.8082659, 0.06213155, 0.58553046), (0.95085907, 0.032671273, 0.3078955), (-1, 0, 0), (-0.95085907, -0.032671273, -0.3078955), (-0.95085907, -0.032671273, -0.3078955), (-1, 0, 0), (-0.95085907, -0.032671273, -0.3078955), (-0.8082659, -0.06213155, -0.58553046), (-0.8082659, -0.06213155, -0.58553046), (-0.95085907, -0.032671273, -0.3078955)], + 23: [(0, 0, 1), (-0.28274772, -0.23862599, 0.9290378), (-0.28274772, -0.23862599, 0.9290378), (0, 0, 1), (-0.28274772, -0.23862599, 0.9290378), (-0.5253667, -0.44338518, 0.7262227), (-0.5253667, -0.44338518, 0.7262227), (-0.28274772, -0.23862599, 0.9290378), (-0.3048477, 0.8949245, 0.3258497), (-0.3048477, 0.8949245, 0.3258497), (-0.3048477, 0.8949245, 0.3258497), (-0.3048477, 0.8949245, 0.3258497), (0.5253667, 0.44338518, -0.7262227), (0.28274772, 0.23862599, -0.9290378), (0.28274772, 0.23862599, -0.9290378), (0.5253667, 0.44338518, -0.7262227), (0.28274772, 0.23862599, -0.9290378), (0, 0, -1), (0, 0, -1), (0.28274772, 0.23862599, -0.9290378), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9472041, 0.026497303, 0.31953433), (0.9472041, 0.026497303, 0.31953433), (1, 0, 0), (0.9472041, 0.026497303, 0.31953433), (0.7943914, 0.05019671, 0.6053285), (0.7943914, 0.05019671, 0.6053285), (0.9472041, 0.026497303, 0.31953433), (-1, 0, 0), (-0.9472041, -0.026497303, -0.31953433), (-0.9472041, -0.026497303, -0.31953433), (-1, 0, 0), (-0.9472041, -0.026497303, -0.31953433), (-0.7943914, -0.05019671, -0.6053285), (-0.7943914, -0.05019671, -0.6053285), (-0.9472041, -0.026497303, -0.31953433)], + 24: [(0, 0, 1), (-0.29413688, -0.24022664, 0.9250809), (-0.29413688, -0.24022664, 0.9250809), (0, 0, 1), (-0.29413688, -0.24022664, 0.9250809), (-0.54420084, -0.44445816, 0.71154934), (-0.54420084, -0.44445816, 0.71154934), (-0.29413688, -0.24022664, 0.9250809), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (-0.3048477, 0.8949245, 0.32584974), (0.54420084, 0.44445816, -0.71154934), (0.29413688, 0.24022664, -0.9250809), (0.29413688, 0.24022664, -0.9250809), (0.54420084, 0.44445816, -0.71154934), (0.29413688, 0.24022664, -0.9250809), (0, 0, -1), (0, 0, -1), (0.29413688, 0.24022664, -0.9250809), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.94382447, 0.020971304, 0.3297809), (0.94382447, 0.020971304, 0.3297809), (1, 0, 0), (0.94382447, 0.020971304, 0.3297809), (0.7816095, 0.039586466, 0.6225107), (0.7816095, 0.039586466, 0.6225107), (0.94382447, 0.020971304, 0.3297809), (-1, 0, 0), (-0.94382447, -0.020971304, -0.3297809), (-0.94382447, -0.020971304, -0.3297809), (-1, 0, 0), (-0.94382447, -0.020971304, -0.3297809), (-0.7816095, -0.039586466, -0.6225107), (-0.7816095, -0.039586466, -0.6225107), (-0.94382447, -0.020971304, -0.3297809)], + 25: [(0, 0, 1), (-0.30396557, -0.24153812, 0.92155534), (-0.30396557, -0.24153812, 0.92155534), (0, 0, 1), (-0.30396557, -0.24153812, 0.92155534), (-0.56024224, -0.44518152, 0.6985286), (-0.56024224, -0.44518152, 0.6985286), (-0.30396557, -0.24153812, 0.92155534), (-0.30484772, 0.8949245, 0.32584974), (-0.30484772, 0.8949245, 0.32584974), (-0.30484772, 0.8949245, 0.32584974), (-0.30484772, 0.8949245, 0.32584974), (0.56024224, 0.44518152, -0.6985286), (0.30396557, 0.24153812, -0.92155534), (0.30396557, 0.24153812, -0.92155534), (0.56024224, 0.44518152, -0.6985286), (0.30396557, 0.24153812, -0.92155534), (0, 0, -1), (0, 0, -1), (0.30396557, 0.24153812, -0.92155534), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.94079554, 0.016151242, 0.3385895), (0.94079554, 0.016151242, 0.3385895), (1, 0, 0), (0.94079554, 0.016151242, 0.3385895), (0.77019256, 0.030390033, 0.637087), (0.77019256, 0.030390033, 0.637087), (0.94079554, 0.016151242, 0.3385895), (-1, 0, 0), (-0.94079554, -0.016151242, -0.3385895), (-0.94079554, -0.016151242, -0.3385895), (-1, 0, 0), (-0.94079554, -0.016151242, -0.3385895), (-0.77019256, -0.030390033, -0.637087), (-0.77019256, -0.030390033, -0.637087), (-0.94079554, -0.016151242, -0.3385895)], + 26: [(0, 0, 1), (-0.31216502, -0.24258198, 0.91853523), (-0.31216502, -0.24258198, 0.91853523), (0, 0, 1), (-0.31216502, -0.24258198, 0.91853523), (-0.5734692, -0.44564024, 0.68741393), (-0.5734692, -0.44564024, 0.68741393), (-0.31216502, -0.24258198, 0.91853523), (-0.30484766, 0.8949245, 0.3258497), (-0.30484766, 0.8949245, 0.3258497), (-0.30484766, 0.8949245, 0.3258497), (-0.30484766, 0.8949245, 0.3258497), (0.5734692, 0.44564024, -0.68741393), (0.31216502, 0.24258198, -0.91853523), (0.31216502, 0.24258198, -0.91853523), (0.5734692, 0.44564024, -0.68741393), (0.31216502, 0.24258198, -0.91853523), (0, 0, -1), (0, 0, -1), (0.31216502, 0.24258198, -0.91853523), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9381885, 0.012093392, 0.34591344), (0.9381885, 0.012093392, 0.34591344), (1, 0, 0), (0.9381885, 0.012093392, 0.34591344), (0.7603953, 0.022691762, 0.649064), (0.7603953, 0.022691762, 0.649064), (0.9381885, 0.012093392, 0.34591344), (-1, 0, 0), (-0.9381885, -0.012093392, -0.34591344), (-0.9381885, -0.012093392, -0.34591344), (-1, 0, 0), (-0.9381885, -0.012093392, -0.34591344), (-0.7603953, -0.022691762, -0.649064), (-0.7603953, -0.022691762, -0.649064), (-0.9381885, -0.012093392, -0.34591344)], + 27: [(0, 0, 1), (-0.3186665, -0.24337682, 0.9160892), (-0.3186665, -0.24337682, 0.9160892), (0, 0, 1), (-0.3186665, -0.24337682, 0.9160892), (-0.58385384, -0.44590974, 0.6784388), (-0.58385384, -0.44590974, 0.6784388), (-0.3186665, -0.24337682, 0.9160892), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (0.58385384, 0.44590974, -0.6784388), (0.3186665, 0.24337682, -0.9160892), (0.3186665, 0.24337682, -0.9160892), (0.58385384, 0.44590974, -0.6784388), (0.3186665, 0.24337682, -0.9160892), (0, 0, -1), (0, 0, -1), (0.3186665, 0.24337682, -0.9160892), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9360692, 0.008851839, 0.35170457), (0.9360692, 0.008851839, 0.35170457), (1, 0, 0), (0.9360692, 0.008851839, 0.35170457), (0.75245106, 0.016571868, 0.65843964), (0.75245106, 0.016571868, 0.65843964), (0.9360692, 0.008851839, 0.35170457), (-1, 0, 0), (-0.9360692, -0.008851839, -0.35170457), (-0.9360692, -0.008851839, -0.35170457), (-1, 0, 0), (-0.9360692, -0.008851839, -0.35170457), (-0.75245106, -0.016571868, -0.65843964), (-0.75245106, -0.016571868, -0.65843964), (-0.9360692, -0.008851839, -0.35170457)], + 28: [(0, 0, 1), (-0.32339996, -0.243937, 0.9142796), (-0.32339996, -0.243937, 0.9142796), (0, 0, 1), (-0.32339996, -0.243937, 0.9142796), (-0.591356, -0.44605327, 0.6718144), (-0.591356, -0.44605327, 0.6718144), (-0.32339996, -0.243937, 0.9142796), (-0.3048477, 0.8949245, 0.32584968), (-0.3048477, 0.8949245, 0.32584968), (-0.3048477, 0.8949245, 0.32584968), (-0.3048477, 0.8949245, 0.32584968), (0.591356, 0.44605327, -0.6718144), (0.32339996, 0.243937, -0.9142796), (0.32339996, 0.243937, -0.9142796), (0.591356, 0.44605327, -0.6718144), (0.32339996, 0.243937, -0.9142796), (0, 0, -1), (0, 0, -1), (0.32339996, 0.243937, -0.9142796), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.934497, 0.006478279, 0.3559119), (0.934497, 0.006478279, 0.3559119), (1, 0, 0), (0.934497, 0.006478279, 0.3559119), (0.74656945, 0.012107865, 0.66519725), (0.74656945, 0.012107865, 0.66519725), (0.934497, 0.006478279, 0.3559119), (-1, 0, 0), (-0.934497, -0.006478279, -0.3559119), (-0.934497, -0.006478279, -0.3559119), (-1, 0, 0), (-0.934497, -0.006478279, -0.3559119), (-0.74656945, -0.012107865, -0.66519725), (-0.74656945, -0.012107865, -0.66519725), (-0.934497, -0.006478279, -0.3559119)], + 29: [(0, 0, 1), (-0.32629415, -0.2442718, 0.91316116), (-0.32629415, -0.2442718, 0.91316116), (0, 0, 1), (-0.32629415, -0.2442718, 0.91316116), (-0.5959184, -0.4461191, 0.6677268), (-0.5959184, -0.4461191, 0.6677268), (-0.32629415, -0.2442718, 0.91316116), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (0.5959184, 0.4461191, -0.6677268), (0.32629415, 0.2442718, -0.91316116), (0.32629415, 0.2442718, -0.91316116), (0.5959184, 0.4461191, -0.6677268), (0.32629415, 0.2442718, -0.91316116), (0, 0, -1), (0, 0, -1), (0.32629415, 0.2442718, -0.91316116), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.93352365, 0.005021347, 0.35848066), (0.93352365, 0.005021347, 0.35848066), (1, 0, 0), (0.93352365, 0.005021347, 0.35848066), (0.7429328, 0.009375093, 0.6693004), (0.7429328, 0.009375093, 0.6693004), (0.93352365, 0.005021347, 0.35848066), (-1, 0, 0), (-0.93352365, -0.005021347, -0.35848066), (-0.93352365, -0.005021347, -0.35848066), (-1, 0, 0), (-0.93352365, -0.005021347, -0.35848066), (-0.7429328, -0.009375093, -0.6693004), (-0.7429328, -0.009375093, -0.6693004), (-0.93352365, -0.005021347, -0.35848066)], + 30: [(0, 0, 1), (-0.32727566, -0.244384, 0.91277987), (-0.32727566, -0.244384, 0.91277987), (0, 0, 1), (-0.32727566, -0.244384, 0.91277987), (-0.59746134, -0.44613764, 0.6663342), (-0.59746134, -0.44613764, 0.6663342), (-0.32727566, -0.244384, 0.91277987), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (-0.30484766, 0.8949245, 0.32584968), (0.59746134, 0.44613764, -0.6663342), (0.32727566, 0.244384, -0.91277987), (0.32727566, 0.244384, -0.91277987), (0.59746134, 0.44613764, -0.6663342), (0.32727566, 0.244384, -0.91277987), (0, 0, -1), (0, 0, -1), (0.32727566, 0.244384, -0.91277987), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (0.9331915, 0.004526315, 0.3593511), (0.9331915, 0.004526315, 0.3593511), (1, 0, 0), (0.9331915, 0.004526315, 0.3593511), (0.74169266, 0.008447837, 0.6706868), (0.74169266, 0.008447837, 0.6706868), (0.9331915, 0.004526315, 0.3593511), (-1, 0, 0), (-0.9331915, -0.004526315, -0.3593511), (-0.9331915, -0.004526315, -0.3593511), (-1, 0, 0), (-0.9331915, -0.004526315, -0.3593511), (-0.74169266, -0.008447837, -0.6706868), (-0.74169266, -0.008447837, -0.6706868), (-0.9331915, -0.004526315, -0.3593511)], + } + point3f[] points = [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, 0, 0.55), (1.05, 0, 0.55), (1.1500001, 0, 0.45), (1.05, 0, 0.45), (1.1500001, 1, 0.55), (1.05, 1, 0.55), (1.1500001, 1, 0.45), (1.05, 1, 0.45)] + point3f[] points.timeSamples = { + 1: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, 0, 0.55), (1.05, 0, 0.55), (1.1500001, 0, 0.45), (1.05, 0, 0.45), (1.1500001, 1, 0.55), (1.05, 1, 0.55), (1.1500001, 1, 0.45), (1.05, 1, 0.45)], + 2: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.0032930386, 0.5499803), (1.05, -0.0032930386, 0.5499803), (1.1500001, -0.0026943043, 0.44998384), (1.05, -0.0026943043, 0.44998384), (1.1500001, 0.9933422, 0.56193525), (1.05, 0.9933422, 0.56193525), (1.1500001, 0.9945397, 0.4619424), (1.05, 0.9945397, 0.4619424)], + 3: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.01211475, 0.54973304), (1.05, -0.01211475, 0.54973304), (1.1500001, -0.009912068, 0.44978154), (1.05, -0.009912068, 0.44978154), (1.1500001, 0.97479963, 0.5935197), (1.05, 0.97479963, 0.5935197), (1.1500001, 0.979205, 0.49361676), (1.05, 0.979205, 0.49361676)], + 4: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.024861975, 0.54887384), (1.05, -0.024861975, 0.54887384), (1.1500001, -0.020341614, 0.4490786), (1.05, -0.020341614, 0.4490786), (1.1500001, 0.94618094, 0.63815486), (1.05, 0.94618094, 0.63815486), (1.1500001, 0.95522165, 0.5385644), (1.05, 0.95522165, 0.5385644)], + 5: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.039902944, 0.54708964), (1.05, -0.039902944, 0.54708964), (1.1500001, -0.03264786, 0.44761878), (1.05, -0.03264786, 0.44761878), (1.1500001, 0.90961087, 0.68928087), (1.05, 0.90961087, 0.68928087), (1.1500001, 0.9241211, 0.5903391), (1.05, 0.9241211, 0.5903391)], + 6: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.05559712, 0.5443213), (1.05, -0.05559712, 0.5443213), (1.1500001, -0.04548855, 0.44535378), (1.05, -0.04548855, 0.44535378), (1.1500001, 0.8681559, 0.7408139), (1.05, 0.8681559, 0.7408139), (1.1500001, 0.8883731, 0.6428789), (1.05, 0.8883731, 0.6428789)], + 7: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.070340805, 0.54085183), (1.05, -0.070340805, 0.54085183), (1.1500001, -0.057551567, 0.44251508), (1.05, -0.057551567, 0.44251508), (1.1500001, 0.8260521, 0.78748834), (1.05, 0.8260521, 0.78748834), (1.1500001, 0.8516306, 0.6908149), (1.05, 0.8516306, 0.6908149)], + 8: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.0826127, 0.53729784), (1.05, -0.0826127, 0.53729784), (1.1500001, -0.06759221, 0.4396073), (1.05, -0.06759221, 0.4396073), (1.1500001, 0.7885848, 0.8250055), (1.05, 0.7885848, 0.8250055), (1.1500001, 0.8186258, 0.7296244), (1.05, 0.8186258, 0.7296244)], + 9: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.090986624, 0.5345119), (1.05, -0.090986624, 0.5345119), (1.1500001, -0.07444359, 0.43732792), (1.05, -0.07444359, 0.43732792), (1.1500001, 0.7617065, 0.8498843), (1.05, 0.7617065, 0.8498843), (1.1500001, 0.7947925, 0.7555163), (1.05, 0.7947925, 0.7555163)], + 10: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, -0.09408767, 0.53340375), (1.05, -0.09408767, 0.53340375), (1.1500001, -0.07698082, 0.43642125), (1.05, -0.07698082, 0.43642125), (1.1500001, 0.75147474, 0.85894454), (1.05, 0.75147474, 0.85894454), (1.1500001, 0.7856884, 0.7649795), (1.05, 0.7856884, 0.7649795)], + 11: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1469736, -0.09154599, 0.5409243), (1.0469782, -0.09176864, 0.54026824), (1.1475137, -0.07443573, 0.44394606), (1.0475185, -0.07465838, 0.44329005), (1.1352732, 0.7565228, 0.8739726), (1.0352827, 0.7560775, 0.8726605), (1.1363537, 0.7907433, 0.78001624), (1.0363632, 0.790298, 0.77870417)], + 12: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1380663, -0.08494736, 0.56133974), (1.0381333, -0.08576481, 0.5588813), (1.1400956, -0.067793176, 0.46441835), (1.0401626, -0.06861062, 0.4619599), (1.093921, 0.76926786, 0.91463876), (0.99405515, 0.7676329, 0.90972185), (1.0979797, 0.80357623, 0.82079595), (0.9981139, 0.80194134, 0.81587905)], + 13: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1231744, -0.076033086, 0.5911863), (1.0234686, -0.07770149, 0.58603287), (1.1274366, -0.05872043, 0.49447325), (1.0277307, -0.060388822, 0.4893198), (1.0294867, 0.78548133, 0.9737435), (0.9300751, 0.78214455, 0.9634366), (1.0380108, 0.8201066, 0.88031745), (0.9385992, 0.81676984, 0.87001055)], + 14: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1022661, -0.0666797, 0.6268444), (1.0030607, -0.069326274, 0.6183683), (1.1092832, -0.04902238, 0.53059524), (1.0100777, -0.051668953, 0.52211916), (0.94570595, 0.8007102, 1.043793), (0.84729534, 0.795417, 1.0268409), (0.9597401, 0.8360248, 0.9512947), (0.86132956, 0.8307317, 0.9343427)], + 15: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.075885, -0.058687706, 0.6647692), (0.97751856, -0.0623004, 0.6526183), (1.0859448, -0.040463407, 0.5693084), (0.9875783, -0.0440761, 0.5571575), (0.8474994, 0.8110261, 1.1175785), (0.7507665, 0.80380076, 1.0932767), (0.86761874, 0.8474747, 1.026657), (0.7708859, 0.84024936, 1.0023552)], + 16: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.0453959, -0.05352077, 0.70174736), (0.94819933, -0.0579509, 0.68584543), (1.0585529, -0.034526728, 0.6074064), (0.9613563, -0.03895686, 0.59150445), (0.74140066, 0.81374085, 1.1887603), (0.64700764, 0.80488056, 1.1569564), (0.7677145, 0.8517289, 1.1000783), (0.6733215, 0.8428687, 1.0682744)], + 17: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.0129642, -0.05206275, 0.7351378), (0.91718006, -0.05704639, 0.71567047), (1.0290649, -0.032176465, 0.6421808), (0.93328065, -0.037160106, 0.62271345), (0.6354427, 0.80794895, 1.2523702), (0.54387426, 0.7979817, 1.2134356), (0.6676439, 0.8477215, 1.1664562), (0.5760755, 0.83775425, 1.1275215)], + 18: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.9813368, -0.05448805, 0.76302826), (0.8870467, -0.059683338, 0.7404138), (1.0000637, -0.03371827, 0.6715804), (0.9057735, -0.038913555, 0.64896595), (0.53866214, 0.7947109, 1.3050969), (0.45008212, 0.78432035, 1.259868), (0.57611585, 0.8362505, 1.2222012), (0.48753583, 0.8258599, 1.1769724)], + 19: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.9535279, -0.060319275, 0.78424287), (0.86060554, -0.06534841, 0.75909555), (0.9744513, -0.038836684, 0.6942339), (0.88152885, -0.04386582, 0.6690866), (0.46048045, 0.77673686, 1.3452278), (0.3746358, 0.7666786, 1.2949332), (0.50232714, 0.819702, 1.26521), (0.41648245, 0.80964375, 1.2149154)], + 20: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.9325342, -0.06869762, 0.7981634), (0.84062755, -0.07317706, 0.7712604), (0.95515084, -0.046841037, 0.7092947), (0.8632442, -0.051320482, 0.6823916), (0.4102207, 0.75752926, 1.3721766), (0.3264075, 0.7485704, 1.3183705), (0.4554539, 0.8012425, 1.2944391), (0.37164068, 0.79228354, 1.2406329)], + 21: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.91635764, -0.07765492, 0.80763006), (0.8252102, -0.08141973, 0.7794746), (0.9403279, -0.055663973, 0.7196586), (0.84918046, -0.059428785, 0.69150317), (0.37786746, 0.73961467, 1.3911098), (0.2955728, 0.73208505, 1.3347989), (0.42580792, 0.7835966, 1.315167), (0.34351322, 0.77606696, 1.258856)], + 22: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.901219, -0.08578882, 0.8158064), (0.81080556, -0.0888954, 0.7865298), (0.926407, -0.063695274, 0.7286924), (0.8359936, -0.06680185, 0.6994159), (0.34759024, 0.7233469, 1.4074625), (0.26676354, 0.7171337, 1.3489093), (0.39796624, 0.76753396, 1.3332347), (0.31713954, 0.7613208, 1.2746816)], + 23: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.8872993, -0.09306782, 0.8227751), (0.7975796, -0.09557766, 0.7925087), (0.91356766, -0.070898555, 0.736464), (0.8238479, -0.073408395, 0.7061975), (0.3197508, 0.7087889, 1.4214001), (0.24031153, 0.7037692, 1.3608671), (0.37228748, 0.7531274, 1.3487778), (0.29284823, 0.74810773, 1.2882448)], + 24: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.8747703, -0.099463776, 0.8286197), (0.7856897, -0.1014431, 0.7974942), (0.9019804, -0.07724086, 0.74304223), (0.81289977, -0.07922019, 0.7119167), (0.29469287, 0.695997, 1.4330891), (0.21653181, 0.6920383, 1.370838), (0.34911296, 0.7404428, 1.3619342), (0.2709519, 0.73648417, 1.2996831)], + 25: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.8637942, -0.10495064, 0.8334204), (0.7752844, -0.106470145, 0.801566), (0.89180636, -0.08269156, 0.7484939), (0.80329657, -0.08421106, 0.7166395), (0.27274066, 0.68502325, 1.4426905), (0.1957213, 0.68198425, 1.3789817), (0.3287649, 0.7295414, 1.3728377), (0.25174552, 0.7265024, 1.3091289)], + 26: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.8545233, -0.109503314, 0.8372507), (0.76650345, -0.1106379, 0.8047974), (0.88319683, -0.087221295, 0.75288), (0.7951769, -0.088355884, 0.7204267), (0.2541989, 0.67591786, 1.450351), (0.17815928, 0.6736487, 1.3854445), (0.31154585, 0.72048193, 1.3816096), (0.23550622, 0.7182127, 1.3167031)], + 27: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.84709966, -0.11309634, 0.8401735), (0.75947696, -0.113924935, 0.80725145), (0.87629235, -0.09080085, 0.7562516), (0.78866965, -0.091629446, 0.72332954), (0.23935151, 0.66873187, 1.4561967), (0.16410631, 0.6670746, 1.3903526), (0.2977369, 0.7133228, 1.3883528), (0.2224917, 0.71166563, 1.3225087)], + 28: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.84165466, -0.115702614, 0.8422375), (0.75432605, -0.116308, 0.8089775), (0.8712225, -0.09339994, 0.7586467), (0.7838938, -0.09400534, 0.72538686), (0.22846156, 0.6635193, 1.4603246), (0.1538045, 0.6623085, 1.3938048), (0.28759718, 0.70812464, 1.3931432), (0.21294011, 0.7069138, 1.3266233)], + 29: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.8383089, -0.11729204, 0.8434726), (0.7511621, -0.1177608, 0.8100076), (0.8681048, -0.09498608, 0.7600862), (0.78095806, -0.09545484, 0.72662115), (0.22176999, 0.6603404, 1.4627949), (0.14747661, 0.6594029, 1.3958647), (0.28136185, 0.70495236, 1.3960222), (0.20706846, 0.70401484, 1.329092)], + 30: [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (0.83717144, -0.117830336, 0.84388685), (0.7500867, -0.11825273, 0.81035244), (0.86704457, -0.09552345, 0.76057017), (0.7799598, -0.09594584, 0.72703576), (0.21949519, 0.65926385, 1.4636234), (0.14532582, 0.6584191, 1.3965546), (0.27924132, 0.7038776, 1.39699), (0.20507197, 0.70303285, 1.3299212)], + } + matrix4d primvars:skel:geomBindTransform = ( (0, 0, 1, 0), (1, 0, 0, 0), (0, 1, 0, 0), (1, 0, 0, 1) ) + int[] primvars:skel:jointIndices = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2] ( + elementSize = 2 + interpolation = "vertex" + ) + float[] primvars:skel:jointWeights = [1, 0, 1, 0, 1, 0, 1, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 1, 0, 1, 0, 1, 0, 1, 0] ( + elementSize = 2 + interpolation = "vertex" + ) + uniform token subdivisionScheme = "none" + } + def Mesh "MeshWithNormals" ( prepend apiSchemas = ["SkelBindingAPI"] ) diff --git a/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/lbs.usda b/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/lbs.usda index 2d84cd70bd..3f7c3bca20 100644 --- a/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/lbs.usda +++ b/pxr/usd/usdSkel/testenv/testUsdSkelBakeSkinning/lbs.usda @@ -213,6 +213,39 @@ def SkelRoot "Root" ( uniform token subdivisionScheme = "none" } + def Mesh "MeshWithFaceVaryingNormals" ( + prepend apiSchemas = ["SkelBindingAPI"] + ) + { + matrix4d primvars:skel:geomBindTransform = ( (0, 0, 1, 0), (1, 0, 0, 0), (0, 1, 0, 0), (1, 0, 0, 1) ) + + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [1, 4, 5, 0, 4, 8, 9, 5, 8, 10, 11, 9, 10, 6, 7, 11, 6, 2, 3, 7, 2, 1, 0, 3, 2, 6, 4, 1, 6, 10, 8, 4, 0, 5, 7, 3, 5, 9, 11, 7] + point3f[] points = [(1.05, -1, 0.55), (1.1500001, -1, 0.55), (1.1500001, -1, 0.45), (1.05, -1, 0.45), (1.1500001, 0, 0.55), (1.05, 0, 0.55), (1.1500001, 0, 0.45), (1.05, 0, 0.45), (1.1500001, 1, 0.55), (1.05, 1, 0.55), (1.1500001, 1, 0.45), (1.05, 1, 0.45)] + uniform token subdivisionScheme = "none" + + normal3f[] normals = [(0, 0, 1), (0, 0, 1), (-0, -0, 1), (-0, -0, 1), (0, 0, 1), (-0, -0, 1), (-0, -0, 1), (-0, -0, 1), (-0, 1, -0), (-0, 1, -0), (-0, 1, -0), (0, 1, 0), (-0, 0, -1), (-0, 0, -1), (0, -0, -1), (-0, -0, -1), (-0, 0, -1), (-0, -0, -1), (0, -0, -1), (0, -0, -1), (-0, -1, -0), (0, -1, -0), (-0, -1, -0), (-0, -1, 0), (1, -0, -0), (1, 0, 0), (1, -0, -0), (1, -0, -0), (1, 0, 0), (1, 0, 0), (1, -0, -0), (1, -0, -0), (-1, -0, -0), (-1, -0, 0), (-1, 0, -0), (-1, 0, -0), (-1, -0, 0), (-1, -0, 0), (-1, -0, -0), (-1, 0, -0)] ( + interpolation = "faceVarying" + ) + + int[] primvars:skel:jointIndices = [ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 0, 1, 0, 1, + 2, 2, 2, 2, 2, 2, 2, 2, + ] ( + interpolation = "vertex" + elementSize = 2 + ) + float[] primvars:skel:jointWeights = [ + 1, 0, 1, 0, 1, 0, 1, 0, + 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, + 1, 0, 1, 0, 1, 0, 1, 0, + ] ( + interpolation = "vertex" + elementSize = 2 + ) + } + def Mesh "MeshWithNormals" ( prepend apiSchemas = ["SkelBindingAPI"] ) diff --git a/pxr/usd/usdSkel/utils.cpp b/pxr/usd/usdSkel/utils.cpp index 652ccab0ba..5459b1263c 100644 --- a/pxr/usd/usdSkel/utils.cpp +++ b/pxr/usd/usdSkel/utils.cpp @@ -1236,7 +1236,34 @@ struct _InterleavedInfluencesFn { size_t size() const { return influences.size(); } }; - + +/// Functor which returns the element index unchanged. +/// Use when the attribute to deform has vertex or varying interpolation. +struct _IdentityPointIndexFn +{ + size_t GetPointIndex(size_t index) const { return index; } +}; + +/// Functor which uses the faceVertexIndices attribute to find the +/// corresponding point index. Use for deforming faceVarying normals. +struct _FaceVaryingPointIndexFn +{ + TfSpan faceVertexIndices; + const int numPoints; + + size_t GetPointIndex(size_t index) const + { + const int pointIndex = faceVertexIndices[index]; + if (pointIndex < 0 || pointIndex >= numPoints) + { + TF_WARN("faceVertexIndices is out of range [%d] at index [%zu]", + pointIndex, index); + return 0; + } + + return pointIndex; + } +}; template bool @@ -1480,11 +1507,14 @@ UsdSkelSkinPointsLBS(const GfMatrix4d& geomBindTransform, namespace { -template +template bool _SkinNormalsLBS(const Matrix3& geomBindTransform, TfSpan jointXforms, const InfluenceFn& influenceFn, + const PointIndexFn& pointIndexFn, int numInfluencesPerPoint, TfSpan normals, bool inSerial) @@ -1505,9 +1535,13 @@ _SkinNormalsLBS(const Matrix3& geomBindTransform, // considered in the future (E.g, Accurate and Efficient // Lighting for Skinned Models, Tarini, et. al.) - for (size_t pi = start; pi < end; ++pi) { + for (size_t ni = start; ni < end; ++ni) { - const GfVec3f initialN = normals[pi]*geomBindTransform; + const GfVec3f initialN = normals[ni]*geomBindTransform; + // Determine the point to read the influences from. This is not + // the same as the normal's index if there is faceVarying + // interpolation. + const size_t pi = pointIndexFn.GetPointIndex(ni); GfVec3f n(0,0,0); @@ -1537,7 +1571,7 @@ _SkinNormalsLBS(const Matrix3& geomBindTransform, return; } } - normals[pi] = n.GetNormalized(); + normals[ni] = n.GetNormalized(); } }); @@ -1563,7 +1597,8 @@ _InterleavedSkinNormalsLBS(const Matrix3& geomBindTransform, const _InterleavedInfluencesFn influenceFn{influences}; return _SkinNormalsLBS(geomBindTransform, jointXforms, influenceFn, - numInfluencesPerPoint, normals, inSerial); + _IdentityPointIndexFn(), numInfluencesPerPoint, + normals, inSerial); } @@ -1592,6 +1627,47 @@ _NonInterleavedSkinNormalsLBS(const Matrix3& geomBindTransform, const _NonInterleavedInfluencesFn influenceFn{jointIndices, jointWeights}; return _SkinNormalsLBS(geomBindTransform, jointXforms, influenceFn, + _IdentityPointIndexFn(), numInfluencesPerPoint, + normals, inSerial); +} + + +template +bool +_SkinFaceVaryingNormalsLBS(const Matrix3& geomBindTransform, + TfSpan jointXforms, + TfSpan jointIndices, + TfSpan jointWeights, + int numInfluencesPerPoint, + TfSpan faceVertexIndices, + TfSpan normals, + bool inSerial) +{ + if (jointIndices.size() != jointWeights.size()) { + TF_WARN("Size of jointIndices [%zu] != size of jointWeights [%zu]", + jointIndices.size(), jointWeights.size()); + return false; + } + + if (jointIndices.size() % numInfluencesPerPoint != 0) { + TF_WARN("Size of jointIndices [%zu] is not a multiple of " + "numInfluencesPerPoint [%d]", + jointIndices.size(), numInfluencesPerPoint); + return false; + } + + if (faceVertexIndices.size() != normals.size()) { + TF_WARN("Size of faceVertexIndices [%zu] != size of normals [%zu]", + faceVertexIndices.size(), normals.size()); + return false; + } + + const _NonInterleavedInfluencesFn influenceFn{jointIndices, jointWeights}; + + const int numPoints = jointIndices.size() / numInfluencesPerPoint; + const _FaceVaryingPointIndexFn indexFn{faceVertexIndices, numPoints}; + + return _SkinNormalsLBS(geomBindTransform, jointXforms, influenceFn, indexFn, numInfluencesPerPoint, normals, inSerial); } @@ -1659,6 +1735,37 @@ UsdSkelSkinNormalsLBS(const GfMatrix3f& geomBindTransform, } +bool +UsdSkelSkinFaceVaryingNormalsLBS(const GfMatrix3d& geomBindTransform, + TfSpan jointXforms, + TfSpan jointIndices, + TfSpan jointWeights, + int numInfluencesPerPoint, + TfSpan faceVertexIndices, + TfSpan normals, + bool inSerial) +{ + return _SkinFaceVaryingNormalsLBS( + geomBindTransform, jointXforms, jointIndices, jointWeights, + numInfluencesPerPoint, faceVertexIndices, normals, inSerial); +} + + +bool +UsdSkelSkinFaceVaryingNormalsLBS(const GfMatrix3f& geomBindTransform, + TfSpan jointXforms, + TfSpan jointIndices, + TfSpan jointWeights, + int numInfluencesPerPoint, + TfSpan faceVertexIndices, + TfSpan normals, + bool inSerial) +{ + return _SkinFaceVaryingNormalsLBS( + geomBindTransform, jointXforms, jointIndices, jointWeights, + numInfluencesPerPoint, faceVertexIndices, normals, inSerial); +} + namespace { diff --git a/pxr/usd/usdSkel/utils.h b/pxr/usd/usdSkel/utils.h index 7aa2ebb16d..4cb1ec338b 100644 --- a/pxr/usd/usdSkel/utils.h +++ b/pxr/usd/usdSkel/utils.h @@ -542,9 +542,10 @@ UsdSkelSkinPointsLBS(const GfMatrix4d& geomBindTransform, bool inSerial=false); -/// Skin normals using linear blend skinning (LBS). -/// Currently, this is restricted to skinning of normals stored using -/// _vertex_ primvar interpolation. +/// Skin normals using linear blend skinning (LBS), for normals with _vertex_ +/// or _varying_ interpolation. +/// Use UsdSkelSkinFaceVaryingNormalsLBS() for normals with _faceVarying__ +/// interpolation. /// The \p jointXforms are the *inverse transposes* of the 3x3 component /// of the \ref UsdSkel_Term_SkinningTransforms" "skinning transforms", /// given in _skeleton space_. The \p geomBindTransform is the @@ -595,6 +596,30 @@ UsdSkelSkinNormalsLBS(const GfMatrix3f& geomBindTransform, TfSpan normals, bool inSerial=false); +/// Skin normals with _faceVarying_ interpolation using linear blend skinning. +USDSKEL_API +bool +UsdSkelSkinFaceVaryingNormalsLBS(const GfMatrix3d& geomBindTransform, + TfSpan jointXforms, + TfSpan jointIndices, + TfSpan jointWeights, + int numInfluencesPerPoint, + TfSpan faceVertexIndices, + TfSpan normals, + bool inSerial=false); + +/// \overload +USDSKEL_API +bool +UsdSkelSkinFaceVaryingNormalsLBS(const GfMatrix3f& geomBindTransform, + TfSpan jointXforms, + TfSpan jointIndices, + TfSpan jointWeights, + int numInfluencesPerPoint, + TfSpan faceVertexIndices, + TfSpan normals, + bool inSerial=false); + /// Skin a transform using linear blend skinning (LBS). /// The \p jointXforms are \ref UsdSkel_Term_SkinningTransforms