Touchwood opened this issue on May 21, 2008 · 6 posts
Touchwood posted Wed, 21 May 2008 at 5:28 AM
Does anyone have or know of any tuts about geometry switching? Been trying all morning to find one but to no avail. Cant find anything in the manual either.
vince3 posted Wed, 21 May 2008 at 5:59 AM
i think svdl knows, so you could ask him as he is asking in a thread he started just below yours whether to use that method for a package he is releasing.
thread is called "How to package"
icprncss2 posted Wed, 21 May 2008 at 6:56 AM
You might want to check out BL Render's Secrets of Figure Creation or PhilC's modelling tutorial. Both of them go into geometry switching.
PhilC posted Wed, 21 May 2008 at 7:26 AM
..... or simply open Poser 7RuntimeLibrariesCharacterPoser 1-5Poser 2 LoCasual Man P2 Lo.cr2 in CR2Editor, select the hand and look for:-
alternateGeom rHand_2
{
name GetStringRes(1037,2)
objFile 2002 :Runtime:Geometries:maleHandsLo:rHandShape_2.obj
}
and in the hand channels:-
geomChan handGeom
{
uniqueInterp
name hand type
initValue 0
hidden 0
forceLimits 4
min 0
max 19
trackingScale 0.045
keys
{
static 0
k 0 0
}
interpStyleLocked 1
}
Use these lines as patterns for your figure.
lesbentley posted Wed, 21 May 2008 at 8:22 AM
Basically you have a series of 'alternateGeom' blocks defining the paths to the alternate geometry files, then a 'geomChan' channel to do the actual switching.
The 'usemtl' defined in the obj files need to have matching 'material' statements in the 'figure' section of the cr2.
Below is an example of geometry switching for the head. Attached above is the text of a working example. Note that the attached example uses a Poser box prop as the default head, loaded via "objFileGeom", so as not to need to distribute an obj file with this example. Normally the default geometry would be loaded by a "figureResFile" statement.
actor head:1
{
<span style="color:rgb(153,153,153);"> name head<br></br> on<br></br> bend 1<br></br> dynamicsLock 1<br></br> hidden 0<br></br> addToMenu 1<br></br> castsShadow 1<br></br> includeInDepthCue 1<br></br> useZBuffer 1<br></br> parent BODY:1<br></br> creaseAngle 80</span>
alternateGeom head_2
{
objFile 1002 :Runtime:Geometries:props:ball.obj
}
alternateGeom head_3
{
objFile 1003 :Runtime:Geometries:props:cone.obj
}
alternateGeom head_4
{
objFile 1004 :Runtime:Geometries:props:cylTex.obj
}
channels
{
geomChan HeadSwap
{
uniqueInterp
name New Head
initValue 0
hidden 0
forceLimits 4
min 0
max 4
trackingScale 0.045
keys
{
static 0
k 0 0
}
interpStyleLocked 1
}
The 'max' value in the 'geomChan' needs to be the number of geometries used including the default geometry. The syntax I have used differs a little from that used in the skeleton figure, in that it simplifies by leaving the 'name' lines out, but it works just as well.
Touchwood posted Thu, 22 May 2008 at 1:24 AM
Thanks everybody. Off to play a while :-)