Forum: Poser - OFFICIAL


Subject: Custom Morph - Know it alls - Please help!

ExprssnImg opened this issue on Nov 06, 2005 ยท 46 posts


lesbentley posted Thu, 10 November 2005 at 1:14 PM

Ghostofmacbeth.

Ok, so I obviously did not understand you in my previous post. But I do now, now that I've seen the code. Yes really I do (I think)!

To put it in a nut shell - and at the risk of giving poor old ExprssnImg a nervous brakedown trying to figure out what I am talking about - you are using ERC to slave the translation and scale channels in the eyes to a targetGeom (morph) channel named PBMCC_20.

You are quite correct, normal poses (ones that set joint rotations) won't override the correction values you add in this way. This is an excellent way to impliment the translation and scaling of the eyes, as the amount of translation and scale depends on the value dialed into the morph, eg set the morph dial to '0.500' and the eye only translates half as much as it would if you set the morph dial to '1.000'. This method also has the advantage that it can be implimented in the INJ pz2.

Thanks for the example, and for setting me straight. I really should have thought of this method when advising ExprssnImg, but somehow my mind started off on the wrong track, and it's only your post #32 that has brought me to my senses.

I want to make it clear, because I don't think it is clear in the preceding postes, that the reason this works has nothing to do with it being in an INJ pz2, or a particular folder, or being hard coded, or anything else. It only has to do with the fact that ERC (Enhanced Remote Controle) is being used to slave translate and/or scale channels to another channel. Eg in the code in post #32, the scale channel in the rightEye is slaved to the 'targetGeom PBMCC_20' channel in the head, it is this slaving, and not how the slaving was implimented (by an INJ), that makes it work. Any value added to a slaved channel via a master channel will not appear on the dial of the slave channel, and poses applied to the slave channel will be additive to this value, rather than just reseting the channel.

I think I now owe ExprssnImg a bit more of an explanation of the method.


There are undoubtedly other, and posibly better ways to impliment this, but here is how I would do it.

Apply your INJ pose to the figure (M3). Translate and if necessary scale the eyes to fit the face. Note down the dial values you used.

Make a backup of your INJ pz2, then open the original in a text editor. If they do not already exist add eye actors with a 'channels' section to the file, like so:

actor leftEye<br></br>      {<br></br>   channels<br></br>            {<br></br><br></br>               }<br></br>   }<br></br>actor rightEye<br></br> {<br></br>   channels<br></br>            {<br></br><br></br>               }<br></br>   }

It does not matter what order the channels appear in. Now add the channels that you want to slave to the morph, in this example I will only add the 'translateZ' channel, but the format is the same for any channel:

actor leftEye<br></br>      {<br></br>   channels<br></br>            {<br></br><br></br>            }<br></br>   }

Next add the slaving code to the channels:

          translateZ ztran<br></br>                    {<br></br><br></br>                       }

The first line determins the type of slaving, normallty you will only use 'valueOpDeltaAdd'.

The next line is the figure name, 'Figure 1' is usually used in this line, but I find that 'NO_FIG' works better when you need to aply the INJ to a figure that is not the first one loaded, Poser will update this name when the pz2 is applied.

The third line is the name of the actor that that contains the master channel. Sometimes the colon and actor number is included in this line eg "head:1", I think it works better without this.

The fourth line is the name of the master channel that will controle this channel, there is nothing special about the master, it is only a master by virtue of the fact that it is refferenced in the slaving code.

The last line sets the Control Ratio, the ammount by which a change in the master channel will affect the slave channel. In this line you should use the value you noted down when you positioned the eyes.

The channels you added to the INJ pz2 should now look somthing like this:

actor leftEye<br></br> {<br></br>   channels<br></br>            {<br></br>           translateZ ztran<br></br>                    {<br></br>                   valueOpDeltaAdd<br></br>                             _NO_FIG_<br></br>                            head<br></br>                                PBMCC_01<br></br>                    deltaAddDelta 0.012000<br></br>                      }<br></br>           }<br></br>   }<br></br>actor rightEye<br></br> {<br></br>   channels<br></br>            {<br></br>           translateZ ztran<br></br>                    {<br></br>                   valueOpDeltaAdd<br></br>                             _NO_FIG_<br></br>                            head<br></br>                                PBMCC_01<br></br>                    deltaAddDelta 0.012000<br></br>                      }<br></br>           }<br></br>   }

Thats it, save the file to disk and test it in Poser.