Fri, Nov 29, 6:41 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

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



Subject: 1 dial to control 2 objects


thewebflea ( ) posted Sat, 11 June 2011 at 7:57 AM · edited Fri, 29 November 2024 at 6:41 AM

Hi there
i have 2 questions
1~ how do u get 1 dial to control 2 things
for example make two cubes turn the same way or 1 clockwise and the other counterclockwise ?

2~ how does 1 make friends here ??


SamTherapy ( ) posted Sat, 11 June 2011 at 8:12 AM

First question - make the two cubes into a Figure, rather than a prop.  I believe you can use ERC (don't ask me how) to do several things at once.

Second question - keep posting.  People here are generally friendly and you'll get to know a lot of the members in no time at all.  I noticed you have a low post count, so if you're not around it's difficult for people to interact with you.

By "keep posting" I mean to say, use a bit of common sense there, too.  You'll get on everyone's nerves if all you post are OT and/or controversial threads.  Almost everyone here likes a bit of interaction on the forum, so ideas, questions, answers and generally interesting contributions are always welcome.

Coppula eam se non posit acceptera jocularum.

My Store

My Gallery


RHaseltine ( ) posted Sat, 11 June 2011 at 8:31 AM

You can use ERC to link two props, or a prop and a figure, but making them into a single figure with a control on the root is probably the simplest option (and if you want to share the result, it will work in DAZ Studio and Poser where ERC between objects needs a script to establish in DS - it can't be done between separately loaded props through the pp2 file).


thewebflea ( ) posted Sat, 11 June 2011 at 8:48 AM

Whats ERC ... and how do i go about it????


markschum ( ) posted Sat, 11 June 2011 at 9:11 AM

ERC is the base of what Poser 8 and up call Dependant Parameters.

It can be some very simple code that you add to the cr2 (figure usually)

This is the code for a new Master dial - normally added to the Body actor.

valueParm Master 1
       {
       name Lower Grips
       initValue 0
       hidden 0
       forceLimits 0
       min 0
       max 1
       trackingScale 0.004
       keys
              {
              static 0
              k 0 0
              }
       interpStyleLocked 0
       }

This is the code for the Ytranslate dial in an existing part .

The lines from valueopdeltaadd  to deltaadddelta are the erc code added to that contol. The new dial has the ytran dial slaved to it. Yoy can have one master to many slaves. The value of the deltaadddelta controls the direction + or - and the rate of change  1:1 1:x etc

translateY yTran
       {
       name Up-Down
       initValue 0
       hidden 0
       forceLimits 1
       min 0
       max 0.465421
       trackingScale 0.001
       keys
              {
              static 0
              k 0 0
              }
       interpStyleLocked 0
       valueOpDeltaAdd
              Figure 1
              BODY:1
              Master 1
       deltaAddDelta 1
       }

 

Here is a good guide http://www.atlantis23.com/erc_download.html

Always work on copies of a cr2 file. If you mess it up you can always delete the copy and start with a new copy.


thewebflea ( ) posted Sat, 11 June 2011 at 9:14 AM

I shouldve added Im using poser 7


lesbentley ( ) posted Sat, 11 June 2011 at 9:15 AM · edited Sat, 11 June 2011 at 9:17 AM

Q: 1~ how do u get 1 dial to control 2 things.

A: Use ERC.

OK, perhaps that answer needs fleshing out a bit. For a quick start on how to use ERC on and between figures you can look at this link.

To here about it from the people who first brought ERC to the attention of the Poser community, look at thse links:

Extended Motion Control

ERC (Enhanced Remote Control)

For a comprehensive coverage from the god of ERC, see this link:

How to Write ERC Code

I'll try and say a bit about your specific example in my next post.


lesbentley ( ) posted Sat, 11 June 2011 at 11:51 AM

file_469748.TXT

 

Quote - for example make two cubes turn the same way or 1 clockwise and the other counterclockwise ?

I'll assume that you have looked at at least one of the links from my last post, and have gathered some of the basics of how ERC works.

Attached above is the text of an example pp2 (prop) file that contains two cube props, it should work in P6 and above. You should be able to use it in Poser, if you loose the ".TXT" part of the file extension, and save it under the 'Props' folder.

Load Example-01 in Poser, it will load two cubes into the scene, named "cube_1" and "cube_2". Select cube_1, and from its parameters palette set yRotate to 45°, you should see cube_2 follow suit and adopt a 45° rotation (you may need to move the cursor into the document window to cause a refresh, before you will see the effect). The rotation of cube_2 happens because of the slaving code in the 'yRotate' channel of cube_2.

Open Example-01.pp2 in a text editor and find the yRotate channel in cube_2. You will see this slaving code in the channel:

            valueOpDeltaAdd
                NO_FIG
                cube_1
                yRotate
            deltaAddDelta 1.000000

Place a minus sign in front of the value in the 'deltaAddDelta' line, so that the slaving code now looks like this:

            valueOpDeltaAdd
                NO_FIG
                cube_1
                yRotate
            deltaAddDelta -1.000000

Resave the file to disk, and load the Example-01 in a new scene. Now yRotating cube_1 should cause cube_2 to rotate in the opposite direction.

Now try xRotating cube_2, this should cause a morph to be expressed in cube_1, making cube_1 twice as tall at 45° xRotation of cube_2. This happens due to the following slaving code in the Morph-01 channel of cube_1:

            valueOpDeltaAdd
                NO_FIG
                cube_2
                xRotate
            deltaAddDelta 0.022222

If I had used a value of '0.011111' in the deltaAddDelta line, the morph would be fully fully expressed when the rotation reached 90°. Now try setting the dial of Morph-02 to a value of one, this should cause cube_2 to zRotate by 45°, and yTran by 0.1 PNU. Look in the zRotate and yTran channels of cube_2 to see the slaving code that causes this.

The above should give you enough info to get started. It relates to un-parented props in P6, and is expected to work the same in later versions. The examples may not work for un-parented props in earlier versions, but should work if one prop is parented to the other.


lesbentley ( ) posted Sat, 11 June 2011 at 2:04 PM

file_469750.TXT

In the previous example, I used channels that already had a function, a rotation channel, or a targetGeom (morph) channel to act as master for one or more other channels. Sometimes it may be desirable to use a channel that has no direct function of its own to drive other channels. 'valueParm' channels fulfil this role, they do nothing in their own right, and their only function is to act as master channels to drive other channels.

The 'Example-02.pp2' attached above, has a valueParm channel named 'Spin' in cube_1. The yRotate channels of both cubes have been slaved to the 'Spin' channel.

Morph-01 and Morph-02 in both cubes have also been slaved to 'Spin'. Limits have been forced on both morph channels (forceLimits 1), and set so that the morphs can't go negative (min 0). The Morph-02 channel in each prop uses a negative 'deltaAddDelta' value. The result of this set up is that when the Spin dial has a positive value, only Morph-01 is expressed, and when it has a negative value, only Morph-02 is expressed.

The valueParm channel looks like this:

        valueParm Spin
            {
            name Spin
            initValue 0
            hidden 0
            forceLimits 0
            min -100000
            max 100000
            trackingScale 0.100
            keys
                {
                static  0
                k  0  0
                }
            interpStyleLocked 0
            }

There is nothing special about it, and the only none default parts of it are its name and the 'trackingScale' (dial sensitivity), which I have changed from the default of 0.004 to 0.100.

The slaving code in the yRotate channels looks like this:

            valueOpDeltaAdd
                NO_FIG
                cube_1
                Spin
            deltaAddDelta 10.000000

The value of 10.0 in the deltaAddDelta line results in 10 degrees of rotation for every increment of '1.0' in the Spin dial. The slaving code in the targetGeom channels looks like:

            valueOpDeltaAdd
                NO_FIG
                cube_1
                Spin
            deltaAddDelta 0.100000

or

            valueOpDeltaAdd
                NO_FIG
                cube_1
                Spin
            deltaAddDelta -0.100000

Using  'deltaAddDelta 0.100000', a value of 10.0 on the 'Spin' dial will result in the morph being fully expressed.


thewebflea ( ) posted Sat, 11 June 2011 at 3:36 PM

lesbentley

very informative

gonna put it to work ads soon as i can

and thanks for the info

will show results as soon as i can

keep an eye out

and thanks to all that responded

P.S.~ add me as a friend ... LOL

 


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.