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


     This tutorial is based upon a project I undertook, to make poseable reins and saddle for the Poser 3 horse.  I did not make the models, they were created by Jackie, who graciously uploaded them to the PoserForum Fun Stuff, and let me work with them to make the morph targets.

     The Tack Pack (including the Amazing Bendy Rein!) is available at PoserWorld (check the misc section!)

     Part One deals with making morph targets, which I used with the reins and saddle to make the pieces move in various ways.  Although the tutorial deals with prop items, all techniques apply to figure morph targets.  Also in this part, I will show you how to assign different materials to pieces of the prop, and take a look at UVMapper.

     Part Two deals with making a Poser figure.  I made a fully poseable rein figure, in case the rein morphs were not specific enough for people's uses.  Although a simple figure, it deals with concepts such as the figure hip, IK chains, and the curve option.  Also in this part, I will show you PHI-Builder.   (click here to skip to Part Two now.)

     See also: my Ray Dream/Poser project Tips page!

Part One: Morph Targets


     Morph Targets begin with an obj file, that lists all the vertices on an object and their locations.  A Morph Target has the same list of vertices, but the locations of some or all of them have changed.  The process of the morph moves the vertices from their starting point to their new location.

     This means, in short, you must start with the original obj, and you must not change anything about it that isn't related to the morph you are doing.  So....





The reins and stirrup morphs in action.

(TrenchCoat Man courtesy Super Spy)
(Palomino texture courtesy Debra)
(Appaloosa texture is hidden on the Poser3 CD! Look for the animation demos.)


     Jackie's saddle and bridle file contained two props.  To get an obj from them, place them in a Poser scene and export as an obj file.  If they bear a specific relation to a Poser figure part, as these do, place them on the default pose of that figure (ie: bridle on the horse's head).


     Open the obj -- don't import the obj into the scene -- and leave all the default obj importation settings alone.  Obj files are notoriously small, which is one of the challenges (read: pains in the butt!) of working with them.  Opening instead of importing is one way to get better magnification of them.  (For more Ray Dream obj tips, see the Tips section.)  Remember DON'T MOVE IT, and DON'T RESIZE IT.

First up:     The rein is attached to the bridle.  Because I planned to have an alternate poseable rein, I wanted to detach it from the rest of the model.  Fortunately, this is not hard, when the mesh you are working with is made up of several pieces.  Jump into the object, which will open the Mesh Form Modeller.

     If you set the Selection Tool's Angle of Propagation to a high number (90 works most times, or just go all the way to 180, as shown here), and double-click on an edge (not a vertex), the selection will meander around and grab all the pieces of that particular part.  In the illustration shown here, the rein rings are made up of torii, and the bit is made up of torii and cylinder pieces.  Double-clicking on the torii's edges will select them.  You can shift-double-click to select multiple parts (but be careful you don't accidentally double click on a vertex anywhere, or you'll select the whole mesh).
     (Note: in this illustration, I had already grouped and named the rein rings and bit pieces, so double-clicking on any edge gives me the whole hardware assembly.)

     Although not in this illustration, if you double-click on an edge of the rein in the original bridle obj, the whole rein will be selected.  Then Selection:Invert, press the Delete key, and ta-da!  You have one independent rein object without all the headache of trying to marquee or individually select all the endpoints that overlap the rein ring when you can't see what the heck point goes on what piece.....!  (Thank goodness I discovered this trick, or I'd still be detaching the rein!)

RAY DREAM (continued):

     Jump out of the detached rein and save your RDS file.  Save often as you work.  (Hint: save more often than you crash!)  I work with multiple duplicates of the object I am morphing, just in case I really screw something up.  So....

     Create a duplicate of the rein mesh object.  You can make the original Invisible (View: Object Invisible) if it's in your way.  Select the duplicate and rename it (type a new name in the General Tab of the Properties window, and hit ENTER).  Jump in, and make sure that you Create a New Master.  Do this with each morph.  Make sure you start with the original "zero" object for each one.

     For the actual morphing, you will use the following tools:

Mesh Modeller Tools
Select Tool Click on a vertex or edge to select.  
Click and drag selected stuff to move it.  Click and drag on empty area to marquee select.
Shift click to add to selection (or deselect selected pieces).  
Ctrl-click and drag on empty air to move the grid behind your object.
Double-click a vertex to select entire mesh.  Double-click edge to select group of edges based on propagation angle. (Use 180 to select a mesh group.)
Marquee Selection Click and drag to marquee select in a rectangular section.
Shift to add to selection.
Alt to subtract from selection.
Track Ball Rotation Click an drag to rotate on any axis or axes.  (I stay away from this hard-to-control sucker!)
Single Axis Rotation Click and drag anywhere in window to rotate selection around its center point.  The center point cannot be moved.  (Note: if two detached groups are selected, they may both rotate around their own center point, rather than one common one.)
Sphere of Attraction This works like the Selection Tool, but nearby points are "attracted," to stretch the mesh in a smooth, rubber-band style way, rather than the all-or-nothing single point stretch.  When working with obj files, you'll need to set its radius to .25 and under, in order not to have the whole mesh within the sphere.  (I wonder when Ray Dream is going to get a Cone of Silence, too.)
Magnification Click to zoom by a factor of 2.  Click and drag to select an area to zoom in.  Also use the lower left zoom factor list (on the Perspective window) to jump out and find your object, then use this to zoom in on it.
Hand Tool Click and drag to move the contents of the Perspective Window around in the view.  Handy (no pun intended) for finding objects lost to view.  (And much better than the scroll bars.)  You can also hold the Space Bar to get the Hand tool while holding any other tool.

Important Mesh Modeller Menu Items
Hide Selection Makes stuff invisible, so you can see only what you want to work on, and select things more easily.
View Hidden Vertices Makes all the invisible stuff reappear.  (You can't decide to leave some things still invisible.)

Move/Resize/Rotate You can numerically input values for these operations, for better control and duplication of effects.
Invert Select what you don't want to have (if it's easier), then invert, and you got it!  Or, select what you want to work on, Invert and Hide Selection, and the extra stuff is outta your face.
Save Selection This is a sanity saver!  After going through 4 different views and carefully tailoring your selection to exactly what you want, hit this, so if you accidentally click off your object and drop it, you don't have to do it all over again!
Bonus!  You can only save one selection, but you can save a different one for each Perspective window you have open.  (To open more,  use the menu Window:New:Perspective.  Not sure, but you may need your prefs set to create a new camera upon a New Perspective window.)
Restore Selection Did you drop it?  Hit this to pick up the selection you saved previously.
Name Polygons This creates a named mesh group, though it does not divide it from the rest of the mesh. It is good for creating separate parts of your model that will have different materials in Poser.
(Note: the 180 propagation trick does not work with Named Polygons.)
Detach Polygons This will detach your selection from the mesh.  You can then name it as a PolyMesh, or Name Polygons.  This will not only work with the 180 degree propagation trick, but you can also double click on a vertex to select the piece. Cutting the piece in this manner does not change the physical appearance of the mesh.


     The rein is made up of a bunch of attached cylinders, and is symmetrical, making it very easy to work with.  This is the side view, and I am rotating the end of the rein.  The grey splat is representative of a tiny piece of paper towel I had moistened and stuck to my monitor screen, to mark where the segment end is supposed to be.  (Well, that's about as sophisticated as you can get with Ray Dream.  If I could just move that rotation point over to the end, we wouldn't have this problem!)  As you can see, rotating your selection can deform even unselected pieces of your object.  Use the Selection Tool to move the part back into place.  (That is, re-line it up with your paper towel!)
     It is imortant to keep track of the segments' length, because I want to straighten and bend the rein without shortening or lengthening the straps.  It would have been a lot easier to just grab each segment end and raise it straight up to one guideline to make the flat rein from the original curved one, but that would have caused the length of the rein to shrink as it straightened.  Keep in mind these properties of dimensional objects as you work with them.

New!  I found you can Ctrl-click and drag the background grid around to reposition it anywhere you want.  First, hit Ctrl-J to set the grid to something small enough to see (.01-.5 inches).  

RAY DREAM (continued):

   The original rein started out curved.  The first thing I did was straighten it out, and use this straight model as my base, with the curve as a morph.  (I got away with this, because I was making a new object from the reins, so I could pick any one to be the base model.)  I then modified the straight rein into a recurve shape, and a left and right pull.

Here they are, all the reins, in 5 snazzy colours!

   Once you're done with your variations, things will go much more quickly.  First, make all the objects invisible, except your base object (ie: "straight" in the reins example).  Select the remaining object and Export:OBJ.  Leave all the default export things set the way they are.  Number your obj's, and do this routine for each variation, ie:

Rein0.obj  (straight)
Rein1.obj  (lax)
Rein2.obj  (recurve)
Rein3.obj  (left)
Rein4.obj  (right)

(Note: I want to thank JeffH for this obj routine, which he described for me, and which works exceptionally well for getting props to come out in the right size and location!  (Also, Jeff doesn't seem to have a web page, so no link for him.))


     Now go into Poser and create an empty scene. (If your default scene contains a default figure, you might want to have an empty scene be your default, so you don't have to delete it every time.)  Import your #0 obj.  Important:  Uncheck all the Poser Importation options, except Make Polygon Normals Consistent.
Now if you thought the obj files were tiny and annoying in Ray Dream, you'll find they're gigunda and/or lost and annoying in Poser.  If you created your obj from a Poser prop, it shouldn't be too hard to locate.  Move it to center stage, and resize it with it's Scale dial.  (If you can't find it at all, see Part Two on finding lost figures.)

     After you scale the object and position it (use your target figure if it is clothing or some such poitionable item), hit CTRL-I for the info window, and press the Add Morph Target button.
     The name will be selected originally, so type in the name of your morph dial.  "Curve" for example, then Locate the #1 obj file (rein1.obj).  You can add more Morph Targets at this time after you hit OK, by pressing the Add button again.  Pile on all your morphs.  (It's okay if you can't remember which number is what morph, you can always change the dial names later, and this isn't the final package, anyway.)

     Now, check your morphs.  Grab a morph dial and spin it around.  Is the object morphing the way you intended?  If it implodes, explodes, or flies around, then you didn't listen to the rules at the beginning of this tutorial.  If it turns into a penguin, I can't help ya, there.  (I mean, if you didn't mean for it to turn into a penguin.)

     If you save your prop now, it will always appear in the wrong place/size.  So (continuing JeffH's technique), set all your morphs to 0 (double click the dials and type it in, to make sure there's no weird leftover decimals), and export the obj as #A.  Then set the first morph to 1 (again, type it in to get it exact), export as #B.  Set the first morph to zero and the next to 1... and so on.  Thus...

reinA.obj   (straight)
reinB.obj   (lax)
reinC.obj   (recurve)
reinD.obj   (left)
reinE.obj   (right)

     This will save the Poser size/position info so the object will turn out happily in future incarnations.



     UVMapper is a utility program available from Steve Cox.  It helps make those spiffy skin templates like those that come with the Poser figures.  But I'll tell ya, don't expect much from Ray Dream figures.

     Start UVMapper and load your #A obj.  A vertex template will appear.  Usually, from Ray Dream objects, it will be a big mess of lines.  (Reason: Ray Dream doesn't do UV maps.)  You can use UV Mapper to fix this, somewhat.

 This is the rein object in one of the planar modes.  It's not very impressive, but it is better than what it started out as.  (Actually, it's so unimpressive, I didn't bother supplying a map for the reins... what kind of detail would you want to paint on 'em, anyway?  Just use a big rectangle!)

     Go to Edit:New UV Map, and try the different variants.  I'm not an expert on UV Mapper, so the details are beyond the scope of this tutorial.  But once you get a decent UV map, save it as a bitmap, and also save your obj file (this will create an obj with UV coordinates.)

(Now Back to Our Regularly Scheduled Tutorial)


     Now go back into Poser and Import your #A obj.  Turn off all the importation stuff (except consistent polygon normals).  The obj should appear where you want it, and how big you want it.  Add the morphs to it again, just like before (though using the letter sequences, not number, obviously).  Remember that the dials you are creating go from bottom to top.  If you think the top thing should be "Curve" instead of "Rein Left" then add the curve object last, etc.

     Also important: move the Origin!  (You can't seem to grab it, so use the origin dials.)  At least center the origin inside the object so it will rotate and scale predictably.  I put the rein origin at the front end, so it would rotate around the bit of the bridle.

     Now you can save your Prop!  Open the Prop Library and hit the + button, while you have your prop selected.

     Before you save your prop, though, you might want to address its details.


     These include things like setting the Origin, the surface material colours, and other sundry effects, to make your prop even more stupendous and helpful.


     The rein is just a strap of leather, but the bridle has straps, buckles, and the bit pieces.  The saddle has the leather saddle parts, and the metal stirrups.  You can tell Poser to assign different materials/colours to these pieces in it's previews, without having to resort to using the texture map.  It is very simple!


     In the Mesh Modeller, select each different item, and Selection:Name Polygons.  For example, in the bridle, I made the rein rings and bit pieces one group (hardware), the side buckles another group (brass), and the rest a final group (leather).  There is no need to do anything else but name the polygons; they don't need to be detached (or even attached if they are separate).
     Export the obj, as usual.
     (Note: do this on object #A, before going through UVMapper.)


     Load the obj file.  For all it's fancy 3d computer graphic-ness, it's just a text file with tedious lists of vertex coordinates.  Do a search for "g."  This will bring you down to a named group, in a line something like this:

g hardware

    Go to the end of the line, hit return and type in "usemtl hardware"  Thus:

g hardware
usemtl hardware

    Find the other groups and do the same, giving each usemtl statement a different name.  (It can be the same as, or different from the group name.  The usemtl name is what will appear in the Poser surface material dialogue.)

   Save.  That's it!

   Alternately, you can now use UVMapper to assign materials and/or groups (and even special UVMapper regions).  Select each group in UVMapper, and Edit:Assign:Material.  Type in the name. Save the model.  Even easier!


     Load your prop and go to Render:Surface Materials.  Before you save the prop is a good time to give it a meaningful Preview colour (did yours default to an ugly green?), and assign colours to the different materials.  (Just to brag, I set the leather of the bridle, reins (both sets), and saddle to the same shades of brown!)

     The last thing you should do before you save your prop is position it nicely in the camera view.  Poser will use this view for the thumbnail of the prop in the Prop Library.



     All of Poser's limb control dials have limits, which are used with the Use Limits option.  These are for constraining limb motion to the realms of possibility and such.  When you create an object or figure, its limits are usually set to the completely unhelpful settings of -10000000.00 and 10000000.00.  Take the Poser 3 figures eyelids for example.  The eyelids can be open (0) or fully closed (1).  If you set it to anything greater than 1, the eyelid starts to sag down to the floor in a wonderfully grotesque manner.  :)  A result most people want to avoid!

     Setting your Morph Target limits does not take a lot of time.  First, zero your object, then double click on the first Morph.  0 is no morph, 1 is the extent of the morph as you made it.  Try a positive range of 5.  If no undue distortion occurs, try up to 10 or 15.  If it looks awful, try 2.5.  Also try negative morphs.  -1, -2.5, -5.... however far it can go and still do what you intended, without becoming a distorted mess.
     Once you try these limits, double click the dial one last time, enter 0, hit TAB, enter the lower limit, hit TAB, enter the upper limit, hit ENTER, and you're done.  Go on to the next dial.  (Note: you might want to set the dial "speed" to .01 (the last slot).  Poser doesn't appear to save this setting, though. ::sigh::)

Removing Pesky Morphs:

     Every once in a while, you will create an improved morph, or just find you don't need a morph you have saved to an object.  Now, how do you take a morph off?


      Yes, this amazingly handy, sophisticated 3d graphics program comes to the rescue again! ;D  You can open the prop PP2 file that Poser creates(it's in one of the prop subdirectories, where you saved it).  Search for geom, and you will come to a section that begins something like this...

		targetGeom Rein Left
			name Rein Left
			initValue 0
			hidden 0
			forceLimits 4
			min -100000
			max 100000
			trackingScale 0.02
				static  0
				k  0  0
			interpStyleLocked 0
			indexes 293
			numbDeltas 293
				d 0 0.00730761 -1.60933e-006 0.0112141
...... and a huge list of d coordinates
d 292 0.00173636 -2.14577e-006 0.00030756 } }

     Read the name of the "target Geometry;" this should be the name you gave the Morph Dial in Poser.  If it is the one you want to remove, then select everything from the { before "targetGeom" to the last two }'s under the list of d coordinates.  Press delete.  Do this for each morph you want to remove, then save.  (Er, you might want to keep a backup of your PP2 file, in case you accidentally delete a { you're not supposed to....!)

     If you want to remove morph targets from an actual figure (a CR2 file), you can use the Morph Manager utility, which can be found on (yes, you guessed it!) the PoserForum.

   Whew!  If you're not tired, you can go on to Part Two: Creating a New Figure.