Jump to content
  • Advertisement
Sign in to follow this  
Lleran

Assimp : aiMesh & aiBone

This topic is 2514 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I don't understand one thing. In Assimp aiMesh represents master-geometry. For example : model has two identical pouldrons - left and right. Therefore we can have only one mesh and use it twice. Right? But.. aiMesh has an aiBone array. Each bone refers to aiNode by mName, is this true (or maybe it's other, independent entity)? Also each bone has a matrix. But we already have matrix for each node in hierarchy. Does that mean that aiNode is not "full master geometry"? I can't understand this moment.

Share this post


Link to post
Share on other sites
Advertisement

Assimp does not instance meshes, so if your mesh has two pauldrons, they will be imported as separate meshes
I think this is not right. aiNode can refer to aiMesh by index. And one mesh can be used in some nodes with various matrix. This works fine with static geometry. As I understand it, it will not work with skinned mesh. Really, for animation(skinning) we must have two various pauldron meshes.

Share this post


Link to post
Share on other sites
I'm fairly certain that you are correct and the aiMesh can do references with transformation information so a left can be an instance of a right with a -x transform attached. But, the question is where you are getting your data from. "Most" exporters will collapse such instanced items and perform the transformation internally thus exporting a left and right version as unique data. I use Modo for most of my test "programmer art" meshes (lots of cubes :)) and it supports instanced meshes which are not duplicated, but I don't believe any of it's exporters honor that and they just spit out the transformed mesh as a unique item. Maya is much the same and I imagine many others are similar. Assimp would have to directly support the Modo format in order to get the real un-flattened form of the mesh. Given that Modo/Max/Maya/etc don't directly work with formats Assimp can read, both for legal and complexity reasons (Max contains plugin data chunks, script chunks etc and has sued folks for trying to reverse engineer it, Maya now owned by the same is similar in complexity and problems) your exporters are probably the issue.

You might give FBX a try and I believe there is an plugin project to Assimp you can get which, if you download the FBX SDK and install it (registration and annoying bs to get the sdk last time I downloaded it, but "notme@nowhere.com" worked) that code may help you out. I have no idea if it will preserve instancing though, FBX "usually" preserves most data, at least from Max and Maya, but no guarantee's.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!