BGE and Hardware Skinning.

I am not sure whay really slows blender down when we use chars and armatures, but isnt the skinning done by CPU?
If so, this would be a big problem, CPU cant calculate many vertex at a time if i am right but the GPU can, so here it comes the harware skinning.
Hardware skinning uses GPU to handle the skeletal animation without framerate decrease,most games if not all uses this tehnique so i am asking if its possible to have it in BGE?
Can you imagine having 30 chars in game? Wouldnt that be cool?


I’ve been wanting to get hardware skinning implemented for quite some time now. In fact, I first started looking into hardware skinning in my first GSoC project (2010). In my 2011 GSoC project I actually managed to make a bit of headway on the matter. This was part of the reason for the BGE vertex deformer option. The idea was this vertex deformation algorithm would be one that would be simpler to implement on a GPU. So, hardware skinning is in the works, but progressing very slowly. First the BGE vertex deformer has to be perfected, and then focus can be put into getting it working on the GPU.

Thank you for reply Moguri!
Its good to know its progressing,even if its going slow.I would have expected it in some of action improvements tho.
As you plan to do many, i really suggest you to focus on one at a time ( the harmony project?)
Good luck and thank you for your time spent in making BGE better.

Harmony is my current project. I’m thinking about taking another swing at hardware skinning this summer (it depends on what else I’m working on ).

Tell me about it!
I’m looking forward to GSOC this year; I’d love to get involved. Time to polish up the C++ :wink:

I must delay my game then or find a solution to have 12 chars running on many PC’s.
I just read that article about framerate and profile and i saw that the scene must be rendered twice if i have one shadow spot, what if i have 5 lamps with spec disabled?

What exactly do you plan to polish in C++ agoose77?

He said “polish up the C++” - he’s saying that he needs to brush up, since, I’m guessing, he primarily writes python.

Anyway, it takes more than “knowing” C++ to make a significant change in the BGE. You have to know the BGE structures, and how they interact.

It’s not a simple system, so it’s probably a good idea to keep your sights low initially, and just do a few bug fixes to get your feet wet.


Looking forward to hardware skinning!

Indeed Goran. I’ve had a look into the source, and its interesting, but as has been said its rather cluttered, which may prove to be time consuming.

Haha! I believe you 100% , i could bet blender is all a mess up (the code structure).

And BTW, Moguri hows the BGE shaders going? I ve seen the likely blender 2.62 targets and it seems like the shaders are not ready?

The BGE code is actually one of the messier parts of Blender as far as what I’ve read in this forum over the years.

Agoose77 could very well do a great service for future development by cleaning up the codebase and making it easier to follow as well as faster. Though we will also need to let the devs. know that we would like to see the rest of the Cucumber branch and Harmony phase 1 in Trunk by 2.63 (which may or may not be possible due to that release focusing on Bmesh, but even that will benefit BGE users when it comes to building assets and levels)

Yes because bge is not important to blender foundation , its like that because each new addition was done by different users.
No code clean up,no docs to.follow, BGE is like a ghost.

Part of the issue with the BGE not getting as much attention as it should may be is that there is little activity from BGE users outside of the BGE section.

There’s been various threads in General Discussion on the future of the BGE, but I barely see any posts from those that use the engine, I’m often one of the only users that participate in those threads and the relative lack of other BGE users in those threads and others like the ones that call for candidates for the next release is probably not helping the situation of getting a little more attention from the core developers.

Really? I thought BGE section is for bge only and the same other sections, i guess all of us should check the other ones.
Too bad i didnt knew that, we must unite somehow and get some attention!
Good finished games should do the job, that way main devs will see.that there really are game engine users.
“But hey, we are making games,check the BGE section” , devs would do nothing but laugh, (i am sorry to say but there are only a few, only a few good games around,the rest of them are games started and not finished etc).
We must show them that BGE can be powerful.
I plan to show that with the game i am developing and which is getting ready for an alpha release!
Good blender games,and strong community can help a lot!


I kind of agree with BlendingBGE. While Blender game engine has it’s faults, it’s still a great tool to create simple games with simple but nice rules quite fast. You could even come up with quite large game if you build it right (if you don’t demand too much from the graphical side for now). Although stylish doesn’t always mean heavy graphics :slight_smile:

This forum is full of great people helping each other and also full of people with ideas that are in progress of learning (especially Python). I personally refuse to see BGE’s progress as “halted”. I see quite a few making great extensions on various areas that are making this all even better. Sure, the very basis could use some love, but I have my trust on those people who are working on it :slight_smile:

All I can say in the end that don’t demand too much of yourself or the BGE. Come up with a good but simple set of rules for a little game and work on it first. Don’t try to start anything big or we will end up having lots of non-finished games and nobody will see the power or BGE :wink:

Not really simple games, even complex games if you know how to manage them.
Blender can handle pretty good graphics with good framerate but a decent pc is needed.
Blender ge means optimizing, you got to optimize a lot for good framerate!
My suggesion for beginners is to start making simple games and not keep starting huge game projects with no team or skills.
Blender ge is left behind i guess because of us like Ace said, we got nothing to show.
Take a look at the many short movies are being made with blender, those are motivation for devs to keep working with render system.
What i al trying to say is that we have nothing to show except a few finished games aand some good ones that are WIP.
Lets finish some!


I think this should be one of the most important focus points of development. This might make all the difference in being considering the BGE as “SLOW” or as “SUPERB”?

Hardware skinning is not the silver bullet you’re looking for in terms of performance. While it could help, the mesh deformation is only part of the problem. Calculating the new pose each frame usually takes just as much time as the mesh deformation. So, if you’re spending 6ms on animating the bones and 6ms on the mesh deformation and you cut mesh deformation time down to 1/6 (just a random number, I don’t know the actual gains) of the time, then you still have 7ms spent on animating/deforming skeleton meshes. Also, another issue is the single threaded rasterizer. If you can’t get all of your code to run within one screen refresh, then the whole rasterizer will block waiting for the next screen refresh (this is called vertical sync or vsync). This causes the rasterizer to spike when it passes certain thresholds. Try running an animation stress test with and without vsync (this can usually be disabled by tools such as the Nvidia control panel and Catalyst), and you should see what I’m talking about.

And one last thing, one of the reasons people report nice speed gains with hardware skinning is because they avoid having to upload new geometry data to the graphics card every frame. This is especially important if you’re using VBOs and most of your geometry information is already sitting on the GPU. However, if you’re using vertex arrays (this is what the BGE uses) then you still have to upload the geometry data every frame. So, the only benefits you get from hardware skinning is the massive parallel nature of GPUs.

So, while hardware skinning would be nice, it shouldn’t be “the most important focus points of development” until the BGE is at least using VBOs, and maybe a multi-threaded rasterizer.

Agree with you Moguri!
WE all want VBO and there was a branch that had VBO s (Cucumber) but as fas as i know it wasnt stable enough so no chance to get it in the trunk!
Also, multi-threaded rasterizer is an old wanted feature, been some time since requests started to show up but not yet implemented (not even a branch?).
Although all are essential, i really think inferred lighting is also VERY important because nowdays good graphics are a must and inferred lighting can help us on that ,we cant even have realtime shadows running on older pc!
But lets not forget about FBO s too,post processint effects are also very expensive now (SSAO is still a dream), there are many things to do with BGE but not enough developers.

I have an idea on that. Would it be possible to add an option to pre-calculate the bone positions for every key frame and interpolate between the key frames?