Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Physical object limitations - explosion!

PleaseWakeMeUp Idler
Registered User
Join date: 10 Oct 2006
Posts: 48
03-24-2007 19:14
I'm a new builder, just messing about for now, did many of the exercises in the Ivory Tower already.

Then I discoverd PHYSICAL objects, how cool is that?

So I started playing with them in my skybox. First thing I wanted was a pendulum. Got it working sorta but it fell off the thing it was hung from.

So I tried more and more and eventually decided to build a physical perch for it that has a horizontal shaft. On the shaft are 2 thin discs to keep the pendulm from falling off the shaft.

The pendulum is a opened up torus with a shaft hanging down and then a big weight at the bottom.

I put it all together, pressed the physical button and

BOOM!

It exploded...

Pieces fell out of my sky platform to the ground below, possibly on other's land. Hope not, I went to look for them but I couldn't find them, but I only saw once piece go over, the rest are just gone.

Impressive, but what did I do wrong?
_____________________
Please visit http://www.SecondSeeker.com for reviews of "non-sleaze" SL sites.
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-24-2007 21:03
hehe... Dunno what you did wrong, but it sounds to me like you successfully discovered one way to not do it :)

The SL physics system is somewhat unstable (to put it lightly), and not really capable of correctly or even semi-realistically simulating most relatively simple physical systems, including a pendulum.

Since game physics engines (and the one that SL uses is ancient) use various progressive integration techniques to approximate physical systems, they are by nature unstable when going beyond the bounds of what was intentionally designed to be done with the engine. SL's physics engine in particular was not designed to be used for anything but a professionally designed static (from a design standpoint) environment.
_____________________
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-24-2007 22:23
As Robby said, the physics engine really wasn't designed for making mechanisms. Its purpose is for things like vehicles, bullets, falling rocks, push effects, that sort of thing. Get much more complicated than that, and you'll likely have problems, a you discovered.

I'd be willing to bet that youre explosion was due to the physics engine's built-in a 10cm collision tolerance. Objects are considered to be colliding when they get within 10cm of visibly touching each other. Chances are what happened with your pendulum was that the opening in the torus was too small, so it fit too snugly around the perch object. Therefore, when you turned on physics for both objects, the two instantly "collided", and the engine tried to push them apart. However, since the torus wrapped all the way around the perch, there was really no way to push it away. Whatever direction it went, only part of it could move away from the perch shaft while its opposite side moved closer. The result was an infinite amount of collisions, and the only way to break the cycle was for the whole thing to blow up. Make sense?

Next time, start with a much wider opening in the torus, and you'll probably have better results. Make sure there's at least 10cm of empty space between the torus and the cylinder, all the way around. Don't expect the mechanism ever to be crash-proof, but you can probably get it to work okay as long as you stay within tolerances.

The best thing to do for something like this though is not to use physics at all. You'll end up with a much more reliable pendulum simply by scripting a non-physical object to rotate back and forth.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
PleaseWakeMeUp Idler
Registered User
Join date: 10 Oct 2006
Posts: 48
03-25-2007 04:56
I didn't know about the 10cm limit. I'll certainly try and work around that.

As for making a scripted pendulum, well, I guess I could but I'm really trying to avoid that. (I'm a software engineer by trade and scripting items sounds way too much like my day job!) I wanted to see just what I could make with physical objects. My inital dream was to build a Babbage Difference Engine, but when I realized how many prims that would take, I stopped even thinking of it.

Then I was thinking of a simple clock. Still, prim heavy, since I'd have to build gears.

Then just a pendulum to see what SL was capable of it. Sounds like gears are out. Oh well, it was fun to try!

Thanks!
_____________________
Please visit http://www.SecondSeeker.com for reviews of "non-sleaze" SL sites.
Erin Talamasca
Registered User
Join date: 18 Sep 2005
Posts: 617
03-25-2007 15:31
Play with physics all you like for fun and learning, so long as you realise its limitations. It won't do the things people expect or would like it to do.

Once when I was very new to SL and its 'features' I was trying to make a horse of mine (100+ prims) into a follower - can't remember the details, but for some reason it was physics. Accidentally unlinked it and blam - horse everywhere. There's few things so upsetting as seeing eyeballs and hooves roll off into the distance. Few things as funny, too, but I say that in retrospect.
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-25-2007 15:48
From: Erin Talamasca
There's few things so upsetting as seeing eyeballs and hooves roll off into the distance. Few things as funny, too, but I say that in retrospect.


I can just imagine that if that happened to me, I would have tears of frustration and laughter both at the same time....

Reminds me of my first days, I was building THE COOLEST skybox house in the world :) I right-clicked it and accidently hit "Wear" instead of "Edit". Suddenly I am falling out of the sky with a freaking HUGE hat!

Someone on the ground actually had the presence of mind to IM me as I was falling and ask if I was playing "Ride the house".

My wife was on the ground at that time also learning to build, and through fits of hysterical laughter I asked her from across the room if she could see my sky house. She said "No, it's too high to see", so I said "Look up". She did. Just in time to see me coming :)

I almost peed myself.
_____________________
Erin Talamasca
Registered User
Join date: 18 Sep 2005
Posts: 617
03-25-2007 15:59
Haaahaha :D

From: RobbyRacoon Olmstead
I can just imagine that if that happened to me, I would have tears of frustration and laughter both at the same time....


I do keep planning to find a large empty sandbox and intentionally explode a horse one of these days, but I can't think of anywhere that would be happy about it - those prims do ping off a long way, and I'm not sure I'd find half of them...
PleaseWakeMeUp Idler
Registered User
Join date: 10 Oct 2006
Posts: 48
03-25-2007 17:38
Well, I tried again, thought I had the 10cm thing fixed. It wiggled around a bit and then boom.

Does anyone want to see it and help me out?

Thanks.

Wake
_____________________
Please visit http://www.SecondSeeker.com for reviews of "non-sleaze" SL sites.
Dominguez Brentano
Registered User
Join date: 20 Apr 2006
Posts: 87
03-26-2007 09:31
a pendulum was the first "physical" thing I ever tried building in SL. :)

it didnt work to say the least :p I decided that the physics engine wasn't quite ready for proper physical toys like that without cheating and scripting them, so I gave up.

the most complicated thing you can do with non scripted physical objects is probably falling dominoes at this point. which is a shame.

I'd love to make some of the things in SL that you can make in the source engine using gary's mod, like rube goldberg devices! :D
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-26-2007 09:53
PleaseWakeMeUp, I've dropped a working physical pendulum on your profile. Here's a pic:



It doesn't swing for very long, since there can be no such thing as an entirely physical perpetual motion machine, so if you want it work continually, you'll need some sort of scripted "motor" to drive it. It does work without exploding though, which seemed to be your primary concern.

It's fairly large, so make sure when you rez it from your inventory you're already in build mode. This will ensure you have selection on the object as soon as it appears, which will prevent the physics from engaging right away. Drag it to a good distance above the ground before you let go of it in order to give it enough room to swing freely. As soon as you let go of it, it will start swinging.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
03-26-2007 10:12
Physical objects are limited to the number of prims -- 26, IIRC. Though, it should have warned you and refused to link rather than exploding.

How many prims in the building you posted the picture of? It looks great, but might cause prim-count problems.

Thanks,
Jeff
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-26-2007 10:50
From: Learjeff Innis
Physical objects are limited to the number of prims -- 26, IIRC. Though, it should have warned you and refused to link rather than exploding.

How many prims in the building you posted the picture of? It looks great, but might cause prim-count problems.

Thanks,
Jeff

It's 31 prims, and yes, it would just refuse to go physical if it were more than that. That's not what we've been talking about at all.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
PleaseWakeMeUp Idler
Registered User
Join date: 10 Oct 2006
Posts: 48
03-27-2007 04:32
From: Chosen Few
PleaseWakeMeUp, I've dropped a working physical pendulum on your profile.


That's just so cool, thanks!

I had a MUCH thinner ring and a MUCH thinner shaft than the one I atetmpted. I wonder if that is why mine exploded. I just got a RL crunch task, but I'll mess about with this soon.

Thanks!
_____________________
Please visit http://www.SecondSeeker.com for reviews of "non-sleaze" SL sites.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
03-27-2007 06:56
Still curious: roughly how many prims in that lovely roof? Ignoring the dormer windows, just the part built by your script. It sure looks great.

Thanks
Jeff

PS: hilarious stories all. I can only imagine looking up to see ... good thing we're indestructible in SL (mostly).

BTW, you might consider making the torus prim invisible once the pendulum is working, depending on what look you're going for. In the example above, it looks great the way it is.