Hardware skinning
Re: Hardware skinning
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
Re: Hardware skinning
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.
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.
Re: Hardware skinning
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
Re: Hardware skinning
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...
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...
Re: Hardware skinning
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?
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
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Hardware skinning
Would be quite intereseting as it would also be possible for ogl-es1, which supports matrix palette skinning via a broadly implemented extension.
Re: Hardware skinning
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.
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.
Re: Hardware skinning
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.
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.
Code: Select all
core::vector3df position;
core::vector3df normal;
core::vector3df T;
core::vector3df B;
core::vector2df TexCoords;
video::SColor indices;
video::SColor weights;
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt