BabylonJS / BabylonJS/Exporters

Incorrect result with non-uniform scale on axis not-aligned to local axis

Open
#981 8 comments 0 reactions 0 assignees View on GitHub
3dsmax
Dominant language
Wolfram Language
Stars
704
Forks
322
PR merge metrics
No merged PRs in 30d

Description

This is the MaxScript to create a reproducable case:
```
tea = Teapot isSelected:on radius:10
tea.rotation.x = 0.2
scale tea [1,1,5] -- scale in world coordinate (not local coord)
```
Original obj in 3ds Max:
![image](https://user-images.githubusercontent.com/6309393/124127316-c8e76900-daa5-11eb-8661-92b7e2264165.png)

Exported result (I can see the z scale is applied to obj's local z axis):
![image](https://user-images.githubusercontent.com/6309393/124127351-d3a1fe00-daa5-11eb-990b-3216442e2933.png)

Run resetXForm does help the exporter exported correctly, but in my case I needed this for instancing, and resetXForm will break instancing.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the provided MaxScript in 3ds Max and compare the original teapot with the exported result when rotation precedes non-uniform world-coordinate scaling. Done means the exporter preserves the scale relative to the rotated object without requiring resetXForm, while retaining instancing behavior.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.