Skip to content

Commit 3f50c8f

Browse files
authored
Reset transform (#1025)
When rebuild the morph target from Delta values stored into Max, we do NOT need to apply Transformation while the extracted data are already in World Coordinate.
1 parent 235ad02 commit 3f50c8f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

3ds Max/Max2Babylon/Exporter/BabylonExporter.Mesh.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,8 @@ private IEnumerable<IPoint3> ExtractMorphTargetPoints(BabylonAbstractMesh babylo
669669
int j = str.IndexOf(']', i++);
670670
var p3Str = str.Substring(i, j - i);
671671
var xyz = p3Str.Split(',').Select(s => float.Parse(s, CultureInfo.InvariantCulture)).ToArray();
672-
var p = Loader.Global.Point3.Create(xyz[0], xyz[1], xyz[2]);
673-
p = offsetTM.PointTransform(p);
674-
// we have to reverse y and z
675-
p = Loader.Global.Point3.Create(p[0] * scaleFactorToMeters, p[2] * scaleFactorToMeters, p[1] * scaleFactorToMeters);
672+
// conversion: Max to Directx(Babylon) (swap Y and Z).
673+
var p = Loader.Global.Point3.Create(xyz[0] * scaleFactorToMeters, xyz[2] * scaleFactorToMeters, xyz[1] * scaleFactorToMeters);
676674
yield return p;
677675
i = str.IndexOf('[', j);
678676
} while (i != -1);

0 commit comments

Comments
 (0)