Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Is it possible to add bones to a mesh manually without having to use LoadObjectWithChildren()?

Author
Message
hendron
8
Years of Service
Recently Online
Joined: 20th Dec 2015
Location:
Posted: 5th Aug 2023 19:27
I would like to support animation with my DBO importer if possible. The mesh memblock documentation mentions that AppGameKit recognizes bone-related vertex attribute names such as "boneweights" and "boneindices," but I don't see any way to actually add bone data to an object/mesh for these attributes to point to. It appears the only way to setup an object with bones is to use LoadObjectWithChildren() -- is that correct or have I missed something?
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 5th Aug 2023 21:13
That looks to be the case but I am fairly certain you don't add a bone to a mesh, you add the mesh to the bone, specifically the root bone that all other bones are parented to(does not need to be directly parented but parented to another that is parented to root or any number of bones in-between), then you parent the mesh to the root bone ie so the root is the parent - at least this is the case with Blender when I last tried. This is all done before vertex groups/weight painting takes place - by vertex groups I am referring which vertices are assigned to which bones as they can be assigned to more than one - this is separate from mesh/bone parenting which must be done first. This is what I had to do to get it into DBP as a .x file.

So with AppGameKit, in terms of memblock meshes I imagine you would prepare a memblock with all the right attributes and data then swap out an existing objects mesh that has children(setobjectmeshfrommemblock rather than addmeshtomemblock). So if all that is considered true(as I have not tested but just looked at all available commands and applied it to the knowledge I know of), then it would perhaps be best to take the .dbo and convert it to an AppGameKit loadable file format and just load that rather than trying to import direct into AGK. That is my thinking anyway, not necessarily correct so please bare that in mind, I am essentially basing it on the fact that you would need to duplicate the minimum framework as a loadable AppGameKit format to work on in which case you might as well just do the whole thing as a file format conversion.
Win 10 Home 64, Intel(R) Core(TM) i5-10300H, 8GB DDR4, NVidia GeForce GTX 1650 4GB GDDR6
hendron
8
Years of Service
Recently Online
Joined: 20th Dec 2015
Location:
Posted: 5th Aug 2023 21:41 Edited at: 5th Aug 2023 21:50
Thanks for the info! That's what I was afraid of. I did consider creating a bare-bones .x file that had the correct layout and then just replacing the mesh data after loading, but I don't like the idea of creating, writing and deleting a file every time a model needs to be loaded. It's probably more trouble than it's worth to write a format conversion either when tools like Ultimate Unwrap already exist. Supporting multi-textured static DBO files was the main goal and I have that working pretty well now at least.

Login to post a reply

Server time is: 2024-05-07 13:36:35
Your offset time is: 2024-05-07 13:36:35