VB Skinning

Started by
3 comments, last by lawnjelly 5 years, 3 months ago

Hello, I just want to have a few questions which are bugging my mind lately. I really didn't touch directX for probably 6 years now and since I did many things changed, so I would like to ask few questions, I would be really happy if someone could help me. I have started playing with a really old game (DX9, ~2005) some time ago. It uses very old indexed skinning method, using INDEXEDVERTEXBLENDENABLE and softwarevertexprocessing. This got broken though after some Windows Update, I believe it was 14393, it runs on max 2 fps while the sw processing is used, I tried to reverse engineer the dll, but I think I'm kinda out of luck, but if anyone has idea why that is, that would be the first question. Second question is, what's the best alternative to this without using shaders? Even if it means the same perfomance, but that it would at least work on the new Windows. Next Question is maybe kinda dumb, but I still couldn't exactly figure out how do shaders work. Let's say a mesh has a vertex buffer of 100 points, how do we pass those to the shader and let the shader know which ones should be moved? And the last is just to confirm my hope, can I lock the vertex buffer to skin the points right there?

 

Thanks a lot, any help is greatly appreciated, even if only one question, I'm really struggling.

Advertisement

I'm no longer use directX or windows, so I can't really advise on best course of action, but if all else fails you can always do software skinning yourself, then upload the skin each frame as a dynamic vertex buffer. In fact I've always implemented software skinning as a reference implementation before anything else, as a reference implementation and also as a fallback for hardware that may not support a particular method.

As for asking how shaders work, that may be a bit vague for a forum question imo, you probably need to google some basics about modern 3d APIs and follow some tutorials.

I don't have any special links for software skinning but this might start giving you ideas, software skinning is actually pretty easy once you have loaded the right data. It is more complex to get the bone transforms from an animation system, rather than the skinning itself, I'm kind of assuming you've got this done already in the previous code.

This is all assuming you have the source code etc. When you say 'reverse engineer dll', if you are referring to a binary game, that is a whole other story and probably a lot more difficult. This is more like cracking software techniques, and also probably not something people here would advise on unless you had the legal rights to make these modifications (e.g. your own game, permission from rights holders).

Yes, I do have the source code, I meant to RE the dll. The thing that I don't get about shaders is, how can it only transofrm 3(4) positions at once, while the animations have much more bones. Is the shader just sent multiple times in a draw call? Thanks a lot for the help though, I can't really find any real shader tutorials which explain them deeply anymore, also the game uses it's own APIs for Meshes etc, so I can't really know what is what.

The method used for hardware skinning is specific to the technique, often there is a matrix palette where e.g. the 4 highest weight bones are used to influence a vertex. This thread (although from 2012) might have some ideas:

https://www.gamedev.net/forums/topic/631948-what-is-the-current-trend-for-skinning/

This topic is closed to new replies.

Advertisement