Skip to content

Conversation

@adriengivry
Copy link
Member

@adriengivry adriengivry commented Sep 28, 2020

This PR aims to fix the wrong unit scaling issue with FBX models.

Currently, in projects made with Overload, we tend to counter-scale our objects with a 0.01 scale to compensate the centimeters to meters conversion.

The idea here is to add a flag to automatically convert these FBX using centimeters as the default unit to meters (In order to avoid manual counter-scaling).

Do note that this PR will break scenes made with previous version of Overload. If you want to convert your scene to correctly behave with this new scaling system, you'll have to disable GLOBAL_SCALE in your model asset properties.

This PR introduce several flags for models:

  • GLOBAL_SCALE (On by default, disable it if you want your scenes created with older version to remain unchanged)
  • EMBED_TEXTURES
  • FORCE_GEN_NORMALS
  • DROP_NORMALS
  • GEN_BOUNDING_BOXES (No actual usage, as we do not care about assimp generated bounding boxes)

TODO:

  • Update Assimp to 5.0.1
  • Add Assimp 5.0.1 new flags to EModelParserFlags
  • Update engine models (Cube, Cone, Plane...)
  • Update editor models (Gizmo arrows, Camera...)

Fixes #136

AssimpUnityScalingFlag

@adriengivry adriengivry added Bug QoL Quality of Life : Something that can improve users productivity Refactoring Something that needs a refactoring Graphics Graphical feature labels Sep 28, 2020
@adriengivry adriengivry force-pushed the fix/assimp_unit_scaling branch 2 times, most recently from 8db953a to eab1cd3 Compare October 3, 2020 17:35
@adriengivry adriengivry force-pushed the fix/assimp_unit_scaling branch from eab1cd3 to 8320990 Compare October 3, 2020 23:22
@adriengivry adriengivry marked this pull request as ready for review October 3, 2020 23:40
@adriengivry adriengivry changed the title WIP: Fixing assimp unit scaling Fixing assimp unit scaling Oct 3, 2020
@litelawliet litelawliet merged commit 4f152bb into develop Oct 4, 2020
@litelawliet litelawliet deleted the fix/assimp_unit_scaling branch October 4, 2020 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Graphics Graphical feature QoL Quality of Life : Something that can improve users productivity Refactoring Something that needs a refactoring

Development

Successfully merging this pull request may close these issues.

Fixing model import scale

4 participants