Giter Club home page Giter Club logo

Comments (16)

 avatar commented on May 30, 2024 1

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.

avril-gh avatar avril-gh commented on May 30, 2024

blenders rigify could be a good example.

from collada-exporter.

Lamoot avatar Lamoot commented on May 30, 2024

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
stretchy_cube.zip

from collada-exporter.

avril-gh avatar avril-gh commented on May 30, 2024

Rigify is an essential part of my toolkit

same here

from collada-exporter.

set-killer avatar set-killer commented on May 30, 2024

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.

 avatar commented on May 30, 2024

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.

set-killer avatar set-killer commented on May 30, 2024

@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.

Lamoot avatar Lamoot commented on May 30, 2024

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.

set_deform

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.

set_deform1

from collada-exporter.

 avatar commented on May 30, 2024

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.

set-killer avatar set-killer commented on May 30, 2024

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.

 avatar commented on May 30, 2024

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.

Lamoot avatar Lamoot commented on May 30, 2024

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.
set_deform2

from collada-exporter.

set-killer avatar set-killer commented on May 30, 2024

@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.

Lamoot avatar Lamoot commented on May 30, 2024

@set-killer The tooltip sounds good. Happy to help you getting this much needed addition to the exporter.

from collada-exporter.

 avatar commented on May 30, 2024

@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.

akien-mga avatar akien-mga commented on May 30, 2024

Fixed by #45.

from collada-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.