• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-771
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Andrew Linden
Reporter: Interfect Sonic
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

(Havok4) llSetBuoyancy maxes out at 1.0

Created: 05/Oct/07 02:27 PM   Updated: 18/Nov/08 10:43 AM
Return to search
Component/s: Physics, Scripts
Affects Version/s: Havok4 Beta
Fix Version/s: Havok4 Beta

File Attachments: 1. File llSetBuoyancy(H4) [Xvid].avi (475 kB)

Environment: Beta viewer, Windows XP Home
Issue Links:
Relates
 

Linden Lab Issue ID: DEV-3853


 Description  « Hide
llSetBuoyancy calls with a value above 1.0 only seem to set the bouyancy to 1.0. Objects which rose into the air using bouyancy can no longer do so with the new physics engine.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Strife Onizuka added a comment - 05/Oct/07 08:41 PM
i can't replicate this, is this a Havok 4 only bug?

Ryozu Kojima added a comment - 06/Oct/07 01:23 AM
Strife: Most if not all physics bugs reported at this point will probably be Havok4 related, just that we don't have a tag specific to Havok4, and some people aren't tagging the issues as such.

The attached video shows the results of this script.

/////////////////
default
{
state_entry()

{ llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE); llSetStatus(STATUS_PHYSICS, TRUE); llListen(0, "", NULL_KEY, "go"); }

listen(integer channel, string name, key id, string msg)

{ llSetTimerEvent(5.0); llSetBuoyancy(1.0); }

timer()

{ llSetBuoyancy(0.0); }

}
///////////////

llSetBuoyancy(10.0) in the Green cube, and (1.0) in the red cube.

In Havok1, the Green cube would have rose with 10x the speed as the red cube.


Simon Linden added a comment - 09/Oct/07 01:37 PM
Passing to Andrew. Code is fixed internally but we need to figure out a sane limit value.

Andrew Linden added a comment - 10/Oct/07 05:31 PM
Anybody have opinions about what a sane limit for buoyancy should be? We must bound it by something, but I'm curious to hear what values of buoyancy are useful. At the moment I'm thinking about capping it to +/- 10 (that is, 10 gravities).

Andrew Linden added a comment - 10/Oct/07 05:34 PM
Arguments I've heard for allowing it to be very large are:

1) fast recovery after being "blitzed" to nearly infinite altitudes
2) sitting on offending dynamic content and using buoyancy to lift the content beyond the bounds of the world --> gets returned

Some counter arguments to these examples are:

1) I think we've nerfed the blitzed avatar problem in Havok4
2) Normal objects can't be lifted beyond the bounds of the world in Havok4. Dynamic objects are reflected at Z=1024 meters, and dropping or putting objects above that height will not work – the Z component is snapped to 1024. You'd have to drag the object to an X or Y edge in order for it to go "offworld" and get returned.

Anybody got other reasons to make the buoyancy limits larger than 10?


WarKirby Magojiro added a comment - 11/Oct/07 09:38 AM
I think 1000 is a good number. Or maybe 1024

WarKirby Magojiro added a comment - 11/Oct/07 09:43 AM
I would personally like to make a gravity chamber which goes up to 400x.

WarKirby Magojiro added a comment - 11/Oct/07 09:53 AM
IT would also be nice for making supper dense, dark matter style objects.

Could you possibly explain why there has to be a limit, andrew?


Andrew Linden added a comment - 11/Oct/07 11:41 AM
MAX_FLOAT is not an option – there MUST be some limit because 9.8 * FLOAT_MAX = NaN and if you insert NaN into the physics engine you get a lot of other NaN's and a whole bunch of stuff starts to break. If you have a NaN's in the system you can get more NaN's – it can spread like a virus.

2 * NaN = NaN
1 + NaN = NaN
NaN - 1 = NaN
NaN / 2 = NaN

Eventually you'll start doing some logic on NaN's and things start to fail:

(1 < NaN) == false
(1 > NaN) == false
(1 == NaN) == false

The reason I like the idea of clamping the value to rather small values (~10, or ~1) is that whenever you have a mode that allows arbitrary amounts of energy pumped into the system then there is a danger of "instability". Instability is where the physics engine can oscillate into the relm of infinity or NaN. It isn't always obvious where the instability modes exist and low values of force/impulse/velocity greatly reduce the likelihood of instabilities – they are the safe path.


Seifert Surface added a comment - 12/Oct/07 06:44 PM
A possible use for a larger maximum for buoyancy: using something small to lift something large.

This assumes that the force you get from a buoyant object is proportional to its mass (and presumably it is).

I'd imagine there would be other ways to achieve the same effect though.


darling brody added a comment - 05/Nov/07 03:48 AM
Andrew,

go to my inventory an grab yourself a copy of "Shield CrystSm v1.04". Sorry UUID's dont work on the beta grid for some reason. I'll pass you a copy on the beta grid too.

It is an 18 sided shape that will shatter when the owner walks though it.

It has a buoyancysetting of 1 to make the parts shatter and float as if in space.

On havok1 it will break appart with a natural feel. each of the parts floating away in the direction they were bumped by the collisions with other parts. It is really is nice to watch.

On havok4 all the parts immediatly fall to the ground as if they have no buoyancy at all. Several seconds later they mysteriously start to float up. It looks totaly wrong from a physical point of view on earth or space!

Objects with a buoyancy of 1 should not be effected by graverty at all.

Many skydiving platforms being used in SL use buoyancy to overcome gravery to lift themselves several thousand meters into the air. Adusting the buoyancy compensates for the number of passengers.

Fast movment is a requirement of many teleporters and transportation gadgets in SL. Buoyancy has been extensivly used because it is able to apply a force against gravery that is far more predictable that other methods such as llApplyForce.


Torley Linden added a comment - 21/Dec/07 12:12 PM
========-
Fixed publicly in Havok4 Beta – for news & updates on the Official Linden Blog, see:

» http://blog.secondlife.com/?s=sidewinder%20havok
========-