Hi. I’m currently hitting a bottleneck with hardware skinning control. I’m planning to make a large dense forest of animated trees (with bones to simulate wind) and need control over the frame times and bone amounts for each instance. To fix this, I want to put the transform table into a TBO. currently i’m working like this:
uniform samplerBuffer TBO_TransformTable;
uniform int TBO_SkinningFrame;
uniform int TBO_NumJoints;
this will be passed into the shader. However, the TBO needs to store the entirety of the animation so that I can pass any frame number in and it will index the right position in the TBO. However I’m struggling to actually get the animation information extracted from the animated tree. How do I extract the bone data from Character and put it into the TBO?
I was thinking of storing each matrix row side by side in a rgba32 texture and reconstruct the matrix in the shader.
yea that would be overkill. My trees only need one animation at once. And to reduce CPU overhead, it would be good to just put the entire animation in one TBO.
I noticed in your code, you also create another TBO _bone_id_tree_tex. I’m interested how you exactly referenced in uvec4 transform_index; in you shaders. What is you structure exactly?
hmm. Like you said you built your own Character class. How do you extract animation information that is in the correct order for transform_index? Could I potentially use the same method for the default Character class? I think storing the information won’t be too hard. Just need to multiply the frame time with the animation offset for the TBO as an extension to the function you showed.
I’m not actually to sure where to actually get the animation skinning data?