creating collada files with blender for

    Jul 14 2014 | 9:12 pm
    I am currently looking into creating collada files for with blender, but beside exporting simple models I was unable to achieve my immediate goal: creating a collada file with multiple drawgroups.
    has anyone any experience with this? could it be that blender's collada exporter doesnt support this?
    and as a follow up (since I am hooked to blender) any suggestions on how to export animations for

    • Jul 16 2014 | 11:09 am
      For animations you need to export it as a .obj file and in the export settings check export as animation, it will then export one .obj object per frame of animation. In max you can then build a system which can load each .obj model. eg. counter object to read .
    • Jul 16 2014 | 1:41 pm
      thanks andro. this workaround would certainly be of service in some cases. I want to prebake some physical simulations, export them as individual meshes and play them back in jitter, so your approach certainly has its merits because it doesnt require to reload those meshes and export them again in a collada file. and maybe the drawgroup attribute is not as fast as using multiple for this purpose. only some tests could answer this question.
      but the object has some nifty features that I would like to use as well, and beeing able to create content for it with blender would be excellent.
    • Jul 16 2014 | 4:46 pm
      this is more a question for a blender forum, although fairly sure someone around here has done this before. did searching "blender collada export" not give you some information?
      exporting animations is specific to the 3d modeler.
      exporting multiple drawgroups is usually the result of multiple material definitions, with one drawgroup per material in a specific mesh.
    • Jul 16 2014 | 4:56 pm
      for exporting an character with animations i did sucessfully choose the Sl+OpenSimRigged Preset with Blenders Collada exporter... (but had to reset the bones rotations before within Blender)
    • Jul 16 2014 | 7:56 pm
      @robrobtherichorg: I didnt find anything that gave me any hints about the drawgroup attribute. and if it was a pure blender question I would agree. but in my opinion the authoring of models for should be of interest for cycling as well, because understanding and mastering this toolchain, even though it involves third-party products, has ramification for the kind of content you can create with jitter. So maybe this thread can be a starter for this kind of questions...
      unfortunately, from your post I still dont understand what it actually is: is it a property of a material, or a group of meshes that have a certain material? sorry, sometimes I am a bit thick. (googling for drawgroup was not very enlightening).
      -> if I have four cubes in my mesh, how do I make sure each cube is in a separate drawgroup? applying a different material to each cube-mesh?
      @tobiasros: thanks, good to know that somebody successfully exported bone-animations from blender. two questions:
      1. with "Sl+OpenSimRigged" I guess you mean "Armature Options: Export for Second Life." ..? 2. did you include more than one animation in the file?
    • Jul 17 2014 | 4:15 pm
      sorry, was not implying the topic wasn't relevant here, just that you will find more info regarding animation export over there.
      a drawgroup is the max name for a sub-mesh/group of your model file. a model file may have 1 or more drawgroups. each drawgroup may have a material defined. different 3d modelers, exporters, and file formats will have different requirements for creating drawgroups. experimentation is your friend here.
      the duck.dae file has a single drawgroup and a single material defined for that drawgroup. the seymour.dae has a few drawgroups with a different material for each drawgroup (even though the file seems to contain a single contiguous mesh). the mushrooms.obj file has several drawgroups with no material file (so they all share the default material).
      there is also the concept of mesh instances, which some modelers/exporters/file formats support. this means a single mesh can be drawn multiple times using the same geometry and material, but simply changing the transform. gl.model supports this as well.
    • Jul 17 2014 | 6:38 pm
      rob - thank you for clearyfing. It took me some moments to figure out what drawgroups in blender are.
      For future reference: under the "Material"-Tab there are the "Object Materials Slots" which contains the list of materials applied to the model. In here you can assign which slot (rsp. its material) is applied to which verice/face. a drawgroup is a slot in this list.
      in regards to mesh-instances: blender does know this concept as well, so maybe it is possible to export such a collada file. may I ask for your help here and provide a simple patch (with a mesh-instance-collada file) that does this?
    • Jul 18 2014 | 7:34 am
      Hi, i attached 2 screenshots of my blender collada export settings. Also, i just exported with one animation, but this one encompassed many animations in fact - so i can switch through them via the looppoints.... (see jitter example with warrior)... (old tryout)
    • Jul 18 2014 | 1:31 pm
      Tobias, thank you very much for this info. This should get me started :-)
    • Jul 18 2014 | 5:45 pm
      i've attached an example patch and collada file demonstrating instancing with gl.model.
    • Jul 19 2014 | 5:05 pm
      thank you rob. it is so simple it hurts. I was mixing up drawgroups and nodes into something incomprehensible complex.
      For future reference:
      To export multiple objects from blender just select the objects you wanna export (no matter if some of them referencing the same mesh), go to export collada and select "Selection Only". blender "objects" turn into "nodes" inside the"drawgroups" are the "Object Material Slots" (a confusing name since it should be actually called "Mesh Material Slots") of the blender-mesh - and not the object.
      if there are multple meshes, the drawgroups are numbered through all the "Material Slots" of all the exported meshes.
      an updated zip with blender file, collada and max is attached.
      thank you all for helping me clearifying things on this subject.
    • Oct 05 2014 | 12:03 pm
      I was recently asked how to take the monkeys eyes-vertices and make them a materialgroup in blender. here my take on a short step by step tutorial:
      1. Select the monkey 2. Select the Material-Tab inside Properties 3. Create two Material Slots with the plus-button 4. Select the first slot and add a material (press "+ new") 5. Select the second slot and add a material (press "+ new") 6. go into edit-mode 7. select a vertice of the head and press ctrl-j 8. select the slot on which you want to assigne the vertices. 9. press "assign" 10. press a to unselect all vertices 11. select a vertice of each eye and press ctrl-j 12. select the other slot 13. press "assign" 14. press a to unselect all vertices 15. test if you assigned correctly: select a slot and press "select"
      be aware: blender requires to have every vertice beeing assigned to a material. so if you make the check at 15. before you assigned the eyes to the second slot, all vertices will be selected.
    • Sep 12 2018 | 9:39 pm
      This thread is so helpful. Thank you all very much for contributing within it!!
    • Sep 15 2018 | 12:09 am
      I got this to work with multiple drawgroups using a single object, but I was not able to get instancing to work, using rob's or maybites' patches. Is there anything that I need to do specifically within Blender for instancing, when exporting?