Physics and simple machines
|
Coke Bernstein
Registered User
Join date: 14 Sep 2005
Posts: 13
|
10-30-2005 19:44
I understand that the physics engine in SL is not quite what it could be but I went ahead and tried to build a simple machine to test the limitations of the physics in SL - and to dream of what would be cool if the physics were a little better. I wanted something that would control a head popping straight up and down out of the water. If there is a script for what I want to do(other than a rotation script) - please let me know. Here's the deal: I want to use a rotating cube as a cam that pushes another object up and down. Here's what I built: I created a hollow cylinder, (a barrel) and put a rotating cube, with physics on, in the bottom of it. Then I put another smaller cylinder, with physics on, inside the barrel and on top of the cube. The idea was that the inner cylinder would act as a "piston", and would ride on top of the cube, and go up and down as the cube rotated. Didn't work. Wouldn't it be neat if it did?
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
11-04-2005 07:44
Don't forget the bounding box used by the physics engine is a little bigger than the object you see. This is particularly a pain when you put stuff in cylinders.
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
11-04-2005 07:47
From: Coke Bernstein Didn't work. Wouldn't it be neat if it did?
This statement, unfortunately, sums up almost every project I've tried to do using the physics engine in SL. :/
|
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
|
What will the physics engine allow you to do?
11-05-2005 08:03
So far the only thing I have been able to discover is that things fall out of the sky when I turn physics on in an object or group of objects. They bounce and roll around in interesting ways when they fall on an avatar or the ground. The fall right thru other objects that do not have physics turned on. I learned this accidentally when building the Easter Egg Iraq War Memorial, photo attached. I had selected a large portion of the eggs and clicked on physics. What a spectacular surprise, I had easter eggs rolling and bouncing all over the sim.
Physics can also make for a sort of interesting explosion. I took a house i made, 27 objects linked together, set it to physics and when I unlinked it expecting the parts to fall to the ground, they did but some of the parts were blown a considerable distance away, 100 meters or so.
At the burning man festival I saw a mechanism where a screw was able to raise a ball to the top of a column where it then rolled down a series of chutes. That was cool.
Has anyone succeeded in doing anything else with physics? Do objects made of different materials behave differently? like rubber, does it bounce farther?
_____________________
 VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30 http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240 http://shop.onrez.com/Archtx_Edo
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
11-05-2005 08:15
From: ArchTx Edo Has anyone succeeded in doing anything else with physics? Well, I've made a couple of "physics bombs" using the same thing that made your house explode. And I've seen a couple of different physics-based catapaults that'll throw an avatar a hundred meters or so. Also, you get REALLY weird results setting physics on sufficiently twisted and stretched prims. I had one of them blow me so far off-sim I had to disconnect and reconnect.
|
Alex Lumiere
Registered User
Join date: 1 Jun 2004
Posts: 228
|
11-05-2005 08:36
From: ArchTx Edo
Has anyone succeeded in doing anything else with physics? Do objects made of different materials behave differently? like rubber, does it bounce farther?
I experimented a while ago with different materials and it doesn't seem to make a difference. One of the Lindens actually answered this question and thought that the mass of the object (hollow/not hollow/size) effected it more. They didn't seem sure though.
|
Desmond Shang
Guvnah of Caledon
Join date: 14 Mar 2005
Posts: 5,250
|
11-05-2005 08:43
I have succeeded, once, in getting a cam to work but it was a long time ago. What I did was this (I think): - Nonphysical cam on a shaft, with the shaft rotated via rotation script. - Piston was physical, and constrained by a few sloppily placed nonphysical prims. And yes it is possible to do a cylinder within a cylinder, but it's a bit woggly. - Gravity returned the piston to the surface of the cam. My dream: a scripted 'boiler' of steam 'molecules' (perhaps 25 - 50 of them) which are heated via internal script. The furthest I got was to actually make the little molecules Vehicles, due to some property or other... maybe I didn't need to. The idea is to 'heat' the molecules via script and make a Steam Engine. Where I left off: the piston came out the top (due to me, not the molecules, oops) and the 'steam' went flying all over the Alice sim. After spending an hour cleaning it all up, I set the project aside for the time being.
_____________________
 Steampunk Victorian, Well-Mannered Caledon!
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
11-05-2005 09:24
From: ArchTx Edo Has anyone succeeded in doing anything else with physics?
In all fairness, one of my first projects was a pool table using physics that was actually pretty good - the holes had to be much bigger, I ended up giving up on it. But I have seen a couple playable pool tables in the last year or so and I remember as least one of them using physics. Oh, Coke, after re-reading your original post, if you're using llTargetOmega to rotate your cam, I believe that doesn't work with the physics engine at all because it's client side, all rendered locally inside each persons machine instead of on the server. I tried to find a simple, elegant way to make a piston using multiple llTargetOmega scripts but it slipped out of synch pretty easily. 
|
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
|
11-05-2005 09:29
materials do make a diffrence in friction something with applyimpulse will slide farther on glass than rubber. heh also ive made a bessler wheel and it would spin faster and faster till it explodes with out any scripts on it. -LW
|
Tommy Oz
Registered User
Join date: 13 Jan 2005
Posts: 56
|
11-06-2005 09:24
I tried an interesting experiement once. I took a tight array of blocks and then placed them in a thick box with a very thick top plate, On a trigger, I then gave the blocks inside an upward impulse. The containing box actually lifted off the ground from the impact of the blocks against the bottom of the thrust plate and was able to lift quite a weight.
It wasn't very stable, however. On occasion the blocks would actaully come out through the top thrust plate, loosing not only their lift, but leaving gaps in the inside chamber and uneven lift. Then the lift box would start to tip over and topple. All very interesting.
I have had some thoughts about trying a version of this using shortlived disposable thrust prims that drop away as they are spent and burn up. Should look like a rocket. And It should act a bit like one too.
The basic problem with making actual mechanical parts in SL in the tendancy for an object surface to interpenitrate with another objects surface ( with phyics on, of course). One object can not reliably and consistantly apply a force against an adjacent object. And that is the basics of most mechanical designs.
It might be possible to use scripts in linked objects to simulate this transfer of force issue. especially now with the new setting pos and rotation features in 1.7. For example a pair of toothed gears could turn at the approprate relative speeds with llSetLocalRot, rather than depending on the force being transferes by the tooth surfaces.
|
Sam Portocarrero
Jesus Of Suburbia
Join date: 23 May 2004
Posts: 316
|
11-06-2005 10:11
From: ArchTx Edo Has anyone succeeded in doing anything else with physics? Do objects made of different materials behave differently? like rubber, does it bounce farther?
I've done a few things with it, also crashed my sim (by mistake) with Physics. My first test of it consisted of a 8 story office building "implosion" which turned into an explosion when I set it off lol. Second was a huge ball hanging from a chain (each link was a physics prim) Stupidly I had too many links, and one massive ball which ended up crashing the sim. Third was a catapult that I had setup in Eagan, along with a trebuchet that could launch an avie about 300m. If you want to see any of these things, I still have them. Just send me an IM ingame. As for advanced features (I always wanted to build a "working" gasoline engine) I havent seen many works over a few prim that sucessfully worked well. (one being the ball game at Burning Life) - Sam
|
Neil Protagonist
FX Monkey
Join date: 11 Jul 2003
Posts: 346
|
11-16-2005 09:58
Josh Chaos and I built a Catapult a long while ago and launched about 80 physical pandas. I have a video of it, i'll dump it up on my site and post a link later on. We launched avs a few sims with it. I still have it in my inventory somewhere, still trying to find a way to integrate it into the sick-n-wrong store 
_____________________
" Control the things you can control, maggot. Let everything else take a flying f**k at you, and if you must go down, go down with your guns blazing." -Cort Need fire? Visit my FX Store in Bisque(232, 4 Sick-N-WrongLike Anime? Visit Nakama!
|
Harlequin Salome
Honor Above All.
Join date: 9 Jul 2005
Posts: 55
|
11-16-2005 11:52
Most I've done is hollow out a sphere, go a few thousand meters up, climb in, and fall. My wife and I like to make bets as to where I'll end up. Yeah, its stupid, but its a blast.
|
Art Laxness
Registered User
Join date: 24 Sep 2005
Posts: 34
|
11-17-2005 16:32
So I can make cogs work and also see saws that can launch stuff, i had a really crappy crankshaft for a bit. Ive tried for ages to get an achemedes screw to work. If there was one at the burning man, someone tell me how it was done and I'll love them forever. managed to get a 'waterwheel' to be driven off spheres, which turned a cog at 90 degrees. If anyone is interested in furthering the boundaries of what can be done with minimal scripts and just your AV pushing stuff contact me.
|
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
|
11-17-2005 19:51
I use physics when I need to place things randomly in a build.
Take for example, if you want to make a stack of bricks that you want to place so that they look like they've fallen off a wall. Just make a set of bricks and put it slightly above ground. Then select all of them and turn physics on so they fall naturally. I then turn off physics and tweak them to remove the gaps. Its a great timesaver for all sorts of placement of broken stuff, like barrels, crates, fallen rocks, broken glass, etc. on uneven terrain.
|
Erin Talamasca
Registered User
Join date: 18 Sep 2005
Posts: 617
|
11-18-2005 06:58
Hooray for physics explosions! My favourite was my exploding horse - I'm still convinced *I* didn't make him physics, but physics he became, and rather dramatically.
I was having pieces of horse returned to my inventory for weeks after that one. Not many games you can make that claim about.
|
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
|
11-22-2005 07:07
From: Harlequin Salome Most I've done is hollow out a sphere, go a few thousand meters up, climb in, and fall. My wife and I like to make bets as to where I'll end up. Yeah, its stupid, but its a blast. ?? I know my AV can fly thousands of meters up, but I thot it wasnt possible to elevate or rez an object more then about 750 meters high. Please explain how you did the, sounds like fun.  Of course 750 meters would be much the same, I imagine its the bounching around when you hit the ground that is the most fun.
_____________________
 VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30 http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240 http://shop.onrez.com/Archtx_Edo
|
RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
|
11-22-2005 08:20
I made some exploding stuff 1 castle wars the game where you fire a flaming ball from a catapult and then I set the castle walls to turn phantom on impact but rez some pieces that turn phisical and phantom till they collide with the ground. Also I used a fractal tree generator made a script I put in the parts, before it made the tree that remebers where they are relative to a rez prim, I set near it. I threw all the parts in the rez prim and it rezzes them. They rebuild the tree and I say the word and that tells the parts to blow up they all turn phisical and have a small random impulse with a little extra up force and they scatter pretty good and and when they land the collision with the ground shuts off the phisics and the particle fires start and then they burn up and die. No leftover messes to clean up. 
|
Kaejo DaSilva
[Renegade]
Join date: 16 Jun 2005
Posts: 92
|
12-05-2005 19:19
Can I get a copy of that rotation script? I need an "engine" to power my clockwork mechanations and to pull the trebuchet bucket back down after firing. 
|
Khashai Steinbeck
A drop in the Biomass.
Join date: 15 Oct 2005
Posts: 283
|
12-06-2005 02:46
Here is a good physics question, so I understand that 31 prims is the maximum usable in a normal vehicle script... can you use physics (in any way shape or form) to move more than 31 objects? I have done some testing in the past, and I was able to get objects not linked to the vehicle to move, but with varying results...
Mostly Im wondering this because it would allow users to create large working boats and the like.
|