This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I'm trying to figure out a workflow for setting up a 3D character with multiple clothing options.
In Blender, I can get the character and clothing meshes setup, rigged, animated (via Mixamo, to be honest) and everything looks decent in Blender. I export the Armature with animations (as gltf) to use as an animation library (the thought being, I will want to create other characters with the same Armature, but different meshes), then, I export the armature itself without animations, then I export the mesh and armature without animations.
In Godot, I reimport each of these exports, primarily setting up Bonemaps and, in the case of the animation library, setting up the looping animation states for my animations.
What I want to do is have a scene structure setup like...
- Armature (Node3D)
- GeneralSkeleton (Skeleton3D)
- Body (MeshInstance, with Skeleton connected to GeneralSkeleton, and associated Skin)
- Clothing Item 1 (MeshInstance3D connected like Body)
- Clothing Item 2 (MeshInstance3D connected like Body)
- ...
- Clothing Item N (MeshInstance3D connected like body)
- GeneralSkeleton (Skeleton3D)
- AnimationPlayer (AnimationPlayer with the loaded animation library)
And, in script, be able to load and unload Clothing Item meshes as needed for each character (so that a single instance doesn't have 100s of clothing meshes loaded into memory when all that may be needed is 2 or 3 items)
The problem is... it seems that, to setup a mesh with the proper Skin that will work with the armature, I not only must include the armature in the gltf file with my mesh but also keep the armature in the Godot import in order for the Skin resource of the mesh to generate properly, as the Bonemapping (and, I'm guessing, associative skin resource generation) is done on the armature, not on the mesh. This means that, when I instance the "mesh" resource, it actually instances the mesh and the armature, creating a scene such as...
- Armature (Node3D, from original Armature resource)
- GeneralSkeleton (Skeleton3D, from original Armature resource)
- <Body Mesh Resource Tree>
- GeneralSkeleton (Skeleton3D, from original Armature resource)
... with <Body Mesh Resource Tree> being...
- Armature (Node3D)
- GeneralSkeleton (Skeleton3D)
- Body (MeshInstance3D)
- GeneralSkeleton (Skeleton3D)
As such, instead of a scene tree that's only 3 layers deep, this makes a scene tree that'll go 6 layers deep, with an extra Node3D and Skeleton3D that become just extra used memory as they'd be ignored. What's worse is, for rigged clothing meshes, each instance clothing mesh would also incur the extra Node3D and Skeleton3D, meaning, if I have a body mesh with two items of clothing, the scene tree would be four Skeleton3D nodes with all the same bone data with three of those Skeleton3D nodes being totally wasted memory.
So, the question is, is there something I'm fundamentally missing, either in the export of the mesh gltf file from Blender, or the import of the mesh gltf file into Godot where I can get my mesh data with a Skin that works for the separately instanced armature without needing to have a copy of that same armature in the instanced mesh scene?
All of the above said, I am far far from an expert in working with 3D in any software, let along Blender and Godot specifically. I could be going about this 100% back-assward. If my issue makes sense to anyone and have some ideas on what I could do differently, I'd love to be enlightened...
Subreddit
Post Details
- Posted
- 8 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/godot/comme...