Forum: Poser - OFFICIAL


Subject: Modeling and managing "bent" morphs?

MrGorf opened this issue on Sep 09, 2006 · 19 posts


MrGorf posted Sat, 09 September 2006 at 12:02 AM

Hello, I'm looking for some input on this issue: Imagine I'm trying to model, say, a KneeBendFix morph for a certain Poser model that doesn't bend so well in the knees... It's pretty hard to visualize without the knees actually being bent into the offending shape, so I bend the knee to, say, 130 degrees or so, and export the bent thigh and shin (and hip just to be safe!). Then I open the OBJ in my modeling program (I'm using Hexagon) and flatten  out the gam. So far so good!

Well, now, getting it back into Poser is the hard part! For one thing, the leg is all bent-like. For another thing, bending the parts pulls on other polygons as well. Basically, I'm stumped on how to make this usable. I tried an idea I had on a cylinder, but it didn't work.

How does DAZ and such model their Joint Controlled Morphs? Judicious guess-and-test? Zillions of magnets? Writing down coordinate changes for hundreds of polygons? Or is there a saner way to do this? (Or does this require higher-end software?)

I feel like if I just knew this trick, it would really open up a lot of exciting possibilities. Any suggestions? Thanks!


amacord posted Sat, 09 September 2006 at 1:16 AM

hi, mr gorf!

you are not the first one to spend your time on this problem, and you wont be the last. wellcome to the club! as far as i know there is no "saner way", for each morph you create by moving vertices one by one on a "guess and test" base will work for a single pose only.

it requires a "higher end" poser! unfortunately the holders of poser don´t seem to care.....


amacord posted Sat, 09 September 2006 at 1:26 AM

er, i forgot ... playing carefully with the joint parameters can sometimes bring a little bit of improvement (for single frame renders only!)


lesbentley posted Sat, 09 September 2006 at 5:47 AM

Quote - ...so I bend the knee to, say, 130 degrees or so, and export the bent thigh and shin (and hip just to be safe!). Then I open the OBJ in my modeling program...

If you export it bent, then that bend is is part of the morph. You just can't export it bent, unless you can come up with some way to straighten it out before you use it in Poser. Personally, I would try to do it in Poser with the knee bent, using magnets. I'm no expert on moddling, perhaps there are some moddling applications where you can rig it to bend the same as it does in Poser, then you could export it straight, bend it in your moddling app, morph it, then straighten it out before export.


ockham posted Sat, 09 September 2006 at 8:58 AM

Hmm........  I can see a rather easy Python solution.  You'd start with

what you already did: export the bent 'stiff', do the morph in the

external app, then import the MT to the figure. 

The script would start here.  You'd have to tell it what angle you used

on the joint.  The script would then (1) determine which vertices are

actually affected by the MT. (2) Examine those verts on the real figure

in the standard position, and in the angle you specified. 

(3) Get a difference in actual position for each vert. (4) Subtract

these differences from the MT values and rewrite the CR2.

Les, does that sound like it would work?

My python page
My ShareCG freebies


ockham posted Sat, 09 September 2006 at 9:14 AM

Second thought on step 4: wouldn't need to rewrite the file, just

change the MT values in place to the 'debent' ones.

My python page
My ShareCG freebies


kuroyume0161 posted Sat, 09 September 2006 at 9:47 AM

Quote - I'm no expert on moddling, perhaps there are some moddling applications where you can rig it to bend the same as it does in Poser, then you could export it straight, bend it in your moddling app, morph it, then straighten it out before export.

There are no applications besides Poser, DAZ|Studio, and Greenbriar Studio's Toolbox (I don't know the extent of support it has for modeling, morphing, and exporting geometry) that support Poser-style bend deformations (as far as I've ever encountered).  Poser's bend deformations are pretty much unique in the universe. :)

That said, there is one modeling app that will soon support them - indirectly: Cinema 4D.  My interPoser Pro plugin uses actual Poser bend deformations - and Cinema 4D is a modeling application (and more of course).  The expensive route, but a use of the plugin that I had not considered.

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


ockham posted Sat, 09 September 2006 at 10:13 AM

Try this.

http://ockhamsbungalow.com/Python/UnbendMorph.zip

I don't have any 'live' examples of such morphs, so I don't know

if it behaves just right.  It does produce a small change in the

MT, so I know at least that it isn't completely wild!

If the result seems to be backward, try changing the

first minus sign in lines 129-131 to a plus.

In other words, change

            Xnew = Xm - (X1-X0)
            Ynew = Ym - (Y1-Y0)
            Znew = Zm - (Z1-Z0)

to

            Xnew = Xm + (X1-X0)
            Ynew = Ym + (Y1-Y0)
            Znew = Zm + (Z1-Z0)

My python page
My ShareCG freebies


ianr posted Sat, 09 September 2006 at 10:21 PM

Hi - Morph Master Pro 2.5 at Daz seems to fill exactly this need, though the vertex manipulation isn't the easiest.

It always seemed to me that this tool would allow somebody to come up with a great set of joint fix morphs. Never did understand the apparent lack of interest in it.

ianr


MrGorf posted Tue, 12 September 2006 at 8:34 PM

Hey ianr, that is a good tip about Morph Master Pro. Unfortunately, I have a Mac so I can't use it! :(

And ockham, thank you so much for writing that script. I am studying it to see how it works. Again, due to the Mac version of Poser balking at Tk stuff, I would need to snip-snip a bit of that script to see it in action.

By the way, this is not a good time to tell me I need a new computer! ;-)

One thing about magnets: they are good at pulling on things, not so good for flattening things. Well, maybe they are, but I'm not quite that adept at magnets. Of course, if Poser had its own vertex modelling, we'd be golden! Ha ha. A "higher end Poser" indeed, amacord...

Yes, I am amazed that there isn't more interest in this... Of course, I was really hinting at MIKI'S KNEES... But there are many, many figures who could use a little help, especially in the elbows.

This is slightly off topic... A curious issue that I'm not sure anyone has addressed: joint controlled morphs leave a bit to be desired. The problem with the ones I've seen is that while they look good when the joint is fully bent, they should not kick in starting at zero bend. That is, DAZ characters' knees start flattening out proportionately right away, which makes, say, a 90 degree knee bend look really weird. I'm thinking of Vicky's armpit area as a problematic example.

That said, I think this whole bendy business has a long way to go. I think this is one of the major things standing in the way of Poser figures looking more natural.

Thanks to everyone for your input. I'll have to play around with that script some more, ockham.


ockham posted Tue, 12 September 2006 at 9:12 PM

Oh, yes, good old Mac.

Here's a "snipped" version with all the Tkinter stuff out. 

You'll have to edit one line to fill in the MT name. 

The first real line in the script is

MTname = "xxxbendxxx"

Just fill in the actual name in the quotes, like

MTname = "KneeBendRight"

and then activate the script, with the proper

figure and body part selected. 

http://ockhamsbungalow.com/Python/UnbendMac.zip

My python page
My ShareCG freebies


elenorcoli posted Tue, 12 September 2006 at 11:55 PM

i haven't messed with joint controlled morphs but read up on them somewhat...i think you can set the morph to kick in at a certain angle and work from there.  it seems they had mentioned that in poser technical.

 

 


MrGorf posted Wed, 13 September 2006 at 12:10 AM

Thanks again, ockham! I'll have to look this over carefully... Which reminds me, does anybody know why Tkinter isn't supported in Mac PoserPython? Strange, since Tk stuff works with the Python that ships with MacOS...

There was something in the Poser Python scripts about Callback examples, where somebody's muscles flexed. That would be worth looking into. Imagine the possibilities of creating, say, three morphs, having none of them at less than 70 degree bends, then blending through three in succession... Sounds like it could be great.


ockham posted Wed, 13 September 2006 at 12:29 AM

The callback is a neat feature, and would make a lot of things

easier.  Unfortunately it just doesn't work cleanly.  It triggers

unexpectedly and seems to get caught in endless loops.  I gave

up on using it. 

(Apparently the callback has been fixed in the latest release of

P6 ..  I should probably try it again.)

Blending morphs would be quite easy with an ordinary

(non-callback) script, though.

My python page
My ShareCG freebies


VK posted Wed, 13 September 2006 at 4:14 AM

Sometimes the following method works: 1. Be sure all dials of your figure are zero. 2. Bend the shin to 130 degrees. 3. Export the bent shin and thigh as "shinr130.obj" and "thighr130.obj", for example. 4. Import shinr130 and thighr130 in your modeler and correct the joint. 5. Export corrected "newshinr130.obj" and "newthighr130.obj" from modeler. 6. To create the final MTs, load the figure obj in Poser and spawn props for rThigh and rShin. 7. Load two MTs on prop rThigh: (1) "thighr130.obj" as "shape 1", (2) "newthighr130.obj" as "shape 2". 8. Load two MTs on prop rShin: (1) "shinr130.obj" as "shape 1", (2) "newshinr130.obj" as "shape 2". 9. Set the new MT dials on props rThigh and rShin to shape 1 = -1 shape 2 = 1. "shape 1" is the uncorrected bent object. "shape 2" is the corrected bent object. The MT values -1 and 1 will cancel out the bend deformation and keep only the correction deformation. 10. If you're happy with the resulting shape, export props rThigh and rShin with the above MT settings as "thighrCMT.obj" and "shinrCMT.obj". The exported objs are the morph targets for the "KneeBendFix" MTs. 11. Load your figure from the .cr2 library. Load MTs "thighrCMT.obj" and "shinrCMT.obj" on actors rThigh and rShin. 12. When you bend the shin and set the correction MTs to 1, the resulting joint should look like the corrected shape you made in your modeler.


ockham posted Wed, 13 September 2006 at 9:07 AM

Very interesting, VK!

Makes good sense; it's exactly the

same thing I was doing in Python!

My python page
My ShareCG freebies


MrGorf posted Wed, 13 September 2006 at 4:13 PM

VK, that's a very good explanation of what's happening. And it works, too! I thought it would be time to show an example. This is very quick and dirty but I thought we needed an actual example to prove it's working. Here is my initial attempt at Miki's right knee bent 140 degrees! It's just a start, but what do you think so far?

This concept is one greatly deserving of attention, I think. It may all be moot when/if there's a "G2 Miki" but will always come in handy for any attempts at clothes-making, etc.


elenorcoli posted Wed, 13 September 2006 at 11:22 PM

wow! vk that is brilliant!

 

nice work

 


VK posted Thu, 14 September 2006 at 4:37 AM

Just for the record: The MT-difference-method is known for some time, and it is not my invention. Thanks for the compliments anyway 😄. MrGorf, your knee looks very good (much better than my tests on Posette's knee).