-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skeletal animation demo #186
Comments
Here's the issue for fixing the parser -> chinedufn/collada-dae-parser#3 EDIT: This was not the actual issue! |
What was wrongSo it turns out that the issue was my ignorance of control (non-deformation) joints like IKs, pole targets, etc. It turns out that the collada format doesn't do much to support these. The model that we were trying to use had these types of control joints, so it just didn't work when we tried to use it a few months ago. The parser will now throw an error if you attempt to use a collada file that contains control joints. Instead, you must first bake the effects of your control joints into your deformation bones Path ForwardWe already have a reference vertex shader and fragment shader so we'd effectively be copying and pasting them into a |
From my experience, COLLADA is the worst possible format for loading assets because it's so insanely complicated (it's only great for exchanging assets between applications). If it's for a demo with a single hardcoded model, consider something like GLTF. I wrote my own COLLADA loader/converter that loads a COLLADA file and exports it to a custom JSON+binary format that's super easy to parse in browsers. See this live preview and the github repo. The live preview renders animated models, and I also have a highly experimental branch with support for animation blend trees (see below image for an example of smoothly blending between standing/walking/running animations). Feel free to have a look at any of this and scrap any usable code from it.
|
I would second glTF. Here is a glTF repo with sample models |
@chinedufn what are your thoughts on adapting: https://github.com/chinedufn/skeletal-animation-system to use regl? I was just considering this but haven't wrapped my head around it yet. |
@crobi @vorg for sure for sure, wouldn't hurt to have examples for how to deal with both file formats though. But yeah just a question of where to start. @kevzettler if you're interested in doing that I'd be happy to answer any questions / provide advice on how to get started / help in any way that I can. |
I ported @chinedufn 's chinedufn/skeletal-animation-system#3 I am interested in feedback on the demo and further discussion here. We could use that as the example. It is a good start, but I feel there is room yet for a more simplified example. The Additionally, I feel the Blender -> collada -> regl/WebGL work flow is not the best learning example. I started it on a personal model and found the manual conversion of IK joints to deformation joints to be real tedious. On the topic of GLTF. Khronos group is currently requesting quotations on a contract project, to build a Blender -> GLTF exporter. See: https://www.khronos.org/rfq/request-for-quote-blender-gltf-exporter . You could build out the exporter and test it against regl. It could be a good regl mindshare building opportunity. |
The glTF Blender exporter is now in alpha, and does support morph targets: https://github.com/KhronosGroup/glTF-Blender-Exporter/ |
Does the skeleton branch mentioned in the OP still exist somewhere? |
@donmccurdy if you're looking for regl skeletal animation support I did put together a demo for the I'm not sure why it was removed form the master branch of the repo but it was working with at skinned model. I currently use regl for skeletal animation in a similiar manner in an ongoing project |
I don't quite remember why I removed it, but I think I was planning to re-write the demo site for some reason but then I changed languages and stopped using skeletal-animation-system. |
It would be cool to have a demonstration showing how to implement something like skeletal animation/vertex skinning on top of regl. There is a half baked version on the skeleton branch currently, but it is currently blocked by the collada parsing being incomplete. If we can fix that up, then making a demo shouldn't be too hard.
The text was updated successfully, but these errors were encountered: