Jump to content
  • Advertisement
Sign in to follow this  
Damocles

OpenGL Vertex Blending / Keyframe tweening - options?

This topic is 4082 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'm digging around openGL trying to find the best option for vertex blending/tweening of two sets of vertex/normal data. Ideally, I would like an approach that is efficient, and supported on older hardware. What are the best extensions to use that meet those two requirements? Thanks

Share this post


Link to post
Share on other sites
Advertisement
How old is the hardware you wish to do this on, more accurately, what is the oldest hardware you are targetting? You should be able to do this in a vertex shader - these have been around for quite a long time now, and most PCs have came equipped with sm1 cards for years.

You could always do it in software. I originally done skinning, not keyframe tweening, actual skinning with up to 4 bones per vertex, in software, didn't find it to be *that* slow in all honestly, so I can safely assume that unless you are going to do this with more than a few thousand verts, software would be more than adequate - although I am gonna shout and scream vertex shader [smile]

Share this post


Link to post
Share on other sites
I don't have actual target hardware yet, I'm at the stage of seeing what performance I can squeeze out, and using that to decide what hardware to aim for. Basically, the older the better.

I tried doing the blending in software, but it was just too slow for any real use. I could handle one fairly complex mesh being updated, but I'll be needing to be able to update 3-5 meshes at once, so software mode is off the table right now.

Cg shaders - I must admit to having almost no knowledge of how to use these. I just did some reading, and I get the gist, but I'm not sure how I can supply the two vertices at once to a shader program without having to cycle through each vertex pair. I can't see a way to send the data using arrays or VBOs, and still have the shader know which two vertexes need to be blended. I'm guessing there is a way, and it's just may lack of experience with cg that's making me unable to see the solution.

Anyone have any good links for getting started with cg shaders? If you have one that shows how to do array/VBO based vertex blending, then fan-bloody-tastic, but I'll settle for general cg programming :)

Or alternatively - are there any extensions that can handle vertex blending as part of the OGL spec? I came across ARB_Vertex_Blend but I also came across some posts saying that it's been discontinued and on-card support is sometimes lacking.

Share this post


Link to post
Share on other sites
How complex are your meshes? Vertex number wise. If you are using more than a few thousand verts per model, consider lowering the detail level if you are aiming for lower end hardware. I still say go software if you want to avoid going down the shader route, I got away it with a model with about 20k polys just tweening between animations on a Gamecube [smile], well, only just.

If you go for Cg - passing in 2 sets of vertices is a piece of cake. You can go about it by sending one set of vertices down as texture coordinates on tex unit 1, and the second set of normals on tex unit 2. Your shader would choose exactly how you use the input.

Share this post


Link to post
Share on other sites
Thanks for the link - although I think I'll go with cg. Eventually I'll get around to making a directX renderer as well, so I figure cg is the best choice.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!