How to use SharpGLTF to save "glb" files with hierarchical structure? #264 #265
Unanswered
kuangpansheng
asked this question in
Q&A
Replies: 2 comments
-
I don't understand your question, the hierarchy is the node tree. My guess is you want to attach meshes to the nodes. Please, refer to the unit tests of the toolkit project, there's plenty of examples of how to construct a complete.model from scratch |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your answer. Previously, I didn't understand how to add grids to the hierarchy because they are separate from each other.
After a day and night of trying, I discovered this function:
public InstanceBuilder AddRigidMesh(IMeshBuilder<MaterialBuilder> mesh, NodeBuilder node, AffineTransform instanceTransform)
In the example, there are only two parameters, but I found another overload that can associate the grid with nodes, solving the problem
Thank you for your reply!
邝攀升
***@***.***
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to preserve the hierarchical structure of a file during export?
When I try to export using ModelRoot and Node, I can preserve its node hierarchy, but I cannot set the Mesh of Node correctly. Can you provide a simple example code?
Beta Was this translation helpful? Give feedback.
All reactions