Fri, Jan 24, 6:46 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 24 6:22 pm)



Subject: Archimedes + Python = ???


ockham ( ) posted Mon, 06 January 2003 at 6:42 PM · edited Fri, 20 December 2024 at 9:01 PM

file_40146.gif

No,this isn't the right answer. This is just a bit of old science-teacher humor.

My python page
My ShareCG freebies


ockham ( ) posted Mon, 06 January 2003 at 6:44 PM

file_40147.gif

The right answer is DISPLACEMENT.

Before Python, boats leak like sieves.
After Python, boats hold water.

My python page
My ShareCG freebies


ockham ( ) posted Mon, 06 January 2003 at 6:46 PM

Attached Link: http://ockhamsbungalow.com/Python/Eureka1.zip

file_40148.gif

Here's a better closeup view of how it works.

The link to the ZIP is here.....

My python page
My ShareCG freebies


ockham ( ) posted Mon, 06 January 2003 at 6:51 PM

Here's the Readme instructions as included in the ZIP, so you can tell what it's about. ------------------------- Big points: ------------------------- The 'Hard object' is the object or figure that will remain intact. The 'Soft object' is the object or figure that will be deformed. Eureka acts only downward. (Along the Y axis.) If you want a deformation at some other angle, you'll have to rearrange the objects so that the action runs downward, run the script to set the deformation, then rearrange them back to desired position. ------------------------- Instructions: 1. In the top line, 'List of Hard Items', fill in at least one object. The elements must be parts of one Figure. Generally you'll want more than one element; for a sitting person compressing a chair cushion, you might fill in Hip, Left Thigh, Right Thigh in the Hard Items blank. Use commas to separate the body parts; spacing around the commas is flexible but spacing and capitalization inside the names must be exactly as Poser lists them. You can simply fill in the name of a Figure and let Python do the work for you, but this is probably a waste of time unless the Figure consists of just one or two elements. 2. In the second line, 'Soft Item', fill in the name of the item that will be deformed. This may be part of a figure or a freestanding prop, but must be only one actor or part. 3. If you want a chamfer around the edge, check the 'Smooth' box. This is generally a good idea for cushions, mattresses and such; but if you're setting up a boat in water, or footprints in snow, the chamfer is unwanted. 4. Hit Go. 5. Wait. The timing depends on degree of contact and density of mesh. For Posette sitting on a simple pillow, using Left Thigh, Right Thigh, and Hip, the deformation takes about 15 seconds. But her Head on the same pillow takes 10 minutes! Smoothing also adds a considerable amount of time. 6. I've provided for animation in a simple way. The script acts only on the current frame, but the deformation is recorded as a morph target on the Soft object. If you want the deformation to occur gradually, you should find the frame where the hard object is at maximum displacement, and run Eureka right there. The deformed object will then have a morph channel, set to 1.0 at the frame of action. You can then back up to the place where the hard thing first touches the soft one, and interpolate the morph dial between the two points. When you re-save your PZ3, or save the soft object as a prop, the saved file will include the morph. The first morph channel is titled 'Eureka_1'; if you run Eureka more than once on the same Soft object, the next morph is 'Eureka_2' and so on.

My python page
My ShareCG freebies


jobcontrol ( ) posted Mon, 06 January 2003 at 6:54 PM

Thanks, David. Hey this is ingenious :) Willy


hauksdottir ( ) posted Mon, 06 January 2003 at 7:24 PM

So the boat's not drawing water, but the snake is? ;^) Thanks for the crowning achievement! Carolly


SimonWM ( ) posted Mon, 06 January 2003 at 7:44 PM

Ockham, is this part of the Collision Detection that you are working on or is this another script?


SimonWM ( ) posted Mon, 06 January 2003 at 7:45 PM

By the way, it looks awesome, like all your work!!!


Ajax ( ) posted Mon, 06 January 2003 at 8:40 PM

So the script measures the volume of the hard body doing the displacing and raises the level of the soft body appropriately in accord with Archimedes's principle of volume displacement, just the way the water level rises in the bath when I sit in it? Heh heh - just kidding. That looks really cool and I can think of lots of good uses for it - especially with people sitting or laying on soft furniture.


View Ajax's Gallery - View Ajax's Freestuff - View Ajax's Store - Send Ajax a message


Little_Dragon ( ) posted Mon, 06 January 2003 at 8:43 PM

You're edging dangerously close to Poser soft-body dynamics here, ockham!



ockham ( ) posted Mon, 06 January 2003 at 9:11 PM

"You're edging dangerously close to Poser soft-body dynamics here, ockham! " Yup, that's the whole point. This is one fairly large step toward that goal.

My python page
My ShareCG freebies


AprilYSH ( ) posted Mon, 06 January 2003 at 10:05 PM

good one!! :) so we can also use this to fit clothing? hmmm? thanks for sharing :) more of us havta learn python...

[ Store | Freebies | Profile ]

a sweet disorder in the dress kindles in clothes a wantoness,
do more bewitch me than when art is too precise in every part


ockham ( ) posted Mon, 06 January 2003 at 10:51 PM

"so we can also use this to fit clothing?" Only within very narrow limits. This is not yet a 'universal conformer', because it acts only in one direction. But it contains most of the internal mechanisms that will be needed. I'm hoping some of y'all will play around with this, to show both strengths and weaknesses that I haven't imagined. And you don't need to learn Python in order to use it! Just learn how to use the File:Run Python Script menu choice.

My python page
My ShareCG freebies


PabloS ( ) posted Tue, 07 January 2003 at 6:23 AM

.


Larry F ( ) posted Tue, 07 January 2003 at 6:36 AM

...


Chris ( ) posted Tue, 07 January 2003 at 6:54 AM

.

"It Is Useless To Resist!" - Darth Vader


ockham ( ) posted Tue, 07 January 2003 at 7:46 AM

I improved the smoothing method, posted a new version. The link above now leads to the new one, and the link in Freestuff (keyword Deformer) is also revised.

My python page
My ShareCG freebies


VI_Knight ( ) posted Tue, 07 January 2003 at 7:56 AM

..


simontemplar ( ) posted Tue, 07 January 2003 at 9:03 AM

Is there any known way so that, for example, if you make a character with his back against a wall, why not, when "pushing" it towards the wall, the lil guy will naturally stop when he its the wall? Or if you put a kid on an adult's shoulders, when you push the kid down his mom's shoulders will "stop" him from going through her body ? that's some collision issue too :) I am totally new to the whole concept of collision in Poser, this is why I ask.


ockham ( ) posted Tue, 07 January 2003 at 9:34 AM

Yes, those things are possible, and in fact easier than this. But Poser 5 does the stopping action already, at least in some circumstances. I'm trying to do things that P5 doesn't offer. (If somebody knows the exact status of P5's stopping abilities in the latest release, I'd like to know..... I gave up on the original and haven't bothered to keep up with the fixes.)

My python page
My ShareCG freebies


TMGraphics ( ) posted Wed, 08 January 2003 at 5:07 AM

Thanks!


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.