Comments (16)
For what it's worth, I would really love to see this happen still. I've looked at the code, but it's a little dense for me now, I need to brush up on my Python.
Rigify is an essential part of my toolkit, and unless I'm mistaken it's becoming more popular with it being in included in Blender now.
from collada-exporter.
blenders rigify could be a good example.
from collada-exporter.
As an example of a rig setup, I'm attaching a simple stretchy cube. The rig is made up of control, helper, and deform bones. The archive contains the .blend and .dae files exported with the better collada exporter.
stretchy_cube.zip
from collada-exporter.
Rigify is an essential part of my toolkit
same here
from collada-exporter.
You know that there is this option:
- Exclude Control Bones -
Exclude skeleton bones with names beginning with 'ctrl'.
Is this going to give you the same result as exporting only the deform bones?
If this does not works then a similar functionality should be implemented, based on this Blender' property:
https://docs.blender.org/manual/en/dev/rigging/armatures/bones/properties/deform.html
So if we go with the Deform
checkbox from the blender's properties you should check and uncheck the bones which you need before exporting, and back again check/ucheck the ones you need when animating, rigging, whatever...
Or is there another properthy which determines which bone is control and which one is deform bone?
from collada-exporter.
I've actually been playing with those properties today, to no avail.
Looking at the code, it appears the "Exclude control bones" option does a simple string comparison of the bone's object name (it checks if the bone's name is prefixed with "ctrl-" without the quotes). This would be sufficient for Rigify and also the Makehuman MHX rig and probably others as the convention is to name deforming bones with the prefix "DEF-".
Checking the blender property would be the better way to do it, as then it is portable to custom rigs which may not follow the naming convention above. That requires a knowledge of the Blender API which is above me right now.
from collada-exporter.
@RodeoMcCoy How do you specify which bone is deform bone and which one is control bone? Is it by that property from the link above?
Because:
Also it is worth noting that by turning off a boneβs deform option, makes it not influence the mesh at all...
I guess both the control bones and the deform bones should modify the mesh, so using the property from the link above is not a good option i suppose?
From the attached example by @Lamoot none of the bones have this property checked.
By using the prefix you can specify exactly which bone you want to be exported...
from collada-exporter.
Greetings!
In Blender to set a bone as deform, you can do it in the Properties window, Bone category, Deform panel. Of course, you need to have the bone selected. You might not have selected the deform bone if it doesn't show deform option enabled, as there are other bones in that space.
I'm aware of the current option to discard bones with ctrl prefix, but it's limiting to do it this way. For example in rig hierarchy, some bones are neither for deform nor control, but sit in between to automate parts of the rig. It's why I'm proposing to base this on a bone's property and let the rigger enable / disable deform for desired bones, independently of any naming convention. Below you can see python output when toggling the option on / off.
from collada-exporter.
Lamoot thanks for the great answer. set-killer, thanks for your commit! I took a look at your code changes and it's simple enough and should do the trick. I can submit an approval if you'd like. When it's merged I'll be excited to test it out.
from collada-exporter.
You may test it by downloading it as a raw file and replace the script which you are currently using.
The merging could take a while... It depends how busy are the other devs...
from collada-exporter.
Works like a charm! I only tested with one model rigged with Rigify. I previously had animation issues (wonky mesh deforms that were terrible) and the Skeleton node in Godot had ~430 bones. Now with these changes all the animations are perfect and the Skeleton node has 77 bones.
Thanks!
from collada-exporter.
Yup! The option works here as well with the various files I tested. It does one thing a bit differently in that it doesn't discard the non-deform root bone, though I don't think this gets in the way. Thank you very much for implementing this.
Do you think the tooltip / name of the option should now be adjusted to better communicate what it does? Here's an example from the fbx script.
from collada-exporter.
@RodeoMcCoy woah, that must be pretty complex skeleton.
@Lamoot The tooltip will be changed to:
Exclude skeleton bones with names beginning with 'ctrl' or bones which are not marked as Deform bones.
Because we are still keeping the old functionality. The changes are in the merge request, but outside of the file which you replaced and that actually contains the logic.
So we are waiting for merging. Thank you both for your cooperation!
from collada-exporter.
@set-killer The tooltip sounds good. Happy to help you getting this much needed addition to the exporter.
from collada-exporter.
@set-killer It's the default Rigify one. It's more for film animation rather than games, but it's such a nice tool. The drawback was the high number of bones, which game engines don't like.
from collada-exporter.
Fixed by #45.
from collada-exporter.
Related Issues (20)
- Better Collada for Blender 2.8 25052019 HOT 9
- Godot Export Manager: Cannot export anything. Location Unknown Error: -1 HOT 5
- IndexError: list index out of range on Blender 2.80 HOT 1
- Can't import addon on blender 2.8 HOT 9
- exporter adds extra keyframes which don't exist in blender 2.79 HOT 2
- Exported material color and emission color values are wrong HOT 1
- Shape Key Export Fails on Blender 2.8 HOT 3
- Add-on requires 2.8x but already on 2.82 HOT 1
- using Blender 2.82 but better collada says need to upgrade to 2.8x HOT 3
- Export fails with 2.8 fork HOT 4
- UV texcoords are exported wrong in Blender 2.82 HOT 3
- Transparency/alpha isn't exported in 2.8 HOT 6
- blender 2.9 HOT 1
- Better Collada still listed on the godotengine.org Download page HOT 10
- Plug-in doesn't show up in the Add-ons list HOT 2
- multiple errors when using HOT 1
- Add option for axis Y inverted,,, Front in blender is Back in Godot.- HOT 4
- Sketchup exported collada can not be imported properly. HOT 2
- Does this works with Blender 3.0? HOT 3
- Can't enable plugin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collada-exporter.