Sat, Sep 21, 12:03 PM CDT

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Sep 21 11:15 am)



Subject: Collision detection in Python: Solved!


ockham ( ) posted Sun, 22 December 2002 at 10:50 PM · edited Sat, 21 September 2024 at 12:02 PM

So I sez to myself, well, if them there folks at Precarious Labs ain't gonna give me no Collision Detection such that I can use it for animatin'..... Wellsir, I'll just do it my own damn self. And I did.

My python page
My ShareCG freebies


ockham ( ) posted Sun, 22 December 2002 at 10:51 PM

file_37617.jpg

Before applying Python: Crash! Crunch! Owie!

My python page
My ShareCG freebies


ockham ( ) posted Sun, 22 December 2002 at 10:56 PM

file_37618.jpg

After applying Python: the vehicle follows the terrain. The ride is a bit bumpy, probably because the terrain mesh is coarse. Though this is a specialized application, the basic mechanism will work for any situation where a moving object needs to sense the presence of a still object, and do something -- stop, squish, bounce -- in response. Also, this makes NO use of the facilities of Poser 5, if there actually is such a program.

My python page
My ShareCG freebies


raz ( ) posted Sun, 22 December 2002 at 10:59 PM

COOL! any chance you get give me a tutorial on what you did?


ockham ( ) posted Sun, 22 December 2002 at 11:05 PM

I'm holding back on the details just a bit, until I get the methods better tuned. Wanted to get this "working model" on exhibit as soon as possible because I'm so happy with the discovery! (And also to establish priority.) But I will put something in freestuff, with a good readme description, very soon.

My python page
My ShareCG freebies


milamber42 ( ) posted Sun, 22 December 2002 at 11:25 PM

I'm interested in seeing how you did it too.


Virus ( ) posted Sun, 22 December 2002 at 11:51 PM

here here too :) Great discovery! ockham!

SAL9000 - Hello Dr. Chandra, Will I've dream?


SimonWM ( ) posted Mon, 23 December 2002 at 7:58 AM

I'm very interested in this, Ockham, please keep me posted too.


shogakusha ( ) posted Mon, 23 December 2002 at 8:16 AM

This will definitely help to keep my feet on the ground!


volfin ( ) posted Mon, 23 December 2002 at 9:39 AM

Alright! This is great news!


EvoShandor ( ) posted Mon, 23 December 2002 at 10:17 AM

bookmarked ;) evo


ockham ( ) posted Mon, 23 December 2002 at 11:49 AM

While I'm thinking about this, what are some other specific applications of col-det that would be useful to animators? I've thought about the following 3. Any preferences? Other ideas? 1. Reflective bouncing as in billiards 2. "Drop to floor" for any surface, not just the Poser ground. 3. Pick up and put down: When hand grasp makes fingertips touch an object, make the object stick with the hand until grasp opens again. (IOW, Temporary parenting)

My python page
My ShareCG freebies


EvoShandor ( ) posted Mon, 23 December 2002 at 11:54 AM

with lack of P5, a cloth-like col-det would be nice, however, I can't begin to fathom how difficult that would be to synthesize in P4.


ockham ( ) posted Mon, 23 December 2002 at 1:00 PM

Cloth would indeed be much harder than "stiff-object" col-det, because it involves adjusting single vertices instead of moving or halting an entire object. Also, P5 does perform some kind of col-det with cloth, so I should probably concentrate first on the kinds that aren't otherwise available.

My python page
My ShareCG freebies


shogakusha ( ) posted Mon, 23 December 2002 at 1:03 PM

Heck, I was impressed with just sticking to a surface. All three of your proposals sound useful. I'd have to say: 1- Pick up and put down 2- Drop to floor (any surface) 3- Reflective bouncing Good luck with coding it. I wish you well! And thanks for the effort.


Crescent ( ) posted Mon, 23 December 2002 at 1:04 PM

Order of usefullness for me: 2 3 1 Thanks for all the hard work on this!


SimonWM ( ) posted Mon, 23 December 2002 at 1:15 PM

I hope your collision detection works like Poser 5 should have. I think the most useful thing for animators would be to be able to have lets say two or three figures (Mike, Vicky, steph etc.) and be able to apply collision detection in a way were you can pose the figures and the collision detection will keep your figures from intersecting one another. Lets say I want to coreograph a Ninja fight were the figures are grabbing and pulling each other, good collision detection would be a godsend. Right now the way Poser 5 works (when it does) is very limited and extremely buggy to be able to do much with it. Hope yours is a lot better, faster and responsive.


jobcontrol ( ) posted Mon, 23 December 2002 at 2:35 PM

swimming! I imagine a prop (say, a ball or a ship) bouncing not from a surface, but immersing itself into it like it is swimming. This is similar to collision detection but with a fixed offset for the control point. An animated surface like water (animated using wave-deformers) could act as a control surface. Willy


ockham ( ) posted Mon, 23 December 2002 at 7:35 PM

"I imagine a prop (say, a ball or a ship) bouncing not from a surface, but immersing itself into it" Aha! Interesting idea. In fact, this terrain-following method would do it with very little change. It's just a matter of putting the "wheels" or surface sensors halfway up the side of the boat, instead of below the hull. And yes, the boat could move with the water when a wave deformer is active. I think I'll work on this first, because it's such a small variation.

My python page
My ShareCG freebies


KattMan ( ) posted Mon, 23 December 2002 at 9:45 PM

I'm watching this one ockham, fantastic work.


bikermouse ( ) posted Mon, 23 December 2002 at 10:09 PM

ockham, Looks like you got a handle on it. I imagine Two figures dancing, picking things up etc. As easy of a concept as it is, the actuality is usually memory intensive - but with the gig+ memory options availabe now it is an idea whose time is here. Here's to you and to further research, - TJ


Bobasaur ( ) posted Mon, 23 December 2002 at 11:23 PM

mark da book

Before they made me they broke the mold!
http://home.roadrunner.com/~kflach/


akin_ ( ) posted Tue, 24 December 2002 at 6:33 AM

Wow ! Argl...... ! My gawd ! How did you DO that ???? =)


FireHorse ( ) posted Tue, 24 December 2002 at 9:41 AM

.


Bobasaur ( ) posted Tue, 24 December 2002 at 12:59 PM

I've also got a quick question... I get the impression that some aspects of Python are cross-platform and some aren't. When you do finalize this Collision Detection script, will you make it Mac compatible? Please.

Before they made me they broke the mold!
http://home.roadrunner.com/~kflach/


ockham ( ) posted Wed, 25 December 2002 at 8:21 AM

I don't have a Mac, so I'll have to rely on somebody who does own one, and who knows enough about Python to recognize the errors or at least report them.... Is that you? I -think- the main PC/Mac discontinuity is in the realm of files and folders. This method doesn't do any file stuff, so it should be clear of that obstacle.

My python page
My ShareCG freebies


Bobasaur ( ) posted Wed, 25 December 2002 at 12:19 PM

I don't know anywhere near enough - OK, I don't know hardly anything at all - about Python to recognize errors. I'm willing to take a script, import it and try it out to see if it works and then give you feedback if you'd like. If it matters, I've got P4 with the Pro Pack. I ask because somewhere I thought I'd read that there were different types of Python scripts and that the ".py" files would work on Macs but the others wouldn't. I haven't tried any for that reason - I don't know enough to be able to read a description and tell what kind of file it is (and also they keep being labeled "For PC").

Before they made me they broke the mold!
http://home.roadrunner.com/~kflach/


bikermouse ( ) posted Wed, 25 December 2002 at 8:10 PM

Ockham, I envy the functioality your animations show as I have neither P5 nor propack yet. I'd like to start doing stuff like this in Python (converting functions that I've done in Borland C language), but as it is it looks like I'm gonna have to wait for a while. Keep at it! Mac conversions would be beyond me at present but perhaps bushi might have some comments/suggestions on this? - TJ


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.