Forum: Poser - OFFICIAL


Subject: A Compendium of PZ2 Techniques.

lesbentley opened this issue on Mar 31, 2008 ยท 137 posts


lesbentley posted Tue, 08 April 2008 at 12:02 PM

** Delta Injection (Part 3).**

Making the template & inserting the targetGeom.

Here is a basic template that can be used as a starting point for any pose file, except that the version number may have to be changed depending on what features the pose needs to support. The function of the version number is to generate an error message if the file version is later than the version of Poser trying to open it. I'm not aware that the version number has any other effect, but I may be wrong. The 'figure' block may not be needed, but it does no harm. { //[comment can go here] version { number 3 }

figure
        {

        }
}

You may like to save the above to disk so you don't have to type it out every time you make a pose file. Next we need to add a block of code for each actor that is going to have a morph injected (in this case just one). Each 'actor' block must also contain a 'channels' block. Below, the Green code is the basic template, the actor block is in White, and the channels block is in Red.

<span style="color:rgb(0,255,0);">{<br></br>//<br></br>version<br></br>  {<br></br> number 3<br></br>  }</span>

<span style="color:rgb(255,255,255);">actor head<br></br>       {</span>
        
        <span style="color:rgb(255,255,255);">}</span>

<span style="color:rgb(0,255,0);">figure<br></br>       {<br></br><br></br>   }<br></br>}</span>

NOTES:
You might like to make a template that contains all the actor blocks for your figure, with a channels block in each. This is handy if you are going to make pose files that affect a lot of actors. You can delete the unused actors later.


**Next we will put the targetGeom channel in the template.**In a new text editor window, open the "Z.cr2" created as per my last post. Use the editors Search (Find) function to find the string "targetGeom Point Nose". Copy everything, from this selected line down to the closing brace of the channel, just above where the next channel starts, and paste it into the place indicated in the template above. Here is what the code you are pasting should look like (there may be a few more or less lines of code depending on your Poser version):

                targetGeom <span style="color:rgb(255,0,0);">Point Nose</span>
                        {
                        name Point Nose
                        initValue 0
                        hidden 0
                        forceLimits 1
                        min -100000
                        max 100000
                        trackingScale 0.02
                        keys
                                {
                                static  0
                                k  0  0
                                }
                        interpStyleLocked 0
                        indexes 1
                        numbDeltas 3470
                        deltas 
                                { 
                                d 1514 -5.277533e-006 -0.001445413 0.03142137 
                                } 
                        blendType 0
                        }

We need to make one edit to the code we pasted. You will remember that we can only inject into a channel that exists in the cr2. The original Posette cr2 contains no channel named "Point Nose", so we need to edit the internal name (in red above) to something that does exist in Posette, for example "RoundFace". Change the first line of the code we pasted to read: "targetGeom RoundFace"

We can leave the 'name' line as "Point Nose", this is the name that will be displayed above the dial in the paramiters pallet.

The complete text of the finished DIP is in the attachment at the top of this post.

Save the file with a descriptive name (eg "P4 PointNose.pz2") to a pose folder. In Poser, Test on Posette to make sure it works.


NOTES:
If you want you can set of 'min, and 'max' limits for the channel (I usually don't): forceLimits 1 min 0 max 1

Personally I usually paste the whole channel then just save the pz2 and use that. Previous pose files, or user actions may have changed some of the values. I like to be sure all the paramiters are set the way I want them. DAZ use a more minimilist aproach, a DAZ injection the channel would be cut down to this: targetGeom RoundFace { name Point Nose interpStyleLocked 0 indexes 1 numbDeltas 3470 deltas { d 1514 -5.277533e-006 -0.001445413 0.03142137 } }

DAZ use a seperate Unhide pose to make sure the channel is not hidden. Im not sure why DAZ use an Unhide pose, as soon as Poser "sees" deltas in a a hidden channel (eg deltas are injected into the channel), it will unhide the channel, changing its flag to 'hidden 0'. So the DAZ Unhide poses look like a waste of space to me! Usually both the pz2s to inject the deltas and the pz2s to unhide the channels are "called" from another pz2 via 'readScript' (I will try to say something about readScript later). The absolute minimum you could use to inject deltas would be this:

                targetGeom SomeName
                        {
                        deltas 
                                {
                                [delta lines here]
                                }
                        }

Next we will look at Delta injection in conjunction with FBMs. To be continued...