Jump to content

  • Log In with Google      Sign In   
  • Create Account


Assimp : aiMesh & aiBone


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Lleran   Members   -  Reputation: 100

Like
0Likes
Like

Posted 22 January 2012 - 08:08 AM

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.

Sponsor:

#2 hupsilardee   Members   -  Reputation: 486

Like
0Likes
Like

Posted 25 January 2012 - 10:01 AM

Assimp does not instance meshes, so if your mesh has two pauldrons, they will be imported as separate meshes

#3 Lleran   Members   -  Reputation: 100

Like
0Likes
Like

Posted 28 January 2012 - 12:42 PM

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.

#4 AllEightUp   Moderators   -  Reputation: 4126

Like
0Likes
Like

Posted 28 January 2012 - 07:46 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS