MangoFusion Posted February 4, 2015 Share Posted February 4, 2015 I've been working on a Hardware Skinning branch ( https://github.com/jamesu/Torque3D/tree/ts_hw_skinning_mk2 ). This implements hardware accelerated skinning via a vertex shader. Summarizing the capabilities...* Skins with 4x3 matrices allowing for around ~70 active bones in DX9* Allows for 4 or more bones per vertex (limited by how many attributes you can pack into a shader)* Up to 255 addressable bones per mesh (subject to API limits)* Can fallback to software skinning.There's currently a problem with mixing rigid and skinned meshes (really need to use separate or offsetted buffers here), and also a weird issue with the first person weapon model. Hopefully should get these issues fixed soon ready for a PR. Quote Link to comment Share on other sites More sharing options...
Timmy Posted February 5, 2015 Share Posted February 5, 2015 Excellent, great work! Quote Link to comment Share on other sites More sharing options...
buckmaster Posted February 5, 2015 Share Posted February 5, 2015 Whoah, that's impressive! Great to hear :). Quote Link to comment Share on other sites More sharing options...
lowlevelsoul Posted April 6, 2015 Share Posted April 6, 2015 Have you thought about using stream out? I have a real issue with vertex shaders doing skinning in that they just tend to be inefficient (for a number of reasons). Using a stream out system would mean that; The vertex shader pipe-line is the same for all mesh types, reducing overall code complexityThe vertex shaders and vertex formats tend to be simplified, reducing the number of render state and shader changes during renderingNo need for multiple draw calls for single mesh due to constant/constant buffer limitations (there's also a caching cost on constant buffers) Anyhow...even if you hadn't though if it; excellent work. I've been looking through the render pipe-line and my first thought was "aye caramba!". It's a clever person who can look into the eye of that beast and do something productive! Quote Link to comment Share on other sites More sharing options...
MangoFusion Posted April 8, 2015 Author Share Posted April 8, 2015 Unfortunately for the feature set I was targeting (DX9), stream out was not viable. It also turned out despite being rendered multiple times skinning in the vertex shader was miles faster than any software solution could hope to be. Quote Link to comment Share on other sites More sharing options...
JeffR Posted April 15, 2015 Share Posted April 15, 2015 Hey man, had you had any progress on this, or were the current problems still stonewalling you? I want to get this in for 3.8 if at all possible, so if you wanted to crack heads with me to try and get this ironed out, I'd be pretty game on it.So far I've had 2 noticable problems. The '$nodeTransforms' parameter is unassigned issue(which oddly I see more triggered in the glow bin manager than anywhere else) and the 2d first person weapons. Quote Link to comment Share on other sites More sharing options...
MangoFusion Posted April 17, 2015 Author Share Posted April 17, 2015 First person weapon models are still a complete mystery.I'm currently refactoring the vertex buffer code so it uses a single VBO and also to solve the nodeTransforms issue. Quote Link to comment Share on other sites More sharing options...
JeffR Posted April 17, 2015 Share Posted April 17, 2015 Ah, very cool.Lemme know if you need me to test anything on it. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted April 18, 2015 Share Posted April 18, 2015 First person weapon models are still a complete mystery.I'm currently refactoring the vertex buffer code so it uses a single VBO and also to solve the nodeTransforms issue.Given that when I last tested it, the pistol (and only the pistol) was a squashed plane, wouldn't be surprised if that fixed the first person thing. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted July 28, 2021 Share Posted July 28, 2021 yes Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.