Tue, Nov 19, 12:33 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 18 10:25 pm)



Subject: Python and collision


xantor ( ) posted Mon, 27 December 2004 at 10:10 AM · edited Tue, 19 November 2024 at 12:27 PM

With poser 5 would it not be possible to make a python script to make figures or (more likely) props react with each other like pool balls hitting each other using collision detection?


ockham ( ) posted Mon, 27 December 2004 at 10:17 AM

It's certainly possible in either version. P5 doesn't give Python any connection to its coll-det, so it's really no different in this regard. Problem is, the calculations take SO LONG that it's not necessarily worth automating. For relatively simple objects, it's not so bad. But for Vicky-size meshes, you run into huge numbers of calcs.

My python page
My ShareCG freebies


ockham ( ) posted Mon, 27 December 2004 at 10:25 AM

And a broader problem with doing "honest" physics in the digital world is that our props and figures have no representation of mass and friction. They're all equally weightless and smooth, so such measures as momentum or drag have to be dummied from speed alone, or estimated from the volume of things.

My python page
My ShareCG freebies


maxxxmodelz ( ) posted Mon, 27 December 2004 at 10:50 AM

"And a broader problem with doing "honest" physics in the digital world is that our props and figures have no representation of mass and friction" In some applications you can assign mass and friction to objects to approximate physics calculations such as velocity, momentum, etc. right down to the vertex level. You can actually "paint" different weights on different vertices or polys to react with gravity. However, this is something not yet possible in poser. :-(


Tools :  3dsmax 2015, Daz Studio 4.6, PoserPro 2012, Blender v2.74

System: Pentium QuadCore i7, under Win 8, GeForce GTX 780 / 2GB GPU.


xantor ( ) posted Mon, 27 December 2004 at 11:05 AM

You could use the standard breakout type bouncing ball way of animating the collisions the collisions and movements wouldn`t have to be too exact. I knew it would be more difficult for figures that was why I said it would be more likely for props.


ockham ( ) posted Mon, 27 December 2004 at 11:11 AM

Well, you got me started on this again. I'll use volume as proxy for mass, and see how it goes.

My python page
My ShareCG freebies


xantor ( ) posted Mon, 27 December 2004 at 10:15 PM

3dstudio max version 6 has some kind of collision detection (I forget the name) but they have an animation of it working where a figure hits a wall and the wall is knocked down, something similar with python would be good. It wouldn`t have to be too complicated, the wall parts that break up could be preplanned so that there are not too many calculations involved.


ockham ( ) posted Mon, 27 December 2004 at 10:30 PM

file_160853.jpg

Here's step 1 in the process: elastic billiard balls with the cueball bigger. Next step is to account for squishiness and the other mass possibilities. After that, a more precise form of surface detection. (At the moment this just uses the radius, which is OK for nearly spherical things but not OK for figures.) This GIF shows the PZ3 before applying the script. The big ball passes through the little one in true Poser ectoplasmic style.

My python page
My ShareCG freebies


ockham ( ) posted Mon, 27 December 2004 at 10:31 PM

file_160854.jpg

And this GIF shows the result after applying the script.

My python page
My ShareCG freebies


xantor ( ) posted Mon, 27 December 2004 at 10:38 PM

That is a good start, I would`nt bother too much about gravity and friction etc at least to start with and just make the script work properly. Other effects could be added later.


ockham ( ) posted Mon, 27 December 2004 at 10:44 PM

I think the hardest thing, at least on the thinking level, will be to determine what kind of thing the target does. Slide, roll, fall over, hold steady, break through, squish? This will just have to be a user choice, because the physical information is unavailable in the Poser world, and would be WAY too complicated even if it were available!

My python page
My ShareCG freebies


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.