Forum: Poser - OFFICIAL


Subject: Smart Prop parenting issue

basicwiz opened this issue on Aug 28, 2009 · 13 posts


basicwiz posted Fri, 28 August 2009 at 2:25 AM

 I'm sure there's a very simple way to do this, but it escapes me, so if one of the wise old heads will help out, I'll appreciate it.

I've got a set of props that I'm trying to get to parent to one another in a chain. OK, no problem in the beginning... I just save each as a smart prop parented to the one ahead of it. And it works fine... they load right up as expected.

The rub:

Some of the parts have morphs built into them for length. When I change one of these morphs, then load the next prop in, it loads to the default position where it was originally set. I need to be able to shift the place where the second prop loads so it is always at the bottom of the first prop. Stated another way, the load position of prop two needs to be affected by the morph of prop one.

How is this done, and where do you set it. Please keep it simple, as I'm a complete idiot when it comes to modeling.

All help appreciated.

DR


Little_Dragon posted Fri, 28 August 2009 at 4:07 AM

You might be able to set it up as a dependent parameter, but I'm not certain how simple that would be.



ockham posted Fri, 28 August 2009 at 7:40 AM

You could use plain old ERC to make the adjustment while the chain
is already in place
, but I don't know if that would work at the time of parenting.  It
would take a lot of fiddling to get the numbers right even if it did work.

Python could certainly find the correct surface and move the prop to it, but again
would take a lot of fiddling to find the right multipliers for each individual morph.

In other words, the "automatic" solutions would require far more
work than adjusting the props once.

The deeper question is: do you really need to automate the process?
Are you going to be placing the set of props often enough to justify the
labor of designing the automatic solution?

My python page
My ShareCG freebies


nickedshield posted Fri, 28 August 2009 at 10:54 AM

Maybe way off base but something to think about:
Set you chain to various lengths and use Ajax's Pose Save script to save the pose; found in the freebie area. Then, I think ockham or svdl made a script that applies a percentage of strength of the pose so use that for intermediate positions.

I must remember to remember what it was I had to remember.


hborre posted Fri, 28 August 2009 at 11:03 AM

BTW, who are you calling old?


basicwiz posted Fri, 28 August 2009 at 12:47 PM

Being 61 myself, anyone who knows more than I do qualities. And that's a heck of a lot of people!

BTW... thanks for the replies.Nothing gets at what I'm trying to do, but the fact that people care enough to try and help is most kind!!!!

DR


bantha posted Fri, 28 August 2009 at 2:39 PM

 Maybe it would be better to make a figure from the props?

Seriously, what you try to do may be possible with Poser 8 with it's Dependent Parameters, but it could be tricky Could you add some details and tell us what exactly do you try to do? I assume it would be easier to find a solution then. 


A ship in port is safe; but that is not what ships are built for.
Sail out to sea and do new things.
-"Amazing Grace" Hopper

Avatar image of me done by Chidori


manoloz posted Fri, 28 August 2009 at 3:02 PM

I'ld rig it and then either use null bones or clear the deform from the bone settings

still hooked to real life and enjoying the siesta!
Visit my blog! :D
Visit my portfolio! :D


lesbentley posted Sun, 30 August 2009 at 2:40 AM

bookmark


lesbentley posted Sun, 30 August 2009 at 4:11 AM

Have a look at the pp2 (prop) attached above, and see if it is the sort of thing you want. There are three props in the pp2. Box_1, the top box is the base parent. ball_1 is smart smart-proped to box_1. box_2 is the end of the chain and is smart-proped to ball_1.

You can apply the morph in any prop and it will maintain contact with its neighbours. I put all the props in one pp2 for convenience of posting, but you can resave them as separate smart props and they should still work.

I had to give the attached file a ".TXT" file extension in order to be able to attach it. Save it as "3Props.pp2" to a props folder. That is to say loose the ".TXT" file extension. If you can't see the ".TXT" to loose it, open Windows Explorer, from the Tools menu, select Folder Options, from the view tab, un-tick (U.S. = un-check) "hide file extensions for known file types".

I've been up all night working on Antonia, and must go to bed now before I fall over. When I awake (if I awake) I will try to explain how it works, but in truth I'm not sure I fully understand myself. It's easier to do than it is to explain. In the mean time, see if it is the sort of thing you are looking for, and if so try to figure it out for yourself.


lesbentley posted Sun, 30 August 2009 at 4:41 AM

Here is what it looks like.

P.S.
Po no dependent parameters, just plain old ERC.


lesbentley posted Sun, 30 August 2009 at 8:38 PM

OK, here is how its done. I'm going to give an example, but not the same as the above image, I'm going to build it bottom up this time, because that is easier to explain. Note that all the measurements I use are in Poser Native units (PNU). You can set PNU from General Preferences. In Poser load a cone primitive. Scale it to 200%, export it as an obj with all export options un-ticked, scale the cone back to 100%. Load the obj back into the cone as a morph target. For this exercise, accept the default name "Morph" for the morph. Do the same procedure as you did for the cone to a ball and box primitive.

yTran the ball to 0.1 so it sits on the tip of the cone. Do Memorize All (Alt+Ctrl+A). Now apply the morph to the cone at a value of 1.0. Again move the ball so it sits on the tip of the cone, and note down how much you moved it by, this is the critical number. In this example you will have moves the ball from 0.1 to 0.2, so you moved it 0.1 PNU. Note that down:

"0.1 for ball".

Do Restore All (Ctrl+A). Move the box till is sits on top of the ball (in our example this should be 0.2 PNU). Do Memorize All (Alt+Ctrl+A). Apply the morph to the ball at a value of 1.0. yTran the box till it again sits on top of the ball, and note down how far you moved it. In our example this should be 0.1 PNU, so we now have:

"0.1 for ball
0.1 for box"

We now have the date we need to write the ERC slaving. Do Restore All (Ctrl+A). Parent the box to the ball and the ball to the cone. Save all 3 props to the props pallet as "TEST" using "Select Subset" to save all 3 to the same pp2.

Open the pp2 in a text editor. Find the ytran channel for the ball and add the following slaving code (in green) to it:

                translateY ytran
                        {
                        name ytran
                        initValue 0.1
                        hidden 0
                        forceLimits 0
                        min -100000
                        max 100000
                        trackingScale 0.001
                        keys
                                {
                                static  0
                                k  0  0.1
                                }
                        interpStyleLocked 0
<span style="color:rgb(0,255,0);">                   valueOpDeltaAdd<br></br>                           _NO_FIG_<br></br><span style="color:rgb(153,204,0);">cone_1</span><br></br>                              Morph<br></br>                     deltaAddDelta</span> <span style="color:rgb(255,0,0);">0.1</span>
                        }

The value (red) in the 'deltaAddDelta' line is the value you noted down for the ball, "0.1" in this example, but it might be something entirely different in another example. Find the ytran channel for the box and enter this slaving code:

<span style="color:rgb(0,255,0);">                      valueOpDeltaAdd<br></br>                           _NO_FIG_<br></br><span style="color:rgb(153,204,0);">ball_1</span><br></br>                              Morph<br></br>                     deltaAddDelta</span> <span style="color:rgb(255,0,0);">0.1</span>

The number in red is the number you noted down for the box. Save the file and test it in poser. If it works correctly, you can resave the props as individual smart props. Now I did cheat a little bit here. In the morphs we made, the props all grew from their bottom edge, with that edge itself not being moved by the morph. If it had been otherwise the coding needed may have been more complicated.


basicwiz posted Mon, 31 August 2009 at 1:02 AM

 Wow! Be careful what you wish for... you just might get it!

THANK YOU, lesbentley! This was exactly what I needed! I knew there was a way to do it, and sure enough! You geys came through! 

Cannot thank you enough!

Basicwiz