This guide is for importing models from Poser, Daz Studio or programs that use .cr2 files into Blender.
I don't know of any scripts that will import all aspects of a character into Blender fully working. Because Blender works in a different way than these programs this is very difficult to do, if it is possible to do at all? So the best we can do for now is to provide the starting point for the conversion you will need to finish off the model as described on other sites like this.
There are two possible approaches described here:
- The script by Damir Prebeg keeps things relatively simple and fast, the script imports both the mesh from the .obj file and the armature from the .cr2 file. It doesn't import any materials (Blender has 16 material limitation) and it doesn't attempt to set the vertex weights.
- I have adapted the CR2 parser by Frederick Lee and the obj importer that comes with Blender. This is much more complex in that it first builds data structures from the file before using the data to build the model. It attempts to set the vertex weights from the sphereMatsRaw and/or angles data but this does not work too well for the reasons discussed below.
Script by Damir Prebeg
This script will import armature and referenced obj model from Poser CR2 file. It doesn't import any materials (because of Blender 16 mats limitation) Unlike the obj importer that comes with Blender this script maintains the order of vertexes, this is necessary if we need to use with morphs.
- Launch this script and navigate to Posers Runtime folders. Under Libraries\Character sub folders find and select your cr2.
- If obj model is correctly referenced, it will be imported as well. Otherwise, script will import only armature from selected cr2. If that happens, launch this script again, find and import a proper obj file.
- After that, manually add Armature modifier to imported mesh
Script which I built from a CR2 parser by Frederick Lee
I happen to be running Blender in Linux, I have not tried this procedure on any other os, also I have only tried the cr2 files produced by the version of the program I happen to have so I can't be sure this will work with the files you happen to have.
Before starting its worth making sure you know where the .obj, .cr2 and optionally the .jpg files are for the character you have created. These files may be in a directory like: '/Program Files/Curious Labs/Poser 4/Runtime/...' with a substructure something like the following:
|file type||typical file location|
|obj or obz||'/Runtime/Geometry/character/character.obj'|
|cr2 or crz||'/Runtime/libraries/character/character.cr2'|
If the file type extension ends with 'z' like obz or crz then you will need to unzip it before continuing further.
Once you have these files on the machine you are running Blender follow the following procedure:
- Install modified import_obj and cr2bone_import scripts as described here.
- Start Blender (I usually start from command line, by typing blender, so I can see error messages).
- Type x and confirm to remove default cube (any other meshes in blender may confuse the scripts)
- Run the modified import_obj script (will display as Wavefront (obj) mod... in script view)
- Select the .obj file associated with the character that you want to load.
- You will then see a set of buttons. I usually select 'enforce names', 'enable scale', 'import to vertex groups' and set the scale factor to 5.
- Press 'OK'
- Switch to 3D view and select mesh (in object mode) then if you want to add a texture:
- Press F5 to add material
- Press F6 to add texture
- Image panel appears and in that panel press 'load'
- Select the .jpg file that goes with the character.
- click on 'select image'
- Now run the modified cr2bones_import script (will display as cr2bones... )
- select the cr2 file for your character and click on 'import cr2 bones'
- You will then see a set of buttons. I usually select 'enforce names', 'enable scale' and set the scale factor to 5.
- Press 'OK'
- Open up '3D' and 'outliner' windows.
- Select the mesh and press cntl-z, this seems to be necessary so that the mesh follows the armature, I've no idea why it works.
- Select the armature and switch to 'pose' mode. You can now select individual bones and rotate them.
- optional: The weights of the vertexes needs to be set (the script attempts to do this but it needs to be corrected manually).
- optional: The constraints and IK needs to be setup.
- Rotating the bones will now rotate the mesh as required.
I think it would be good if these scripts (or improvements on them) were distributed with Blender. I haven't worked out how to use the Blender patch tracker and I do not have Blender SVN access so I would welcome anyone making this request to Blender.
How it Works
The object file contains the mesh, this is split into groups which contain the geometry of the different bones, I have modified 'import object' script so that it puts these different parts in the same mesh but in different vertex groups. For fuller explanation of the changes I made to this script goto this page.
The cr2 file is then loaded which contains information that allows us to setup the armature and and vertex weights. This script gives the armature bones the same names as the vertex groups and adds a modifier to link the two together. We then need to setup the weights of the individual vertices, in blender there are 'dials' for each type of movement, each of these has its own smoothing zones. There are two types of smoothing zones which might be used individually or together based on sphereMatsRaw and/or angles data.
The big problem is that the cr2 format defines different smoothing zones for different rotations, for example, a side-side rotation uses a different smoothing zone to a front-back bend. We are never going to emulate this completely using a single vertex group per bone so the output of these scripts will probably need to be tweaked by hand.
For fuller explanation of the changes I made to this script goto this page.