openframeworks / openframeworks/openFrameworks

"Error calculating normalized scale of scene" in animated model

Open
#5,866 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

I have an animated 3D model where the animation is a rotation transform of the whole model around its center. When loading the model, I got an error saying "Error calculating normalized scale of scene".

When computing the normalized scale of the model, if it has animations, it does it based on the animated positions and ignores the model's geometry:

https://github.com/openframeworks/openFrameworks/blob/6b3b320fd2e8f21cde059df7a31dd4a9cf830e1e/addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp#L630-L657

This can produce many unexpected results depending on the animations.

What could be a better option to fix this?

  • Use the geometry only to compute the scale
  • Play the animations and compute the scale based on the absolute min and max through all the transformed positions of the geometry

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp at lines 630-657 and inspect how normalized scale is calculated for animated scenes. Reproduce the issue with an animated model using a rotation transform, then evaluate the geometry-only and transformed-position approaches described in the report; done means normalized scale is calculated without the reported error and handles this animation case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.