Hardware skinning

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware skinning

Post by Nadro »

I think that a hardware skinning shader shouldn't be builtin Irrlicht, so don't worry about lighting etc. If someone need a hardware skin shader I'm sure that he has got also own lighting shader etc.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Funto
Posts: 17
Joined: Tue Feb 21, 2006 2:29 am

Re: Hardware skinning

Post by Funto »

Nadro >> I agree.
hybrid >> would you be ok if the user was required to provide his own vertex shader for using hardware skinning ?
IMO the best solution would be to give an example shader to the user, that would use a small set of easily reusable functions.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Hardware skinning

Post by Mel »

The point here is to implement a hardware based skinning system, not a shader based implementation, so a shader, technically would only receive the final position of the vertices, and thus, any shader would be useful, and yet would benefit from the hardware optimizations
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
fmx

Re: Hardware skinning

Post by fmx »

Mel
AFAIK, with DX it isn't possible to do hardware skinning without using shaders unless you use GPGPU (which isn't an option in this case).
The shader that transforms vertices for rendering also needs to skin them

Funto's point is probably the best way of doing it:
providing a simplest possible vertex shader with irrlicht, which has nothing but basic gpu-skinning functionality (no lighting calculations).
Though might cause headaches where inexperienced users wonder why texturemaps or lighting wont work...
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Hardware skinning

Post by Mel »

But i remember the skinning samples from the DirectX SDK, and only two of them used shaders, the 3rd sample did software skinning, and the 4th did palette skinning using the hardware palettes to store the transformation matrices.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Can't that be applied in Irrlicht somehow?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Hardware skinning

Post by hybrid »

Would be quite intereseting as it would also be possible for ogl-es1, which supports matrix palette skinning via a broadly implemented extension.
fmx

Re: Hardware skinning

Post by fmx »

I didn't know DX(9) had that, it seems to have the exact same role as the GL matrix palette extension, very useful :)
It wouldn't be viable as a universal solution though, just another possible way of handling it.

Looks like irrlicht could end up with three different methods for skinning:
1. software (already implemented)
2. via shaders (trivial, I would say ideal)
3. via matrix-palette extensions (can also be a possible fallback if shaders are not supported)

IMO irrlicht should allow skinning via shaders (where possible), whether or not the matrix-palette method is implemented.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Hardware skinning

Post by Mel »

For pure shader based skinning, a small extension to the tangents vertex, which simply added another field, for instance, a second A8R8G8B8 color, would be enough.

Code: Select all

 
core::vector3df position;
core::vector3df normal;
core::vector3df T;
core::vector3df B;
core::vector2df TexCoords;
video::SColor indices;
video::SColor weights;
 
For the matrix palette, not obstant, i would suggest another modification, because it seems that the amount of matrices that can be stored is very limited, and it is that the loaded skeletal meshes were also split into small submeshes with a maximum amount of bones, perhaps 4 or 8, so, the limitations in hardware could be sorted, and the amount of bones could be still unlimited.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply