No announcement yet.

Multiple-objects 3D model exporting and importing

  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple-objects 3D model exporting and importing

    Hi all,

    Every time I have a 3D model whose animation requires more than one 3D object (for example the attached crossbow) I find myself in a position where I have no idea how to import the model into Quake.

    I can group objects with Ctrl+G, then rig the model and animate it. Everything will be fine until I decide to export because at that point the .mdl exporter plugin will simply export whichever object I clicked on when selecting the whole group, but will ignore the rest of objects in the group. If I decide to go clicking on every object holding shift, it will only export the last object I clicked.

    If I use Ctrl+J it will join the objects and everything will be exported fine and in Quake the whole model will appear, but it's just not possible to animate a joined model, it's madness. There must be some way to export grouped objects as a .mdl from Blender...!

    What is the normal procedure when doing this? Is there a way to work with the animations using a group and then join them after it's animated? Maybe using a different format that could be imported into Quake using grouped objects?


  • #2
    All of your moving meshes need to be on the same armature. The stock of your crossbow needs a bone. This will be the parent bone of all other bones. Then you'll need a chain of bones with a control bone for each side of the bow, so it can bend smoothly. The string will need a bone that controls the vertices at the middle. ALL of these bones need to be children bones of the stock of the crossbow, so that when you move the crossbow, all other bones follow relative to the stock transforms.

    In short, you can only have one object. Within that object, each separate mesh needs a bone. All bones are part of the same armature.
    'Replacement Player Models' Project


    • #3
      Here, I figured some pics of what I'm talking about might help.

      Here is a double-barreled shotgun I modeled, rigged, animated, and textured for a mod I'm working on. The first picture is the model in its entirety. It is one object parented to one armature, with several separate meshes tied to several different bones. The second picture is an exploded view of all meshes and bones. The highlighted bone is the parent bone. The barrels and forearm are part of one bone. Each shotshell has a bone, and the players hand/arm have several bones. The fingers and wrist bones are parented to the arm bone. The arm bone is parented to the action of the shotgun. The shotshells are parented to the forearm. The forearm is parented to the action of the firearm.You can see all the dashed lines in the 2nd pic that shows what bones are parented to what. So, moving the rear mesh (by moving the parent bone) moves everything.

      Remember: ONE object, ONE armature, several meshes and several bones.
      Last edited by Dutch; 09-24-2017, 01:56 AM.
      'Replacement Player Models' Project


      • #4
        I think I got it. I understand that I should be able to select the stock and everything should be parented to it (on 1st, 2nd, 3rd or whatever degree basis as described in your second post), would this be what I actually select for the final export (since it would take into account all of the children)?

        However, after reading again your first point I'm still a bit confused. You mention that I can only have an object, but in reality I will have a few different objects (only parented to the stock somehow):
        • stock+bow (could be joined without issues)
        • string
        • bolt

        Will the fact that they're rigged and parented make a difference during export? I haven't tested it formally but I believe last time I exported something with children/parents they were also ignored by the exporter and it only exported the currently selected item (but it could have happened because I'm even far from being a rookie Blender user).


        • #5
          @being a rookie at blender

          It's ok, you are learning and everyone has to start at square 1. The fact that you are asking questions and taking advice is a huge plus.

          Your problem is a lack of understanding in the structure of a blend file.

          * A mesh is geometric shape. Things like cubes, icospheres, cylinders, planes, etc. are meshes. They contain faces, vertices, and edges. Meshes are what you unwrap on your UV map.In my shotgun example, the player's arm is a mesh. Each barrel of the gun is a mesh. Each shotshell is a mesh.
          * An Object is a collection of 1 or more mesh. You select Objects while in Object mode.
          * An Armature is an Object as well. You will parent your Object mesh(es) to the Armature. The Armature does not export, but you use it to create frames (i.e. positions, rotations, and scales of vertices) which do export.

          Now, let's walk through this one step at a time:

          1) You open a new file in Blender and you are in Object mode by default. There will be a cube. Select the cube. Since the cube is the only mesh so far, the Object will only consist of this mesh.
          2) With the Object selected (the cube), enter Edit Mode.
          3) Use that cube to model the crossbow stock.
          4) While still in Edit Mode, go to Add and add another mesh (cube, cylinder, whatever). Model this new mesh into the bow. Do the same for all parts of the model that will move independently of the stock (string, crossbow bolt, whatever else). Note that you will NEVER leave Edit Mode to add more meshes. If you add meshes in Object mode, you will have multiple objects, and MDL export will only export one object.
          5) When your crossbow is totally modeled and UV unwrapped, including all separate meshes WITHIN the same object, you are ready to rig it. Go to Object mode and add an Armature - Single Bone. Select the Armature.
          6) Go into Edit mode with the Armature selected and add as many bones as you need to properly rig and animate all parts of the crossbow. The first bone you made should be linked to the stock, all other bones should be children of it. Give all bones a sensible name, such as "stock", "string", etc.
          7) When all bones are created, go to Object Mode and select your crossbow. Go to Modifiers and add the Armature.
          8 ) With the crossbow still selected, go into Edit Mode. Select the vertices of the meshes you want to be modified by the bones. Create Vertex Groups that consist of these vertices. Name the vertex groups the same name as the bones that will control them. The names have to be an exact match.
          9) Go into Object Mode and select the armature. Now go to Pose Mode and move some bones around to make sure they are parented to the vertex groups you specified. Use Weight Paint to adjust how much influence bones have on individual vertices.
          10) When your happy with the mesh deformations from the bones, stay in Pose Mode and start animating. Position, rotate, and (maybe) scale bones to achieve the frame poses you want. Make sure Location, Rotation, and Scale is selected before you save shapekeys.
          11) When animation frames are done, go into Object Mode and select the crossbow object. Make sure the frame timeline is set on the final frame. The export will only include the frames at and before the cursor.
          12) Export the model to MDL format. Open it QME to make sure it exported correctly. Check all frames. Using QME and Wally, texture it with the Quake palette. You can make a higher-res RGB texture from this base texture later if you plan to run it with a replacement texture in DP or FTE.

          This is all assuming you actually are exporting to MDL...if not, some of that list will be different. But the modeling and rigging will remain the same. If anything in that confused you, then you will need to read/watch LOTS of tutorials on blender. The amount of information that's required is more than I can type here. But if you follow up and research into anything I mentioned above, you should be able to use that list as a foundation for collecting knowledge.

          EDIT: to re-iterate, if you look at the 2nd pic I posted (the exploded view), all of these meshes are in the same Object. If I go into Object mode and select anywhere on those meshes (shotshell, the player's arm, the stock, whatever), ALL will be selected and highlighted, because they are all considered to be the same Object.
          Last edited by Dutch; 09-24-2017, 04:08 AM.
          'Replacement Player Models' Project


          • #6
            Thanks Dutch. I have some Blender experience but getting functional models into Unity3D is way easier than doing the same for Quake (even though I'm aware it's only because of lack of knowledge)!

            These steps already clarified lots of doubts so I think I'm good to go and give it another shot.


            • #7
              No problem and good luck! Let us know how it goes.
              'Replacement Player Models' Project