Comments (19)
I want to use the application provided by the fbx2ozz.exe ozz engine to generate bones and animations, use The-Forge Engine AssimpImporter code to import skins, do not need AssetPipelineCmd.exe, is it ok?
OZZ engine fbx2ozz generated bones and animations are very accurate
from the-forge.
The version of Assimp we used while this unit test was written had an issue that caused all meshes to be 100x larger than intended and rotated on the x-axis. This is because in the FBX the mesh is stored in centimeters instead of meters and because most modelling tools use a different coordinate system. We added a workaround for this behaviour in the AssetPipeline. If the scale of your model is incorrect, try exporting it in meters using your favourite modeling tool. Our model is only a couple of units(meters) tall. Make sure yours is the about the same.
We used to use animations and skeletons exported through fbx2ozz.exe internally for testing purposes. I can't think if any reason why they wouldn't work now.
from the-forge.
Hi.
Thanks for the reply.
I used the example simpleTest\riggedMesh.fbx, simpleTest\twistShift.fbx bones and animations to test, import the animation into max, and then export the FBX file, whether it is Y axis or Z axis up, the animation is always put down 90 degrees, but Maya import and then export That's right, I think it's a good resource to handle this piece of code.
I hope to improve the code of this piece.
from the-forge.
Any more questions or can we close this issue?
from the-forge.
MM_Big.zip
AssetPipelineCmd , If you import this model, what are the steps and specifications?
I tested a lot of models and found that there will be problems. It is my use method is wrong, or the program itself is a BUG, basically can not be used. Please give a detailed production process specification.
I hope to improve AssetPipeline and Assimporter to make it robust.
Runtime Sketelal Animation Pose
rawAnimation.tracks.resize(skeleton->num_joints());
for (uint i = 0; i < (uint)skeleton->num_joints(); ++i)
{
const char* jointName = skeleton->joint_names()[i];
ozz::animation::offline::RawAnimation::JointTrack* track = &rawAnimation.tracks[i];
tinystl::unordered_map<tinystl::string, aiNodeAnim*>::iterator it = jointMap.find(jointName);
if (it != jointMap.end())
{
... ...
}
else
If the root bone is not animated ??
If the root bone is not animated or has no animated bones? The number of bones is wrong when the animation is running.
thanks..
from the-forge.
AssimpPipeline Create Runtime Animation There seems to be some problems
Show Bind Pose
Runtime Animation Pose
thanks..
from the-forge.
The AssetPipeline requires you to seperate your bind pose mesh with skeleton and the animations into seperate files. For example:
Examples_3/Unit_Tests/UnitTestResources/Animation/fbx/simpleTest contains riggedMesh.fbx. This FBX file contains only the mesh and the skeleton in bind pose.
Examples_3/Unit_Tests/UnitTestResources/Animation/fbx/simpleTest/animations contains two files. Each only contains an animated skeleton. No triangle data is stored in this file.
Our animation middleware has the same requirement. It expects the bind pose and animation seperetly.
If seperating the model from the animation doesn't fix your issue, please send us the code and the assets in FBX format so we can evaluate the problem.
from the-forge.
FBX model :
riggedMesh.zip
@timoconffx
Thank you very much for your reply.
The animation is confusing. What is the reason?
result.Position = mul(1, float4(input.Position, 1.0f));
from the-forge.
Please create two fbx files. One containing only the mesh and the skeleton in bindpose and one with only the animation. Look at the assets in the Examples_3/Unit_Tests/UnitTestResources/Animation/fbx/simpleTest directory if you need an example.
from the-forge.
Hello, @timoconffx
One containing only the mesh and the skeleton in bindpose and one with only the animation.
I did this.
FBX Model:
riggedMesh.zip
Exported with maya, Validate raw animation failure.
Exported with max, There will be such an error. As shown above.
Why? What 3D modeling software did you use to export?
One containing only the mesh and the skeleton in bindpose and one with only the animation.
Same FBX, What is the difference between the two methods?
There are indeed such problems. Can you find the reason?
thanks..
from the-forge.
@myluoxz
The zip file you send us contains only one fbx file. This FBX contains both the mesh and the animation. They should be in seperate files. We can't help you if we don't have the files.
FBX files are tricky. There are often problems when importing FBX files, just because all exporters seem to export them differently. A mesh exporter from Blender might work fine. That same mesh exported from Maya might not. We primarily use Blender. You could try exporting the mesh using Blender instead.
from the-forge.
Complete data structure
Exported with maya
@timoconffx , thanks..
from the-forge.
Complete data structure
Exported with 3ds-Max
I added keyframes to bone without animation and solved some problems, but there are still some models that have problems.
If the root bone has no animation or no animated bones? The number of bones is incorrect when the animation is running.
Runtime Sketelal Animation Pose
The model exported by blender will also go wrong.
I use Blender for export testing, and the The-Forge importer is also problematic.
Skeletal animation is the soul of the game, hoping to make it perfect work!
@timoconffx , thanks..
from the-forge.
@myluoxz
You can fix the problem by freezing/applying the transform of your meshes before exporting.
The body and hair mesh both reference "Bip01 Head" and a couple of other bones. The bone offset matrices are stored in mesh local space. Because your meshes are split the bone offset matrix of "Bip01 Head" is different for the body than it is for the hair. Currently the last bone offset that is written to the boneOffsetMatrices vector is taken even if a matrix has already been assigned. Because of this the body was using the bone offset matrix of the hair. This is what is causing the stretching. The problem can be fixed by freezing/applying the transform of your meshes before exporting. Effectively making them use the same local space.
Thank you for helping us figure out this problem. We will try to include a more permanent fix for this problem in our next release.
from the-forge.
@timoconffx
Thank you very much for your reply.
Is it because the head is not in the right position?
freezing/applying the transformation of the grid before exporting, Can it be completely correct?
Solve the problem by freezing/applying the transformation of the grid before exporting.
Is this step done in blender? Still doing it in 3DS Max?
How to do it in the blender?
I am not familiar with Blender, ask, in which menu to set the freeze and apply grid transformation, please give a detailed step?
thanks..
from the-forge.
@myluoxz
In the next release of the Forge your issue has been fixed.
For now here are the steps to freeze the transform in Blender:
- Open RiggedMesh.fbx in Blender.
- Right click the body mesh to select it.
- Press Ctrl+A while your cursor is over the viewport to open the apply menu.
- Select Location.
- Press Ctrl+A again.
- Select Rotation & Scale.
- Right click in the hair mesh to select it.
- Repeat steps 3 to 6.
from the-forge.
@timoconffx
Thank you very much, it has been perfect for it to work, I look forward to the next version, thank you!!
from the-forge.
This should be fixed. Please let us know.
from the-forge.
@myluoxz can you confirm it works for you? In that case, I would close this issue.
from the-forge.
Related Issues (20)
- missing file include creates incomplete DLL export for IMemory.h/MemoryTracking.c
- missing FORGE_RENDERER_API on gSelectedRendererApi variable so that it can be exported in a .dll HOT 1
- Rendering artifacts when disabling HDAO option in Visibility Buffer example on Windows PC with DirectX12 and Vulkan backend in The Forge 1.53 HOT 1
- Hello, is there any doc/examples on render mesh into 2d image? HOT 1
- heartbeat? HOT 8
- Materials playground hair assets missing HOT 2
- Vulkan - bug in queue initialization causing out of bounds access HOT 1
- Compiling error on MacOS 13.5.2 and Xcode 14.3.1 HOT 2
- Audio? HOT 2
- Sample Project HOT 4
- Supergiant's Hades switch from c# to c++, any more detail please!
- Issue of fullscreen windows at start HOT 1
- Possible issue in fsFetchZipEntryName function HOT 1
- Error from validation layers in vulkan backend in vk_utils_caps_builder HOT 1
- Direct3D12.cpp is missing "pRenderTarget->mDescriptors = pDesc->mDescriptors;" HOT 2
- Python regex warnings HOT 2
- enhancement request - explicitly sized enums in the API
- Wrong description or permission
- Missing #else implementation in fntGetFontAtlasSize()
- Any tutorial that how to start a project with vscode that can be built for android and windows exe both? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from the-forge.