Forum: Poser Technical


Subject: Saving Morphs

3Dpixi opened this issue on Jun 18, 2010 ยท 9 posts


lesbentley posted Sun, 20 June 2010 at 8:36 AM

Basically there are two types of INJ file. One type is just a MOR pose that loads third party delta injections via 'readScript', and sets the dial values for them. The second type is the true delta injection that carries the deltas within the pz2. Conventional wisdom is that this last type can only be distributed if you have copyright on the morphs used to create it. It it this latter type that the rest of my post covers. svdl has a python script "SpawnCharacterP6 update" that can create INJ/Rem files. It is simple to use, and I highly recommend it, though I don't know if it will work on a Mac. Failing that, you can always do it the old fashioned way and roll your own. A delta injection is essentially just a 'targetGeom' (morph) channel(s) packaged as a pz2. So you can construct a template pz2, then just Copy the target geom channel(s) from a cr2 and Paste it into the template. As an example you could use the following template to inject a morph into the head: {

version
        {
        number 4.01
        }

actor BODY
        {
        channels
                {
<span style="color:rgb(0,255,0);"># valueParm (FBM) channels go below this line.</span>
                }
        }
actor head
        {
        channels
                {
<span style="color:rgb(0,255,0);"># targetGeom (morph) channel(s) go below this line.</span>
                }
        }
}  

You would then paste the targetgeom channel in the place indicated, like so: {

version
        {
        number 4.01
        }

actor BODY
        {
        channels
                {
# valueParm (FBM) channels go below this line.
                }
        }
actor head
        {
        channels
                {
# targetGeom (morph) channel(s) go below this line.
<span style="color:rgb(0,255,0);">           targetGeom PBMCC_02<br></br>                       {<br></br>                 name PointNose<br></br>                    initValue 0<br></br>                       hidden 0<br></br>                  forceLimits 1<br></br>                     min -100000<br></br>                       max 100000<br></br>                        trackingScale 0.02<br></br>                        keys<br></br>                              {<br></br>                         static  0<br></br>                         k  0  0<br></br>                           }<br></br>                 interpStyleLocked 0<br></br>                       indexes 1<br></br>                 numbDeltas 15078<br></br>                  deltas <br></br>                           { <br></br>                                d 9541 0 -1.966953e-006 0.01170973 <br></br>                               } <br></br>                        blendType 0<br></br>                       }</span>
                }
        }
}  

Finally if the morph is to be part of an FBM you would add the valueParm data to the BODY actor: {

version
        {
        number 4.01
        }

actor BODY
        {
        channels
                {
# valueParm (FBM) channels go below this line.
<span style="color:rgb(0,255,0);">           valueParm PBMCC_02<br></br>                        {<br></br>                 name PointNose<br></br>                    initValue 1<br></br>                       hidden 0<br></br>                  forceLimits 1<br></br>                     min 0<br></br>                     max 1<br></br>                     trackingScale 0.004<br></br>                       keys<br></br>                              {<br></br>                         static  0<br></br>                         k  0  0<br></br>                           }<br></br>                 interpStyleLocked 0<br></br>                       }</span>
                }
etc...  

An important point to remember is that a delta injection can only inject into a channel that already exists in the figure, so in the above example the target cr2 must contain a channel named "targetGeom PBMCC_02". Whilst it is possible to do the above in a text editor, because of the large amount of scrolling usually necessary, it is easier to do it in a cr2 editor such as the free "CR2Builder".