This reverts commit e00426c512.
The way we handle platform-specific intrinsics is not good, so the
current state will not compile on armv8. This commit also requires
SSE4.1 support, which is likely not a good idea for portable binaries.
We'll have to redo this with more caution after 3.2 is released, or
we might simply drop opus as we're only using it as dependency for
theora right now.
Fixes#33606.
Removes the custom code for VS2012 support in config.h,
and reduces diff with upstream config.h.
We still have many custom defines for ARM optimizations
which we probably don't use properly, since we don't
compile the included asm code, so a thorough review and
cleanup would be welcome.
Basic skin support
Various fixes
- Fixes bind mount id and mesh index
- Fixed duplicate nodes being created
- Prevented leak when instances being freed during re-import.
- Improved camera and light transform import
- skeleton handling and technical debt removal
- ASSIMP: bone nodes were unlinked from bones by this code
- bone_add working can distinguish between armatutes
- Updated transform to be the correct offset
- Added safety for state.root node errors
- Fixed memory leak with leaf bones
- Implemented children re-parenting for mesh template
- import_animation fixes to basic skeleton data
- Adds some more debug messages
- Fixed Godot import segfault
- Fix build failing on mono
- Clear resources we use which are no longer required after import
- Fixed bone duplication issue
- Working skeleton_bone_map which can lookup armatures properly now.
- Fixed stack being used up when mesh swapped & Fixed bone ID
Additional notes:
We use a mesh template which is a fake node to instance the initial
mesh nodes . This is to ensure the entire tree can be built.
We replace mesh node templates with the real mesh after the
skeleton is available, since this makes it ensure that the fully
built skeleton exists with all bones, all nodes, etc.
The bone stack is a stack which pops when it finds bones,
this overcomes duplicate bones with the same names.
FBX has lots of these because animation armature has bone names like bone001
and another armature will also have bone001
Fixed errors in node path assignment
Simple explanation:
- Every mesh uses a node from the stack
- Node stack was empties before completed
- Every time node not found, stack must be rebuilt to maintain correct armature order :)
Additional fixes:
- Fixes destructor in assimp
- Implements aiNode* mArmature in bone data
- Implements aiNode* mParent in bone data
- Fixes parent ID on bones.
Implemented skeleton assignment in generate_mesh_indicies
This is the only place we can safely do a lookup for the skeleton for the mesh.h
I used a pointer reference so we can pass this back out, since the skeleton assignment happens inside the function.
Added mesh re-parenting to the armature node this is a permanent feature and must be enforced, just like GLTF2 specification.
Fixed import_animation spawning tracks per skin
The DynamicFont implementation currently in use is based on
FreeType, which provides much better visual quality.
This old implementation wasn't exposed anywhere, so this shouldn't
break compatibility.
This decreases binary sizes by a few kilobytes.
This reads materials properly from Maya and expands on existing functionality to make this work properly.
aiTextureType_SHININESS no longer used as not appropriate for PBR texture as it is legacy.
This fix will be also present in assimp soon.
Issues fixed:
- Updated assimp to latest and backported fixes into godot.
- Fixed file scale being ignored from FBX file.
- Fixed bone removal
- Implemented proper armature binding
- Fixed recursion not always going through the entire path
- Implemented assimp global scaling system
- Fixed assimp global scale process to support unit conversion
- Implemented proper fbx scaling
- Fixed asserts caused by missing faces in some models which could crash
- Fixed valid bone removal
- Fixed root node being overwriten by assimp which caused data loss
- Fixed armature construction so that it works with multiple roots
- Implemented basic support for FBX standard materials
- Refactoring to improve code quality and improve function reuse.
- Simplified node creation from assimp scene into subsections: create_light, create_mesh, create_bone.
- Creating meshes is now done after hierarchy is created so that the skeleton is always available.
- Added support to assimp to support file scale in all formats which call SetFileScale.
- Many other fixes provided into assimp.
Known issues:
- FBX pivots from Maya do not currently work. (workaround: for now use blender import and export to remove pivot tracks)
- Hierarchy creates an extra node for each mesh - this was done intentionally but we intended to do a pass to remove these as they're a required node.
- When an animated mesh has not executed any animation the rest pose is wrong.
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>