• Advertisement
Sign in to follow this  

skinning indexing

This topic is 4365 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

Well, I've got static models in my engine now and i fully intend to add skeletal animation as well as skinning. I'm away from a compiler atm but i'm still hacking away since I can compile and debug once i get home. But i was curious, iirc integer indices are new to GLSL. Like, as a vertex attribute, having the "bone index" attribute be an integer could be slower (because it could fall back to sofware possibly) is this true? or am i just crazy? Should i use a floating point index instead? thanks -Dan

Share this post


Link to post
Share on other sites
Advertisement
So, at the moment, you've got something like this:

class Vertex{
// vertex stuff - pos, normal, etc
int boneIndex;
};

Where the boneIndex specifies which bone the vertex needs to be transformed by?

The bone should have a list of vertices instead of vice-versa, and you can't have a float as an index.

So, a vertex can only be transformed by bone 0, or bone 1, or bone 2. It can't be transformed by bone 2.345. So, even if you'll be restricting the float to whole numbers (eg. 2.000), why bother?

Was this what you were talking about?

Share this post


Link to post
Share on other sites
Yes, that's essentially what I have. However, it was my understanding that using floats as an index was common, or at least i had run across it a couple of times, and i thought i remembered hearing that integer support in shaders was weak (at some point) so i thought that the floating point indices might have been a reflection of that.

thanks
-Dan

Share this post


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

  • Advertisement