godotengine / godotengine/godot
Using -rigid import hint on a blender model with an unapplied scale changes scale of rigidbody nodes directly, causing issues.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Found in 4.3.stable
### System information
Godot v4.3.stable - EndeavourOS #1 SMP PREEMPT_DYNAMIC Mon, 19 Aug 2024 17:02:39 +0000 - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7700S (RADV NAVI33) - AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (16 Threads)
### Issue description
When importing a .blend file that has objects in it with unapplied scales, it looks like those scales get copied to the rigidbody objects created by the `-rigid` import hint. Godot actually shows a warning that this will cause issues if you open the model in the scene editor:

Although the model looks correct in the editor, when the game is run the model will have it's scale reset. In the demo project attached you can see this causes the bottle to become massive.
In editor:

In game:

I think this may also happen to other file formats, but I don't have as clean as an example to share.
I don't know what the proper fix for this should be. I think applying transformations in the importer would break animations, based on the warning in blender's FBX exporter. Maybe Godot should apply the scaling to the mesh and collision shape instead of the Rigidbody?
### Steps to reproduce
1. Scale an object in Blender while in Object Mode, then make sure the name of the object ends with `-rigid`
2. Create a Godot Scene with that object in it
3. Observe the scale change between the editor and runtime, or open the model's scene and see the warning.
### Minimal reproduction project (MRP)
[blendscale MRP.zip](https://github.com/user-attachments/files/16757444/blendscale.MRP.zip)
Contributor guide
Research direction
Start with the attached blendscale MRP.zip and reproduce the scale difference using the listed steps: import the unapplied-scale Blender model with the -rigid hint, then compare the editor and runtime results. Done means the rigidbody import no longer resets the model's scale at runtime while preserving the intended imported appearance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- blender, cpp
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100