skinning indexing

Started by
2 comments, last by Ademan555 17 years, 11 months ago
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
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
Advertisement
Please forgive the bump.

cheers
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
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?
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
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
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."

This topic is closed to new replies.

Advertisement