Hi,
this patch fixes the parenting of objects which are attached to bones. If you're attaching things (weapons, accessoires, etc) to the bones of a rigged model, these objects will be exported as children of these bones - that's all.
tested with my own COLLADA engine (windows) and Apple iBooks Author / OSX Lion Preview. The code is currently baking the matrix (a simple if (1|0) block) this will be targeted with a next patch.
have fun,
daniel
Description
Event Timeline
Hi,
There's a release coming which is followed by an svn freeze so can't commit anything for at least a day or two; think we should start shifting through your patches after that :) For this one issue I also have a wip patch that I'll attach here (atm. has some skincontroller changes too in it), I'm mostly looking into the import/export of nodes, skinning and transforms in general.
Thanks,
Juha Mäki-Kanto
Hi Juha,
oh, I'm aware of that - I'm a (still silent) reader of some blender mailing lists but currently "blessed" with a flu - so no need to hurry ;-)
I've tested your patch as well, and would now vote against my patch. I've tried to be minimum invasive with my patches, this is why I did not change too much of the current processing flow. Your approach by using a batch is much more what I would have done.
My patch is still much closer to what I want, but it's still buggy:
- objects that are child of a bone should be exported within the armature, at least this is how I see it ;-)
- COLLADA files created with my patch are still broken: if a bone has been rotated (and/or scaled), the child object is somewhere else. it looks like a SRT/order problem, but currently I'm unable to focus on that...
About batching: I'm a bit unsatisfied with the current choice of using a direct streamwriter for the whole COLLADA export, it prohibits some useful post-processing. In 2004 I wrote my last (python-based) blender scene exporter into a custom XML format, but when I heard of COLLADA I became a fan of it. My current project is pure COLLADA based, this is why I've started to write patches for blender (it will be the DCC tool for my artists).
I have several goals here, so fixing skinning/animation is just one next step:
- embed some functions from the COLLADA refinery (w/ settings dialog) like deindexing trifan/strip generation, primitive conversion, material cleaner, dedup etc.
- generate shaders (Cg, GLSL) based on material definitions / node editor incl. correct parameters
- emit post processing instructions and how passes should be rendered
- overwriting an existing DAE should merge all unknown elements/attributes/namespaces from the original file
...maybe the wrong place to post this stuff here, but I'm (silently) working on it and will submit it here and request more help/discussion when needed.
now.. "to the bed!"
daniel
Hi Daniel,
Yeah, there was at least one bug still in the patch and had to make it play nice with the Second Life- compatibility (probably committing it over the weekend). I'm trying to be minimally invasive too but have to get things done also within the current setup until there's a clear enough picture to do rewrites.
The current situation with collada is still in flux as I imagine you've noticed if you've read the ML. I'm mainly looking at the internal opencollada for exporting (will commit some patches for the importer too, but working on it may just set things back for opencollada) and Domino Marana is actually working on a python exporter for fast development. Your goals seem advanced so best to visit #blendercollada / #blendercoders in irc at some point or take part in the discussion on the ML.
Hi Arystanbek & Daniel,
I made r44231 and amended it to have parenting against the bone's tail in r44419 so maybe this one can be closed if those commits are sufficient to fix the issue.
Thanks,
Juha
Works great here! Tested with iBooksAuthor, Preview etc (OSX built-in collada support) and my own implementation.
Hi Nathan,
I think this one can be closed, same functionality is in trunk. Thanks to Daniel for the patch!