GPU and CPU skinning

Started by
3 comments, last by SuperRad 13 years, 6 months ago
hello all. Is cpu skinning still applicable in games where there is alot of animations in it or should i switch and learn shaders to make gpu skinning? Also what if some display adapters don't use GLSL should i make the two CPU-GPU codes and check for the availablity of GLSL. Please can someone give me a tutorial for GLSL and how to make gpu skinning because i don't know how to use shaders at all.
Advertisement
I think CPU skinning could still be applicable in an engine that does a lot of other work on the GPU. It's all about balancing your load for the maximum efficiency of your engine. You should definitely make the effort to learn GLSL, it's a lot of fun. A lot of companies build scalable engines that can fall back to software rendering based on the detected hardware. Personally, for my projects I just assume a GTX 260 will be used (since that's what I own), and if I ever develop something big enough to be sold then I will code in software rendering support then. (And that would be pretty easy to do, and I could always just make a GL 3.0 card a requirement. It's not too uncommon to limit your customer base to those with the hardware to run it)
Quote:Original post by muster
hello all. Is cpu skinning still applicable in games where there is alot of animations in it or should i switch and learn shaders to make gpu skinning? Also what if some display adapters don't use GLSL should i make the two CPU-GPU codes and check for the availablity of GLSL. Please can someone give me a tutorial for GLSL and how to make gpu skinning because i don't know how to use shaders at all.


When you are developing for PC (not console/mobile) you should do the skinning on the GPU ! Before you try to implement a software and shader solution think about your target plattform. Do you want to support 8 year old PCs with windows 2000/linux, or do you want to support modern PCs with a decent 3d video card ? I.e. Windows Vista/7 needs a decent video card.

Btw learning and using shaders is not difficult.
http://www.opengl.org/wiki/Skeletal_Animation

but it is not something that is easy. Perhaps picking up a book about rendering would be better for you.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by FunkymunkyA lot of companies build scalable engines that can fall back to software rendering based on the detected hardware.


I don't think any companies that work in games have done that for a long time.
The most notable and recent example I can think of is Unreal 2004 and that was an exception.
GPU skinning should be the default unless you have other requirements, as it will be the fastest skinning option with the least amount of work.
Until you need more GPU power and have some CPU power spare I wouldn't think about software skinning unless you're using an unconventional technique that would not perform well on the GPU.
Otherwise you'll waste time optimizing your software skinning technique, which involving SIMD may take some time.
tl;dr GPU skinning until your game needs GPU power for something else more important.

This topic is closed to new replies.

Advertisement