|
PublicWiki / LoadingByGroup |
SearchWiki PublicWiki.RecentChanges Edit Page Page Revisions |
figureResFile line which is declared outside of block context?. This line directs Poser to open a wavefront Object file and read the data therein into memory, but not yet use it.
Then, during the actor predeclaration phase, each actor, prop, or whatnot can use the geomHandlerGeom directive to load its geometry from a polygon group? within the current file.
The syntax, in simplified form, looks like this:
figureResFile <path>
<objectType> <objectID>
{
storageOffset <float> <float> <float>
geomHandlerGeom <int> <group>
}
For some reason, the <int> after the geomHandlerGeom line is traditionally 13, though changing it to any positive, non-zero value seems to work fine (much like the strangeness of the forceLimits? directive defaulting to 0 or 4).
The storageOffset? line can be left out completely without harm according to all known testing to date. If it's included, the first and last float will always be 0, while the middle one will be 0 for this type of geometry loading.
For instance, to load up an object for the body part lSpleen, when lSpleen is a part of a grouped Wavefront OBJect? file called innards.obj in your Geometries:Guts folder using the group name 'Left_Spleen', you might do it like this:
figureResFile :Runtime:Geometries:Guts:innards.obj
actor lSpleen
{
storageOffset 0 0 0
geomHandlerGeom 13 Left_Spleen
}
In general you will see the actor ID having the same name as the group (with a possible figure ID? appended), but this is not necessary. It's commonly done this way due to the internal functionality of the Setup Room?, the PHI Conversion? system, and ease of using the Heirarchy Editor? to create figures without regrouping.
Note that at the point you open a figureResFile, it remains open and you can declare any number of geometry loads from it. As soon as you declare it again, it opens the file you have already opened. If you've opened a new file, geometry will be loaded from that new file from that point on.
This would seem an easy way to load groups from multiple figures. However, if you do this, while it will load up your figure perfectly fine, Poser will not save the file corrrectly, leaving out all figureResFile lines after the first within a single figure. This mishap occurs both when the file is saved as a Poser scene or when it is added again to the library. It's a great idea, but it doesn't work right.
From this approach, a developer will make a better functioning and properly savable figure by including all the body parts in one single Wavefront OBJect? file. If he or she chooses to create alternate figures that have only part of the object load, simply do not load geometry for those parts by removing either the part altogether or by removing the geomHandlerGeom line form the actor predeclaration block. For instance, if one makes a pair or shoes that load up lFoot, lToe, rFoot, and rToe, the developer would be wiser to place all four groups in a single OBJect? than in two seperate objects for the feet, as this approach allows one to load up a pair of shoes or, by leaving the opposite foot parts out of the CR2?, a single shoe, all with only one OBJect? file.