Creating props
Introduction
In order to create props, you'll need a 3D editing tool that can import and
export Wavefront (OBJ) objects, or a 3d file format converter that can convert
Wavefront objects into a format that your editor does know about. Its important
that the editor (and file format converter if used) maintains the object's 'face
normal' data, which ironically means that my Wavefront editor, GMEdit won’t do because it ignores normals (GMEdit was written
for Poser, and Poser doesn’t use the normals data).
Basic method
This is a bit fiddley, but following these steps should achieve the desired
result (its actually easier than it sounds!)
- Pose a Sim in a suitable position to interact with the prop you want to
create - so for a carried object you'd want the hands in an appropriate
position, for a hat any pose will do (this is to ensure that the created
object attaches correctly to the Sim)
- Use 'Export OBJ' to create a Wavefront object from the Sim. If you create
a file 'c:\path\sim.obj' you'll also get a file 'c:\path\sim.rev' - this is
used during import to get the geometry of the imported object correct (see
step 6)
- Import the Sim object into your 3D editor (without scaling or
repositioning it) and create the prop object you want so that it looks correct
in your editor (i.e. to scale with the Sim, in the correct relative position
etc)
- Save the created object only as a Wavefront OBJ file (i.e. don't include
the Sim's mesh).
- Open the created object file in a text editor, and look for lines starting
"g" (they will be followed by a name). For the first of these change the name
to the name of the body part that you want the prop to attach to (as displayed
in the Joints drop-down list). Any subsequent "g" lines, can either be deleted
or changed to the same name If in steps 4 and 5 the object was saved as 'c:\savepath\object.obj',
copy/rename 'c:\path\sim.rev' from step 2 as 'c:\savepath\object.rev'
- In SimPose-ium, 'Import OBJ' the created object (object.obj). It’s a good
idea to have the selected Sim in the same pose as in step 1. Import OBJ will
attach the created object as a prop in the correct position relative to the
Sim (using the data in object.rev). At this time it is shown in white (no
texture) or with a random texture.
- Create the SKN file for the prop by 'Export Prop SKN'. If this is placed
in the ObjP GameData folder, next time SimPose-ium is run (or if the
File>Reload Files Lists menu item is used) it can be attached like any other
prop, and have a texture assigned.
Example - the floor prop
As an example, I'll run through the process I used to create the floor prop
supplied with V4.0
- As what I want the floor prop to do is establish the ground level, the
default standing pose is appropriate, otherwise pose a Sim to an
appropriate pose
- Export the standing Sim as say 'sim.obj' ('sim.rev' is also created)
Import 'sim.obj' into an editor. The floor was created by adding a cube to the
edit 'scene' and then scaling and positioning it so that it is just under the
Sim's feet
- The floor cube (only) was saved as 'floor.obj' 'floor.obj' was opened in
the Notepad editor. A number of lines "g cube" were found (saying that the
faces of the object belonged to a single group called 'cube'). As the floor
doesn't want to move with any body part, it needs to be attached to the Sim's
ROOT. So, all the "g cube" lines were changed to "g ROOT"
- The 'sim.rev' file created in step 2 was moved into the same folder as 'floor.obj',
and renamed 'floor.rev'.
- In SimPose-ium Import OBJ is used to load 'floor.obj'
- Export Prop SKN was used to create 'floor.skn', which was then copied to
the 'GameData\ObjP' folder
Advanced issues
In the above examples the created objects are assumed to be attached to a
single body part. However, there is no reason why different bits shouldn’t be
attached to different parts. You might make a backpack that bends with the
spine, or a
glass and bottle that can be held one in each hand (though stored as a single
object). However, this does require some degree of understanding about the way
Wavefront objects are constructed.
The "g" commands in the OBJ format control which faces belong to which group,
and so which faces become attached to which body parts. In the glass and bottle
example, If the glass is to be in the right hand, the set of faces that
constitute the glass should be preceded by a "g R_HAND" statement. Similarly the
faces of the bottle should be preceded by "g L_HAND" - the easiest way to do
this is to get the editor to create the glass and bottle as separate groups, and
then edit as in step 5, but replace the names by "L_HAND" or "R_HAND" as
required.