Using Ray Dream Studio to Create Models for Poser 3
                                                                   by Bloodsong

Part Two:  Creating a New Figure

NEW FIGURE INFO:

     Basically, any mesh object can become a poseable figure, if you follow these (deceptively easy) steps:

1: DIVIDE THE MESH INTO NAMED PARTS

2: CREATE A HIERARCHY FILE FOR THE PARTS

3: IMPORT  FIGURE AND ADJUST THE JOINTS

  Of course, there's rules on how you have to divide the mesh, and how you have to list the hierarchy, and if you have to mess with that joint parameter stuff... oy!

   My advice, start with something SIMPLE!  Forget those tutorials with human figures, anybody can do this rein.  It's just a strap of leather!  :)

The Amazing Bendy Rein! Fully poseable, for
when the Morph Rein just isn't good enough.

(No special guest stars in this one.)


RAY DREAM:

     Well, create a figure.  And you don't have to use the Mesh Modeller; use all of Ray Dream's creation tools.  (You can convert them to meshes later.)

     Here is the rein, as created in the FreeForm modeller.  It is a small, thin rounded rectangle, with Pipeline Extrusion, and two nodes added to it's Extrusion Path to bend it around in a square U shape.  (Note: The Extrusion Path is going backwards in this model, so the final object will be facing the right way in Poser.  This is a handy thing to do, because trying to rotate a wayward obj figure file in Poser is a pain and a half!)  

     I probably should have made the top end curved in the FreeForm modeller, but I wanted the rein figure to be as simple as possible to start.  I put a slight bend in it in the Mesh Modeller, and even made a morph target for it to bend into a loop, later.  But for now, simple is good.  Because we want the mesh to have several break points along the arms, it's a good idea to add nodes there, now.  (Hint: having Snap to Grid turned on is handy!)  I made all the segments 2 inches long, except the final one, which is 1 inch long.

     After you create your object, you will Jump Into a New Modeller, to bring it into the Mesh Modeller.  Now it's a Mesh.  Wasn't that easy?  (No, MeSH, not Mess!)  

More Mesh Modeller Menu Commands
View:
Hide Selection Just like Object:Invisible in Ray Dream.  Hide each piece as you detach it, so you can see what you are working with, and select the remaining pieces more easily.
Reveal Hidden Vertices This makes everything invisible reappear.
Selection:
Weld You will use this if building models, especially those translated from FreeForm objects.  The ends of these are often detached.  You can select everything and weld, but when working with small obj's, more points than you prefer may be in the range of the weld influence.  In this case, marquee select the detached ends and only the vertices on the edge nearest them.  Note: DO NOT weld things when working on a morph of an object.
Subdivide This breaks the selected parts of the mesh into smaller pieces.  This is important for creating poseable figures that need to bend fluidly.
Note: DO NOT subdivide (or triangulate) things when working on morphs.
Detach Polygons This is to slice the figure into its component limbs.  It isn't completely necessary; you could just select each piece and use Name Polygons.  I prefer to have things detached, because it is easier to see what I'm doing, and easier to quickly re-select any piece.
Polymesh:
Name Polymesh This is for naming each limb of the figure, so the PHI file can find it, and so Poser knows what the limb is called.  If this option is greyed out, then you haven't detached the polygons.  (Alternately, you just detached them, but Ray Dream is being stubborn.  Let go of the piece, then double click on a vertex to reselect it and try again.)

(See also Part One: Tools.)

     First, check to make sure everything translated properly into the Mesh Modeller.  The FreeForm objects tend to have their ends fall off.  Double click the object, then View:Hide Selection.  If you see leftover ends, that means they need to be welded back on.  (See the Menu Command box, above, for details.)
     For better conversions between the FreeForm Modeller, and the MeshForm modeller, see the FF to MFM tutorial.
     

     You need to divide the mesh into the parts that will become limbs.  For the rein, it is rather arbitrary.  I wanted enough pieces for people to be able to bend it reasonably well, but not so many pieces that you had to find, select, and position 50 different little parts.  I chose to have 9 side pieces, plus the top, and the left hand and right hand pieces.

          
     Select each piece with the Marquee tool, Selection:Detach, PolyMesh:Name PolyMesh, type in the name, then View:Hide Selection.  Repeat.  Remember when naming things, these are going to be the names used by the PHI file, and the name of your body's limbs.  Also, keep track of the names and especially the capitalization and junk, you'll need to know this later. (Unless you use PHI Builder.)

     To get the bend in the curved portion of the rein, it will need to be Subdivided a few times to give it groups of nodes that break up the original cylinder.  Marquee select each segment in the top view, then rotate and position it.  

    Note:  if you turn on the sides of the Working Box (that are, by default, off in the Mesh Modeller), moving nodes will cause them to extend shadow projections to the sides.  In this illustration, I am working from the top, but have both side walls turned on.  The grey lines are the projections of the nodes to the walls, and they are rather handy here for lining up the bend points on each side of the curve.

(Note the appearance of actual grid lines in this next illustration!  The Modeller Working Box is set to have grid lines every .25" (or less).  Hit Ctrl-J to set the grid lines and stuff.  They're a lot better than bits of paper towel stuck on your screen!)

Top
Rhand R0 R1 R2 R3 R4 R5 R6 R7 R8 R9
Lhand L0 L1 L2 L3 L4 L5 L6 L7 L8 L9

     Here's the final model of the rein, all sliced up and named.  I went back and revamped the Top end, so there's an extra 'limb' on each side (#0).  After this division, I also had to Subdivide again.
     When creating a figure, you need plenty of spare points in between the ends of your parts.  This is to give the model flexibility when it starts bending around.  Now if you have a robot with straight limbs that aren't going to bend like noodles (or flesh), you can turn off the Bend properties for the limbs, and not worry about extra vertices.  For the rest of us, making fluid reins (and fleshy things), we need lots of vertices!  So I Subdivided the Top once more and the rest twice more.

     Once the model is all sliced and diced, you can hit Done.  Before you export it, shrink it down to about 10% of it's size, send the Hot Point to the center, and send the object to 0,0,0.  Export it as an OBJ, with all the default settings.  You'll want to stick it in a directory under .....\runtime\geometries\ somewhere.  The bendy rein objects go in one called rein.  


PHI BUILDER:

     This is a handy little utility that can be found on the PoserForum Fun Stuff.  The first thing you want to do is press the OBJ button, which will open an obj file and stuff it into a basic Tree mode view for you.  From there, you can grab each limb and toss it onto another limb to make it a child.  You can also open and close branches, to make viewing easier.

        

     Here's the poseable rein object in PHI Builder's tree view.  It automatically loads the whole path thingy at the top for you, and gets the right names of everything right out of the obj file.  Here, I've closed up the right branch, and you can see the left branch opened out.  You can see that the Top piece is the first level object, and it has two child limb chains, much like a hip with two legs.  Also like the hip in a Poser figure, moving the Top part of the rein will move the whole rein. PHI Builder automatically assigns level numbers to everything.  It even checks your work!  It can tell you if there are pieces in the obj file you haven't used, or something you've used that isn't in the obj file, or if you couldn't remember the curve command and typed "bend" in (it tells you it should be "curve"), if you used something unknown in an IK chain.... It's totally handy!
     There are some things it doesn't do, however.  It also doesn't give you any helps or hints about the rotation order, but places the default xyz there.  It doesn't quite understand using multiple obj files, though you can bring in more than one.  It will give you some warnings about your pieces being in multiple obj files, but don't worry about that.  (Anyway, that's an advanced topic we won't get into right now!)

     So, after you throw the tree view items around until they line up under each other properly, go to Text view mode.

     Note that the Poser axes are different from the Ray Dream axes.

     The "rules" for setting the rotation order go like this:

Place the Twist Axis first.  That is, use axis that is the closest to lengthwise of your limb.  
Place the axis that is most likely to bend to 90 degrees last.
Place the leftover one in the middle.

(Or, go from the most minor rotation to the major.)

   Well, as you can see, the bendy reins don't follow these rules.  (Oops!)  The rules I used go like this:

Place the major rotation axis first.
Place the axis most likely to bend to 90 degrees last.
Place the Twist axis in the middle.

USE THIS ORDER:   TWIST/SIDE-SIDE/BEND.  Repeat as your mantra.... twist/side-side/bend, twist/side-side/bend....

(I had trouble with terrible distortion on the proto-bendy rein.  Bushi helped me out by suggesting it might be an incorrect rotation order, and/or not enough vertices for the pieces to bend properly.  So I changed both!  I think the subdivision had the most effect on the flexibility of the rein.  Before I put those in, turning off the Bend Body Parts gave me a line of detatched rods!)

     Curve is an extra parameter that is used in the animal tails.  Originally, the un-curved bendy rein worked better than the curved one, but after making a new, improved bendy rein, I tried the bend and it smoothed things out nicely.  Curve, then, also needs lots of extra in-between vertices.
     The Curve parameter will put an extra dial in your limb controls called Bend, set to1.  You can increase/decrease the amount of limb curvature with this dial.  Be careful using it, sometimes you can get kinked-up results.

     IK Chains are rather simple.  Put your PHI-builder in Tree mode, select the branch you want to make an IKChain from, and hit the menu Tree:Make IK Chain.  Make sure it has the top and bottom parts of your chain selected the way you want, type in a name, and you are DONE!  The last object will be the 'foot,' or the part that will attempt to stay put as the rest moves.  You can see here, that R9 and L9 are the 'feet.'  This makes sense, because once I attach these to the bridle, they should stay put while the rest of the figure moves.

   Finally, hit the Test button, and if it "Looks good!" save the PHI file.

POSER:

     Under the File menu, select Convert Hierarchy file.  Select your PHI file; there is nothing to import.  If it doesn't pop open by itself, go to the Figures:New Figures library.  Scroll down, looking for the name of your new figure.  It won't have a picture yet, just the grey shruggy guy.  Add the new figure to the scene, because one isn't automatically created for you.

     If you can't see your figure, zoom out.  If you're lucky, your figure is monstrously huge and buried halfway in the ground.  If you're unlucky (as I seem to be), your figure will be rather large, but almost infinitely far away.  It also will move around when you try to size it, and become completely lost if you should try to rotate it.
     If you can't see your object, rotate the main camera to about the 3/4 perspective view of the Ray Dream corner camera, and zoom out slowly.  It will help if you turn on the Ground Plane and Ground Shadows.  (Display:Guides:Ground Plane and Display:Ground Shadows.)  Hopefully, you will see a speck or a glimmer, or... SOMEthing to give you a clue as to where your figure is.  Once you spot it, you can move it around with the Trans dials.  Don't be fooled if it looks as if it is right in front of the camera, up above the ground.  Check where the shadow is, and be sure the shadow is sliding towards the little square scrap of ground.
     If you still can't see your figure, even though you zoomed out until the ground is just a tiny speck, try double clicking on the Trans dials and entering numbers to make the figure move (hopefully) into view.  Be careful with these numbers, 10 is awfully high for them.  But try up to ten, or negative ten.  Then zero that and try another Trans axis.
     If you just can't find your figure, go back into Ray Dream and move it.  A lot of figures and props seem to import into Ray Dream exactly in the corner, so try moving your object down there, until the sides of the projections all touch at the working box corner.  As a variant, put it in the corner, and change the Z coordinate to 0.
     Export the obj, and try again.  NOTE!  Try saving your obj to a differently named file (and change the line of the PHI text to the new name).  I saved an obj five times in five different positions and got the exact same results.  Somehow, Poser seems to internalize an obj file once a cr2 is created, and these re-positionings were not taking effect.  (You can try deleting the rsr file in between tries, but even this didn't seem to help.)

     Once you find the darned thing, size it in proportion to the world, place it in it's default position, and then export it again as an obj file.

RAY DREAM:

     Open this new obj, Jump In, and check the naming of the pieces.  If you want to make different parts have different preview colours, name the groups now.  (See Part One: Details for info on materials.)  Don't move anything, just name, jump out, and re-export the obj.

UV MAPPER:

     Open the obj in UV Mapper (see Part One for details).  Find a decent map for it, and save the bitmap file, and also remember to resave the obj.


POSER:

     Convert the Hierarchy file again.  (If you changed the obj name, remember to change it in the PHI file!)  Put your new figure in the scene.  Check it's size and position, make sure everything moves properly.  You can try out the rein's IK; turn it on, first.  Then grab the Top piece and push it towards the #9 pieces.  Ooh, bendy!
     Check the curves.  Curving the Top piece made it deformed, so I set it's Curve to 0.  Also, with the curve/bend turned on, some pieces might twist up as you move them.  Don't fret over this too much, they often straighten themselves out if you rotate them a little more.
     After playing with the new figure, set it into its default position and save it to the Figure Library where you want it.  As with the Props, you can attend to details before you do this, such as setting the preview/material, and even loading the texture map the figure will use, adding morph targets (making one that will turn the Top piece into a narrower loop, as usually held in riders' hands would be handy), and setting limits for the rotation (and morph) dials.  (See Part One: Details for... well, details!)