Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Local Scale for Graph Nodes with small values #1252

Open
animech-sijo opened this issue Jan 30, 2025 · 0 comments
Open

Incorrect Local Scale for Graph Nodes with small values #1252

animech-sijo opened this issue Jan 30, 2025 · 0 comments

Comments

@animech-sijo
Copy link

Description

If we have a model with objects that are scaled <= 0.0001 on an axis, that axis' localScale value gets set to 100 when the model is imported into PlayCanvas.

In our case we have Dummy objects in 3ds Max, which when scaled to 0.01 (3ds max units) or lower, gets the incorrect localScale value. The source FBX has the correct scale. It's the import and GLB conversion that sets the incorrect value.

We have a test project, consisting of a GLB containing 3 Dummy objects with scale 0.02, 0.01, and 0.005 on the Z axis (3ds max units).

Scaled dummies

If we log the localScale of the 3 graphNodes in PlayCanvas, we get these results:

Scale0.02: [0.00015, 0.00015, 0.0002]
Scale0.01: [0.00015, 0.00015, 100]
Scale0.005: [0.00015, 0.00015, 100]

As you can see, the two smallest dummies get reset, and not even to 1.0 as you might guess, but to 100.0. This isn't limited to dummy objects either - objects with geometry behave this way too.

Expected result

Small scale values should be retained from the source model

Test project

https://playcanvas.com/editor/scene/2160600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant