Buoyancy vs. prim size
|
|
Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
|
06-07-2009 22:19
I did a little experiment with buoyancy today, figuring I'd best tackle that before I got into more complex stuff like anchoring hovering objects in place, etc. I put this script inside a .500m "square" sphere, which was contained within a 50m cube just to keep it from flying away.
default { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetBuoyancy(1.05); llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE); } }
This worked fine and dandy; the little sphere drifted slowly upward, bounced on the ceiling a couple of times, and then came to rest against the ceiling, a lot like a balloon. I then incrementally increased the size of the prim, and discovered that the sphere drifted up more slowly with every increase in size, until somwhere around 5.2m in all dimensions, it would hit the ceiling and fall back down to the floor, and stay there, and somewhere around 5.5m, it would only rise part of the way up, and then fall and stay. Much larger than that, and it only moves upward a fraction of a meter before falling back, and then just sitting there, occasionally essaying a half-hearted wiggle. I say "around," because it was not consistent; Sometimes at 5.199m, it would behave like the original small one, other times it would not. This is perplexing to me. Everything I have been able to find to read in the wikis just says that a positive buoyancy value like this will make the prim rise, with no caveats about prim size, mass, etc. Set it above 1.00, and it rises. Period. Is this a bug, or is there some sort of secret club I need to be in to find the real dope when it comes to buoyancy?  I imagine it may be related to this issue: http://jira.secondlife.com/browse/SVC-725, but it only mentions slowing and stopping, not falling once it does, nor does it mention prim size except to specify a small one to begin with (Which again makes me wonder if I am missing something regarding size.)
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
06-07-2009 22:50
I have done even less playing with buoyancy than you have, although I did a similar experiment a month or so ago. This is the blind leading the blind until a Wise One wakes up and wanders into the room. It seems to me, though, that you are not correct in believing that the buoyancy function is independent of mass. In fact, here's a snippet from the LSL wiki that suggests just the opposite. .... From: someone Behavior not unlike llSetForce, as well as the constant use of energy by this function, would suggest that buoyancy internally works by applying extra (mass-proportional) force, either up or down, while gravity still works (hence the energy use while floating). Notes: * Heavy objects cause a lot of energy use: a physical object over about 90kg will not be able to hover due to energy expenditure, depending a little on how much motion other energy loss it's experiencing. Try monitoring the mass of your test object as you repeat the experiment to see whether it is approaching the 90kg limit mentioned in the note. If so, you've found your answer. Maybe.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-07-2009 22:58
this is a matter of energy (which is poorly explained in both main wiki's, neither citing anything resembling an accurate formula)
but the gist is this... the bigger the object, the more mass, the more mass the more energy it takes to do certain physical actions. all objects regain energy at the same rate (supposedly), but larger objects use it faster (more mass to push). if the object uses it's energy faster than it can be replenished the functions that rely on it become less effective until finally they are nil.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
06-08-2009 01:39
From: Void Singer this is a matter of energy (which is poorly explained in both main wiki's, neither citing anything resembling an accurate formula)
but the gist is this... the bigger the object, the more mass, the more mass the more energy it takes to do certain physical actions. all objects regain energy at the same rate (supposedly), but larger objects use it faster (more mass to push). if the object uses it's energy faster than it can be replenished the functions that rely on it become less effective until finally they are nil. Unless you abuse certain functions on a fast loop to prevent the object from ever losing energy!
|
|
Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
|
06-08-2009 01:59
From: Rolig Loon It seems to me, though, that you are not correct in believing that the buoyancy function is independent of mass. In fact, here's a snippet from the LSL wiki that suggests just the opposite. .. Thanks, Rolig, Actually, I didn't believe the buoyancy function is independent of mass; that was my whole reason for asking the questions. I believe it is; I just couldn't find any documentation to support my belief. Sorry if I was less than clear in this regard, From: Rolig Loon Behavior not unlike llSetForce, as well as the constant use of energy by this function, would suggest that buoyancy internally works by applying extra (mass-proportional) force, either up or down, while gravity still works (hence the energy use while floating).
Notes: * Heavy objects cause a lot of energy use: a physical object over about 90kg will not be able to hover due to energy expenditure, depending a little on how much motion other energy loss it's experiencing. Where did you find this? This is exactly what I have been looking for. I asked about mass in another thread, an no one seemed willing to answer.
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
06-08-2009 04:07
From: Basement Desade Thanks, Rolig,
Actually, I didn't believe the buoyancy function is independent of mass; that was my whole reason for asking the questions. I believe it is; I just couldn't find any documentation to support my belief. Sorry if I was less than clear in this regard,
Where did you find this? This is exactly what I have been looking for. I asked about mass in another thread, an no one seemed willing to answer. Energy, like so many other things, is just another rule. Some rules can be bent, other can be broken. You think that's air you're breathing?
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
06-08-2009 07:55
From: Tyken Hightower Energy, like so many other things, is just another rule. Some rules can be bent, other can be broken. You think that's air you're breathing? It isn't? That bit I quoted is on the llSetBuoyancy page at  .
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-08-2009 09:43
From: Tyken Hightower Unless you abuse certain functions on a fast loop to prevent the object from ever losing energy! I'm going to be very bad and ask... even though I shouldn't,... because it's a terrible thing to do in a script.... but my curiosity is winning... so spill =)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
06-08-2009 09:51
llApplyRotationalImpulse(<0.0, 0.0, 0.0>, FALSE) is just such a weird thing to do.. Why would anyone ever do that? No clue.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-08-2009 10:19
gah, that's as bad as my state_exit/state next; loop (that originally took out sims).
does that reset the energy? that's... obscene lol
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
06-08-2009 10:19
From: Basement Desade Actually, I didn't believe the buoyancy function is independent of mass; that was my whole reason for asking the questions. I believe it is; I just couldn't find any documentation to support my belief. Sorry if I was less than clear in this regard, While the value you set for buoyancy is independent of the object's mass, the rate at which the object uses energy to hold itself up (the "buoyant force"  DOES depend on its mass. If you really want something that is mass-independent, use the vehicle functions. They don't use energy and don't depend AT ALL on mass. The downside is that they are ALL position and orientation independent, so can be stuck doing quite a bit more math and approximation for some applications (e.g. to move to a certain pre-determined point in space; there's no llMoveToTarget() equivalent).
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-08-2009 10:21
From: Hewee Zetkin If you really want something that is mass-independent, use the vehicle functions. They don't use energy and don't depend AT ALL on mass. ::cough:: probably they only reason they work at all ::cough::
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|