Tips for using Ray Dream to work with Poser OBJ files: Props, Morphs, and Figures

                                                                                                         by Bloodsong


Table of Contents Volume One
Teeny Tiny OBJs Mesh Form Modeller Standardized OBJ Handling
Using Materials MFM Tools {Go To Volume Two}
Can't find your Figure? MFM Menus {Back to Tutorials}

Introduction: Creating Props and Figures for Poser, using Ray Dream

     If you thought the Poser Patch to Ray Dream was only good for opening PZ3 files instead of converting the figures to DXF, then hold on to your hats, because you can use Ray Dream to create props, clothing, and hair for your figures, and you can even make your own poseable figures from scratch.  (Or, swipe some from the Ray Dream CD!)  You can use morph targets to modify the props and figures, and make them more useful to you.  Did you ever wish the Poser Horse had more facial controls, like the humans?  Like opening its mouth, or twitching its ears, or SOMEthing!  Well, now it can, and you can make it happen!

     When making things for Poser, you will be mainly dealing with stuff in OBJ format, which means using the Mesh Form Modeller a lot.  But don't despair, if you have a hard time with that thing, and think it would be sooooo much easier to just make FreeForm objects like you always do.  You can!

     You can build your figure or prop from any of the Ray Dream basic components: Primitives, FreeForm objects, Wizard objects, etc.  All you need to do make them into an OBJ is group and export them.  (Actually, I have had a problem doing that with an ice cream cone....  If you run into a mysterious Program Error -4 every time you try to export something, try changing it to a mesh object first.  If it is a group, try exporting each piece and see which one(s) is the culprit, and change that.)  Then open the OBJ file, and you are ready to go.

     A note about FreeForm objects in the Mesh Form Modeller:  When converting the FreeForm to a mesh, often the end pieces are detatched.  Be wary of this.  After Jumping In the New (Mesh Form) Modeller, double click any point on your object.  When it all turns red, hit View:Hide Selection.  If any pieces are still sitting there visible, then they need to be welded back on.
     Normally, you can (after Revealing Hidden Vertices) Marquee select everything in site and hit Weld.  The default settings work best.  If you are working with a small-scale mesh, however, this may result in more vertices being clumped together than you intended.  In this case, use the Marquee tool to select only the endpieces, and the vertices nearest them.

     If you're new at creating Morph Targets and Figures, check out my Tutorials on making morphing and posing reins for the Poser Horse.  If you don't even know what a Morph Target IS (or an OBJ, or a PHI file), then check out the PoserForum, where dozens of helpful people will make you a pro in no time!


Teeny Tiny OBJs:

     OBJ files often import incredibly small -- a two-figure Poser scene may be less than half an inch across!  You can see better if you Open an OBJ file, rather than importing it into a scene.

The tiny red speck on the left is the Poser horse's OBJ file, imported into the scene (after, of course, you get rid of it's included pocket universe).  On the right, same magnification, but this OBJ was Opened, not Imported.

     If you still have trouble zooming in on a tiny OBJ, try changing the camera to a Telephoto lens (use the Camera Controls window), or a Zoom lens, or us the Isometric Zoom factor (up to 900%!)

     Here is another handy tip:  if you don't delete the pocket universe, you can close it, and jump INTO it, and be in the smaller space.  (Opening instead of importing just saves you a step.)


The Mesh Form Modeller:

     Open more than one Perspective Window, so you can have simultaneous views of the side/front/top/whatever.  You can use one window to select things, and one to move them.  Each window remembers its current tool, so one can have the Marquee tool active, and the other the Rotate tool, for example.
      Each window also has its own Saved Selection (see MFM Menu Tips, below), so you can save more than one.

     Use CTRL-J to open the grid properties.  If you want to see the grid, you can set the spacing to a small number.  You can also use Snap to Grid, if that will help you line up your selections.

      Turn on the sides of the MFM working box, even if you can't see them.  This will cause the vertices to project grey lines towards the walls, and results in a rather handy cross-hair for lining things up.

     Here  is a group of vertices being moved in top view, with the sides of the MFM working box turned on.  Now it is easy to visually line up this end of the arc with its counterpart on the other side.

The Selection tool can be used to automatically select independent portions of the mesh when the Angle of Propagation is set high (180 degrees is good).  In this example, the ring is a complete torus, and double-clicking on an edge selects it, without grabbing the overlapping rectangular straps.  Shift-double-clicking on edges will add pieces to your selection.  In this case, cylinders and more torii, making up the bit assembly of a bridle, have also been selected and grouped with the rings.


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 to grab and move the reference grid.
Double-click a vertex to select entire mesh.  
Double-click edge to select group of edges based on propagation angle. Use 180 degrees to select independant geometries within the mesh. (See above for details.)
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!)
Note: you can only Trackball rotate whole groups, not pieces of mesh.
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 a 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.)
Note: hold the space bar to use this tool while any other tool is selected.


Mesh Modeller Menu Items
View
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.)
Selection

Move/Resize/Rotate You can numerically input values for these operations, for better control and duplication of effects.
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.
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.
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.)


Using Materials:

     Poser uses three types of coloration for it's objects and figures (as found in the Render:Surface Materials menu/dialogue).  There is a basic Preview colour, for the object's "box;"  then there are two settings for the Material.  Most often, a texture map is used, but with some simple objects, the Material colours can be used.  (Note: if you are using a texture map, it is often helpful to set the base material colours to white, because these do have an effect on the texture, sort of like a base coat of paint that shows through.)
     Figures have different material settings for different parts, as you can see in the Material list.  Besides the skin, there are settings for fingernails, eyelashes, eyes, teeth, tongue, etc.  To create such Material ability in your figures and props, you will need to use the usemtl statement in the obj.  This has two simple steps.

   First, in the Mesh Form Modeller, select the different parts of your object.  Let's say you have an ice cream cone, with a cone, and ice cream.  Select all the vertices for the ice cream, then Name Polygons, and call them, well, obviously... "ice cream."  Then grab the cone vertices, and Name them, as well.

   Second (after you have exported the OBJ file), open it in a text editor, such as WordPad  (Notepad is too small).Do a search for "g."  This will bring you down to a named group, in a line something like this:

g ice cream

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

g ice cream
usemtl ice_cream

    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 name the group with the group/material name with a unique seperator, then search for it and simply type over it.  For example, I use head!teeth for my group name.  Searching for "!" the cursor is placed where I want the new statement to be.  I hit enter and type "usemtl " to speed things up.  Then hit F3 to search again.
     If you're going to do that, make sure you use a unique marker.  Do NOT use - . f v or g.  Actually, don't use letters or numbers at all.  ! is good.  ;)  IMPORTANT!!!! Poser does NOT like groups that have ! in the name.  If you use this method, be sure to convert to usemtl statements before trying to open the obj in Poser.)

Note:  in the grand scheme of things, this step usually takes place after the Poser-ized objects are exported from Poser, and just before creating a texture map template.  (See Standardized OBJ Handling.)

New Method!

     If you have the latest UVMapper by Steve Cox, you don't need to edit the obj file in a text editor.  Try this: select the piece(s) of mesh that make up the material... let's say you have some teeth you put inside the jaws.  Name the upper set head!teeth and the lower set jaw!teeth (if you're using a movable jaw).  Once in UVMapper, select the head!teeth group and assign it to the teeth material (you can make up that material on the spot), then assign it to the head group.  When you save, it'll come out as part of the head group, with the teeth material applied.


Standardized OBJ Handling:

     This is a combination of my techniqe and JeffH's, detailing how to keep track of your morph objects and your sanity.

     First, open the base OBJ and immediately save your work.  Duplicate the object and rename this new incarnation by typing a new name in the General tab of the Properties window, and hit ENTER.  Make the original object invisible, if it is in your way, then Jump In to the duplicate.  Make sure you Create New Master!
     Manipulate the model into its new morph target.  Be sure to follow all the sundry rules for doing that (See Morph Target Tutorial.)  Save often.  Save more often than you crash!  When done with that morph target, set it to invisible and duplicate the original object again to do any other morphs you have in mind.

     When done with all the morphs, make them invisible, then select the original object.  Export it as an OBJ file, with the standard settings.  Make each subsequent object the only visible one and export it in the same manner. Number the files in sequence thus:

object0.obj     original object
object1.obj     morph target one
object2.obj     morph target two
object3.obj     etc etc, you get the idea.

   Second:  import object #0 into Poser.   Turn off all the option checkboxes, with the exception of Make Polygon Normals Consistent.  Find the object and resize it to something reasonable, and move it to center stage.  (If you have trouble finding your object, see Can't Find Your Figure?)  Hit CTRL-I to bring up the info dialogue, and press the Add Morph Target button.  Name the morph (which is not critical in this step), and Locate the object #1 file.  After you hit OK, you can continue adding Morph Targets by pressing the button again.

     Test your morph targets.  Spin the dials and see if the object smoothly transforms into what you had planned.  If it implodes, explodes, turns into a penguin, or does something else horrific, then you have done something against the rules, somewhere along the line.  (See Morph Target Tutorial for psychiatric help.)
     If all is well, set the morph dials to 0 (double click on them and type it in, so there are no extraneous digits leftover).  Export as an OBJ, name it #A.  Then set the first morph dial to 1, and export that as #B.  Zero the first morph, set the next to 1, export as #C, etc.  Thus:

objectA.obj   original base object, now with correct size and placement for Poser
objectB.obj   morph target one, standardized to Poser
objectC.obj   morph target two, blah blah blah
objectD.obj   etc, etc, you get the point.

   

Third:    This is the point where you want work on the surface material(s) of the object.  If you want to use different materials for your object, open the OBJ file in Ray Dream and make sure the pieces are named the way you want them.  See Using Materials for details on putting usemtl statements in the OBJ file.  If you just want a painted texture map, skip to the next step.
     Open the OBJ in UVMapper (or Mapping Magician, if you prefer).  Create a decent map for your texture, then save the template, and remember to also save your object.  Make sure you have the usemtl statements turned on when saving.
        

Finally:     Import object #A into Poser.  Make sure it is the size and position you want it, then apply its morph targets, B, C, D, etc.  Test the morphs again, and find the reasonable limits of the morph dials.  (Usually somewhere between -5 and 5).  Set the surface materials in the Render:Surface Materials menu/dialogue.  Then set your morphs all to zero (or whatever is the default "pose" for your object), line up the prop for a good snapshot, and add it to the prop library.  

Note:   Use a similar method for creating a figure from scratch.  Start with a regular-sized critter as object #0, then resize and position it in Poser to export again.  It would probably save time if you import the critter obj as a prop, then size and export it, then finish the editing, mesh breaking and naming, etc.  (See Figure Creation Tutorial.  Also, for more expert advice, see the PoserForum.  Yes, PoserForum made me what I am today.  Before I got there, I didn't know you could make your own figures and stuff!)


Can't Find Your Figure?

     When you import your prop OBJ, or convert your figure PHI file for the first time, often the object is massively gigantic and is stuck halfway in the ground.  If so, you're lucky, because it's kinda hard to lose a 900-foot-tall object in the middle of your universe.  Other times, you will import your object.... and see abolutely nothing.  Here are some steps you can take to find it.

     First, make sure that shadows are turned on, and also turn on the Ground Plane.  (Display:Guides:Ground Plane and Display:Ground Shadows.) If you see a big grey shadow, you're in luck.  Zoom out and your object should appear.
     For the less lucky of us....  Rotate the Main camera up and to the left, into the position it would be in if Poser were Ray Dream, and the Ground Plane were the floor of the Working Box.  From here, you may see a glimmer, or a speck of a shadow.  Make sure you have the OBJ selected, and try moving it's X/Y/Z Trans dials in such a manner that the shadow moves towards the Ground Plane.  Watch the shadow, not the object, because a gigunda object 5 miles away below the ground may look like a normal-sized object two feet away above the ground.
     If you don't see the object yet, slowly zoom out.  Look for any specks on your screen, it may be your object.  If the Ground Plane turns into a speck you can no longer see, go back, or you may become lost in the formless limbo of the Poser Universe.  Try slowly moving, one at a time, the X/Y/Z Trans dials of your object, to see if it moves into view.  Don't go much further than 10-15, as these are excessively large numbers on these dials.  Try the positive and negative ends of the spectrum, then return the dial to zero and try the next one.  (If you STILL can't find it, either try importing it again, or skip down to the help for people who found the object, but it just won't resize properly.)

     Once you find it, and get it near the Ground Plane, start turning down the Scale dial.  Be careful!  The "center" of your object may still be five miles out somewhere, and as you size it down, the object will seem to fly off towards it, rather than shrink.  Drag it back into view, and shrink in tiny steps.

     If you can't shrink it properly with any reasonable amout of time or effort, just whip the Scale dial down towards zero, and see which way the object flies.  It is flying towards it's center, and that is where you need to send it, in order for Poser to open it within view.
     Go back into Ray Dream and open the OBJ.   Make SURE  it is set at 0,0,0.  Send it's Hot Point to it's center and check again.  If you're sure that's where it is, you can try sticking the object down in the corner of the working box.  Line up it's projections so the edges touch on the three sides.  Export from there, and try again.  Alternately, put it in the corner, but set it's Z coordinate to 0.  Import it again in Poser and, when you find it, shrink it towards zero and see where the center is now.  Then move it accordingly in Ray Dream.

IMORTANT SANITY-SAVING NOTE:   If you're trying all this (as I did), and the dang fool thing insists on importing way out in the next Time Zone every time, try using a new obj name.  For example, if you imported dumbthing.obj, and you saved it as dumbthing.obj every time, try saving one as stupidthing.obj and importing that.  Especially if you are working with a figure and PHI files!  After Poser goes throug a PHI file once, it tends to think it knows what OBJ the PHI is talking about, and uses that, instead of the modified OBJ file.  (Remember to edit the PHI file to point to the new OBJ's name, too!)  (You can try deleting the rsr that is created when you convert the PHI, too, but sometimes even that doesn't seem to help.)