Sat, Nov 30, 4:58 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 29 7:57 am)



Subject: Head Morph for two eyes?


adorana ( ) posted Wed, 05 December 2007 at 4:54 AM · edited Wed, 20 November 2024 at 8:26 AM

I want to make morphs for my AdoranaEyes3 (CR2) hat fit to the Headmorphs of Victoria, p.e.
EyeDepth.
Separately making and appyling the morphs for a single eye ist easy. But the morph of Victoria are for the head and not for her eyes.

Is it possible, to save my Eye-morphs for the head-part of my cr2? It is my goal that the users can use the same Morph-Pose in the library for loading the character on Victoria as for fitting my eyes to the headmorph.

I tried to export a file with "Head + RightEye + LeftEye" and make the morph. But when I apply the morph to my head (no polygons, just bones), Poser crashes down.
Saved separately, the morphs can be used for each eye separately. But these morphs can't be used with the character pose for Victoria.

Manually adjusting is possible, though I want to make it as easy as possible for my users.

Has anyone an idea?


lesbentley ( ) posted Wed, 05 December 2007 at 3:42 PM

Not sure I follow you. You have a hat which is a (conforming ?) figure for Victoria (1, 2, 3, or 4 ?). You have a pose to fit the hat to Vicroria, you also want the same pose file to inject morphs into Victoria's eyes, and you want to be able to control both eye morphs from a dial in Victoria's head. Have I got the question right?


kuroyume0161 ( ) posted Wed, 05 December 2007 at 6:36 PM

Not sure I follow this either.  You can't apply morphs to 'no polygons'.  Morphs ARE polygons (in a roundabout way - they are actually delta translations of the vertices which make up polygons).  The crash seems reasonable considering that.

This seems like a case for morphs on a conforming object which are tied via master-slave relationship (valueOps) to dials on the conforming target  object (see some of Hongyu's items in the Renderosity MP).

So, you actually don't need RightEye/LeftEye body parts on your hat (if they aren't there), but you need morphs on the hat - on a body part with polygons - that correspond to eye morphs on Victoria.  One thing that you'll need to learn quickly is that there are master dials (valueParm - or any dial) and morph dials (targetGeom).  A so-called 'morph' on V's head that affects the eye body parts is almost certainly a master dial controlling dials on each eye body part.  It could also be a morph dial as well, morphing the head body part along with the eyes.  Confused yet? ;)

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


adorana ( ) posted Thu, 06 December 2007 at 12:19 AM

Hat? I have two eyes...

You can reach a different look for Victorias eyes by head morphs. p.e. "EyeDepth" - a morph for the eyes - is selectable on the head, not on her eyes. 

My eyes area CR2 that has only eye polygons - because I don't want to create a new head. The bones of my CR2 include a head part, too of course.

I want the my users can use the same poser for applying the desired character to Victoria as to fit my eyes to her - to avoid the manually adjusting each morph channel.

I was pointed to read something about ERC - seems that this is what kuroyume0161 is talking about? Guess it's a big topic - I'll learn something about it and tell you if is solves my problem :)

Thank you! :)


kuroyume0161 ( ) posted Thu, 06 December 2007 at 1:10 AM · edited Thu, 06 December 2007 at 1:12 AM

Quote - Hat? I have two eyes...

You can reach a different look for Victorias eyes by head morphs. p.e. "EyeDepth" - a morph for the eyes - is selectable on the head, not on her eyes. 

My eyes area CR2 that has only eye polygons - because I don't want to create a new head. The bones of my CR2 include a head part, too of course.

I want the my users can use the same poser for applying the desired character to Victoria as to fit my eyes to her - to avoid the manually adjusting each morph channel.

I was pointed to read something about ERC - seems that this is what kuroyume0161 is talking about? Guess it's a big topic - I'll learn something about it and tell you if is solves my problem :)

Thank you! :)

I distinctly saw 'hat fit' up there. ;)

Yes, you reach for V's eyes via a head morph that also controls (master of) the eye body parts themselves (probably the Z-axis translation dials).  If the morph is moving the eyes, it's doing it via master-slave controls (ERC is what you're looking for).  To be succinct, you cannot morph a body part from another body part (ever).  You can control a morph on another body part via master-slave controls though.  The reason that master-slave controls are hard to detect is that value changes on the slaved dials are NOT shown on the dial itself - it is actually a separate value added to the dial value (if any) behind the scenes.

So, my thought is that you will need to open the Victoria CR2 in a text editor/Poser File Edit and find the head morph/master dial in question.  Using the name after 'targetGeom' (or valueParm) representing the morph/master dial, find the slaved dials on the eye body parts.  When you find the 'valueOpDeltaAdd' lines pointing back to the dial in question, you have what you need to adjust the eyes basically.  The easy thing to remember here is that the slave connects to the master dial that controls it using valueOp... settings.  The master dial has nothing indicating its purpose as a master dial (or to what it masters) though valueParm channels are specifically used for this purpose (any dial can be a master to other dials).

If eye morphs (not just translations) are being applied via the master control, you'll need to create similar morphs for your eyes and slave them similarly.

Are your eyes separate figures or props?  This will make a difference to how things work.  As noted, Hongyu uses dials on, say, V4, to control dials on his conforming figures.  The only way that this works is that V4 must be loaded and the selected figure when loading the conforming figure so that the master-slave relationships are resolved.  So loading the eyes first or when another prop/figure is current will foil the resolving process - this is just something that has to be noted and adhered to by the user.

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


lesbentley ( ) posted Thu, 06 December 2007 at 6:53 PM

If I have understood what you want, here is how to do it. First your eye morphs need to go in the individual eye actors in your cr2.

So you have a cr2 that contains two eyes (let's call it "MyEyes.cr2"), and you want a morph in each eye to be controlled by a dial in Victoria 3's head.

Open "MyEyes.cr2" in a text editor. Find the second instance of "actor leftEye:1" (or whatever it is called), now scroll down to find the eye morph channel (morph channels are of the type "targetGeom"). Let's say the morph channel is named "targetGeom EyeMorph".

Scroll down till you find the line "interpStyleLocked", under this line insert the code in red from the example below.

                targetGeom EyeMorph
                        {
                        name EyeMorph
                        initValue 0
                        hidden 0
                        forceLimits 1
                        min -100000
                        max 100000
                        trackingScale 0.02
                        keys
                                {
                                static  0
                                k  0  0
                                }
                        interpStyleLocked 0
                        
                        indexes 314
                        numbDeltas 314
                        deltas 
                                {

Now you need to repeat the procedure for the left eye. Resave the file. The changes you have made will slave the eye morphs to the "targetGeom PBMCC_20" channel in the head of the figure that is selected (eg Victoria 3) when you load your figure, so long as the head of the selected figure does in fact contain a channel named PBMCC_20 (V3 does).

There is one more step before you can use the dial in V3's head, you need to apply a pose to v3 to unhide the dial, give it a discriptive name, and set its value, you will also need to hide Victoria's default eyes. Here is an example pz2:

{
version
        {
        number 3
        }
actor leftEye:1
        {
        off
        }
actor rightEye:1
        {
        off
        }
actor head
        {
        channels
                {
                groups
                        {
                        groupNode MyEyes
                                {
                                parmNode PBMCC_20
                                }
                        }
                targetGeom PBMCC_20
                        {
                        name MyEyeMorph
                        hidden 0
                        keys
                                {
                                k  0  0
                                }
                        }
                }
        }
figure
        {
        }
}

If you want you could intigrate the code from the above pz2 into your Victoria character pose. Here is how to use the two files, your cr2, and the pz2, the steps should be done in the order listed. Load Victoria 3. Apply the pose. You MUST select the target figure (Victoria 3) before you load your "MyEyes" figure. Conform or parent your "MyEyes" to the target figure.

I need to add a bit more explination and some caveats, but first I need a cup of coffee and a rest. I will get back to you later...


lesbentley ( ) posted Thu, 06 December 2007 at 8:10 PM

...A bit more explination.

Your MyEyes.cr2 should not need a head actor, though it may have one if you want. If the figure is not conforming the ERC should still work, you can 'Set Figure Parent' to be Victoria's head. The cr2 should work in any version of Poser from at least version 4 up.

Your MyEyes figure with the ERC code from my last post should work with any figure that has a channel named PBMCC_20 in its head, not just V3. Though of course with other figures the eyes will not line up without adjustment. The channel you use does not need to be PBMCC_20, any spare channel will do.

If you were to load the "MyEyes.cr2" in Poser, then save it back to a pallet, that would break the ERC slaving, and the slaving would no longer work. But if you saved it with Victoria as a two figure cr2 it should still work with that instance of Victoria.

You can use the same principle as you used to slave the morph to slave other channels in the eyes to channels in the head of the target figure. You could for example slave the rotateY (Side-Side) to a channel in the head of the target figure like so:

                rotateY yrot
                        {
                        name GetStringRes(1028,3)
                        initValue 0
                        hidden 0
                        forceLimits 0
                        min -35
                        max 35
                        trackingScale 1
                        keys
                                {
                                static  0
                                k  0  0
                                }
                        interpStyleLocked 0
                        
                        }

Note the "deltaAddDelta 10.000000" line. In most channel types a value of "1.0" can be used in the 'deltaAddDelta' line, but a rotate channel needs a higher value. Again you would need a pz2 file to unhide the channel in the head, and set it as desired, eg:

{
version
        {
        number 3
        }
actor head
        {
        channels
                {
                groups
                        {
                        groupNode MyEyes
                                {
                                parmNode PBMCC_21
                                }
                        }
                targetGeom PBMCC_21
                        {
                        name Eyes Side-Side
                        hidden 0
                        keys
                                {
                                k  0  0
                                }
                        }
                }
        }
figure
        {
        }
}


adorana ( ) posted Sun, 09 December 2007 at 6:09 AM

Thanks for your detailed answer, and that you took so much time to help me! :)

Some questions to the process. Let's say I have a V3 character that has only the EyeDepth Morph set to 1, and I want to fit my Eyes to this character. I'd like to point out that it doesn't concern about one specific character, but I want to fit my eyes to any character that is available at Rero marketplace ;)

Question about the process of creating

I make my morph in an external program and load it in Poser with selecting each eye separatly with "Object > Load Morph target". These morphs R+L I call "EyeDepth" like it's called in the Dials of V3. I save the new CR2 to the library. 

Now I open my new CR2 in a text editor and edit it in the following way:

targetGeom EyeDepth  
{
name EyeDepth
initValue 0
hidden 0
forceLimits 1
min -100000
max 100000
trackingScale 0.02
keys
{
static  0
k  0  0
}
interpStyleLocked 0
valueOpDeltaAdd
Figure
head
PBMCC_20 (???)
deltaAddDelta 1.000000
numbDeltas 2500
useBinaryMorph 1
blendType 0
}

Should I insert in the green line the name of the V3 morph "EyeDepth"?

Then I get some lines above and change the code from this:
actor head:1
{

}

to this:

actor head:1
{
channels
{
groups
{
groupNode MyEyes
{
parmNode EyeDepth
}
}
targetGeom EyeDepth
{
name EyeDepth
hidden 0
keys
{
k 0 0 
}
}
}

How do I determine the right groupNode? I never named the group "MyEyes" before. How does Poser know which body parts I want to be affected?
Somewhere I must have a mistake. When I try the load the new CR2, Poser shows "No figure" and "No actor". With the original CR2 it works, the modified must have a mistake...

**Question about process of using

**At the moment I created the CR2 and a hide pose for the eyes of V3.
If I understood you right, the process would be to load V3, apply the hide pose, apply the character pose and select V3. With the selected V3, load the Eyes.cr2 and conform it to V3.
Am I right?


adorana ( ) posted Sun, 09 December 2007 at 6:52 AM

I forgot to mention: I applied to my eyes the bone structure of V3 in the Setup room and deleted every bone except hip, abdomen, chest, neck, head and of course the eyes.


lesbentley ( ) posted Sun, 09 December 2007 at 11:27 AM · edited Sun, 09 December 2007 at 11:30 AM

Adorana, I must admit that I did not do my research very well. When I answered your question I had not looked at the EyeDepth channel in V3's head, and how it worked. Rather I was trying to answer the general question of how to slave morphs in the eyes to a dial in the head. With that in mind I just chose an empty channel in V3's head, at random, to act as a master channel, the PBMCC_20 channel.

I think I finally understand what you want. You want your new eyes to work exactly like V3's own eyes in responce to the 'EyeDepth' and other such channels in in V'3's head.

In your original post talk of eye morphs, a "hat", and fit poses, threw me off track a bit. V3 does not use morphs to move or scale the eyes it uses translation and scale channels. This is a much better way than using morphs, and I suggest you do it the same as V3. Here is how.

The basic idea is that you need to copy all the slaving code from all the translate channels and all the scale channels in V3's eyes and paste it into the same channels in your eyes. You also need to remove the figure and actor numbers from the slaving code. Removing these numbers will ensure that when you load your eyes figure the channels will slave to the figure that is selected in the scene (eg V3) at the time you load your figure.

Lets do the 'translateZ ztran' in V3's eyes as an example. Here is the ztran channel from V3's 'actor leftEye:1':

                translateZ ztran
                        {
                        name GetStringRes(1028,14)
                        initValue 0
                        hidden 0
                        forceLimits 0
                        min -100000
                        max 100000
                        trackingScale 0.001
                        keys
                                {
                                static  0
                                k  0  0
                                }
                        interpStyleLocked 0
                        
                        }

The parts marked in red are the slaving code, you need to copy the slaving code, and paste it into the 'ztran' channel in the leftEye of your figure. Then edit the code to remove the figure and actor numbers, the parts in red below: valueOpDeltaAdd Figure head EyeDepth deltaAddDelta 0.001000 valueOpDeltaAdd Figure head EyesBig deltaAddDelta -0.002000

So you end up with this: valueOpDeltaAdd Figure head EyeDepth deltaAddDelta 0.001000 valueOpDeltaAdd Figure head EyesBig deltaAddDelta -0.002000

Now do the same for the other translate channels and the scale channels. The slaving code will be diffrent in each channel but the procedure is the same, copy, paste, edit. Now do the same for the other eye, copying the slaving from V3's rightEye to the rightEye of your figure. Resave the file (you should have a backup of the original in case things go wrong). That's it, you don't need any pose file with respect to the slaving. Just make sure that the target figure (V3) is selected before you load your eyes figure. You can do all this in a text editor, but you will probably find it much easier to use a cr2 editor, such as the free "CR2Builder " as much less scrolling will be necessary in CR2Builder.


lesbentley ( ) posted Sun, 09 December 2007 at 11:52 AM

If you follow the procedure in my last post, some of the questions like those about groupNodes may not be relivant, but I shal try to answer them any way. Just remember that these answers apply mostly to that previous procedure, not the one from my last post.

Yes you could insert 'EyeDepth' in place of 'PBMCC_20'. Your eye depth morphs would then get slaved to the 'EyeDepth' channel in V3's head. If your eye depth morphs in your eyes are in synch with the 'EyeDepth' morph in V3's head, that is to say if when you set the 'EyeDepth' morph to 1.000 the eyes assume the corect position, then all is well, if not you may have to experiment with the value in the 'deltaAddDelta' line of the slaving code.

As the EyeDepth dial is already visible in V3's paramiter pallet, you should not need to apply any pose to that channel (unless you want to change its current 'k' line value). It is not really necessary to set up a groupNode, I just find it helps to keep all the dials relating to the eyes together as one group. You might like to leave the 'groups' section out for simplicity. If you do want to set up a group node the example  you posted is correct.

Quote: "How do I determine the right groupNode?"

The groupNode can be named anything you like, "MyEyes" was just an example. Whilst the 'groupNode' can be any name, the 'parmNode' must be the exact (case sensitive) name from the 'TargetGeom' line.

Quote:  "How does Poser know which body parts I want to be affected?"

The 'groups' section' will only affect the body part that it is placed in. Or if you mean how does the master (EyeDepth) channel know which slave channels to affect, it dosn't. The slave channels know which master channel to "take orders from" by virtue of the slaving code you placed in them.

Quote: "Somewhere I must have a mistake. When I try the load the new CR2, Poser shows "No figure" and "No actor". With the original CR2 it works, the modified must have a mistake..."

Whilst it's not posible to guess where the fault is in your cr2, a common error is miss matched braces. The braces "" come in pairs, each opening brace "{" should have a matching closing brace "}". Leaving a brace out, or adding an extra one is a common cause of Poser files not working. It's sad but true, that it is offten quicker to start again from scratch, rather than trying to hunt down the error. You should always have a backup of your last working version before modifying a poser file, so you can revert to that version if things go wrong.


adorana ( ) posted Sun, 09 December 2007 at 2:51 PM

Yes, it seems to be the best way to do it like it is done in Victoria. At the moment I'm taking a closer look to the CR2 File of her to understand the composition and the connections in the file. 
I noticed that there are files like "InjDeltas.EyeDepth.pz2" that contain the delta data of the morph (?). I would be very pleased if the adjustment of my eyes can be done by just scaling and moving, cause my eyes have a different geometry than Victorias, of course. 

Above of this I try your suggestion of code in your posting and get back with the result as soon as possible. :)


adorana ( ) posted Sun, 09 December 2007 at 3:20 PM

Yippie - it didn't take the time I expected and the first try was successfull!
It works!!! First I load V3,apply the character pose file and the hide file and load the eyes - and they are in fact in the position I like them to! :)

And finally I found out that the eyes following the head if I change something on the morphs, one moment later the eyes are big, too. 

Thanks a lot!! You made me very, very happy!!
dancingaroundthetable


lesbentley ( ) posted Sun, 09 December 2007 at 4:58 PM

Glad to be of help :)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.