• 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-1660
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Finish
Priority: Major Major
Assignee: Andrew Linden
Reporter: Omei Turnbull
Votes: 48
Watchers: 2
Operations

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

Energy constraints are wildly different in Havok 4

Created: 23/Feb/08 08:31 PM   Updated: 27/May/08 04:31 PM
Return to search
Component/s: Physics
Affects Version/s: Havok4 Beta
Fix Version/s: 1.20.0 Server

File Attachments: 1. File Energy stipend measurement.lsl (1 kB)
2. File Hover.lsl (0.1 kB)

Issue Links:
Relates
 

Linden Lab Issue ID: DEV-11344


 Description  « Hide
Physical objects which are large enough to be affected by energy constraints behave much differently under Havok 4.

Scenario: Put the attached Hover script on a 10x10x1 cube in a Havok 1 sim. Make the object physical. The object will hover even if it starts out on the ground and with 0 initial energy. In a Havok 4 sim, a cube with 1/10 the mass (10x1x1) won't hover under the most favorable circumstances. There is more than an order of magnitude difference in the masses that are able to hover.

I originally discovered that there were differences in energy when I checked to see whether the rate at which objects gained energy had changed, and it had. The following was my original post. But having discovered that the effects of the changes can be so large, I have modified the summary and upped the priority.
-----------------------------------------------------------------------------------------------------------
The rate at which energy accumulates has changed in the Havok 4 beta. Previously, rezzed object gained energy at the rate of 200/mass units of energy per second. Under the Havok 4 beta, this has changed to 250/mass units of energy per second. This will change the behavior of any physical prims that are large enough that energy is a consideration. Or, if all energy-related constants have been scaled proportionately, it may still change the behavior of physical objects with scripts that use the old values.

Scenario: Create a 5x5x5 meter cube and put the attached script on it. Take the cube into inventory and then rez it. The script will measure and report the energy growth rate as 200 Lindogram/sec units on a traditional sim and 250 Lindogram/sec units on a Havok 4 sim.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Stylez Gomez added a comment - 28/Feb/08 06:06 PM
Some of my larger elevators are affected by these (what seem to be) energy changes. Using llMoveToTarget, my largest elevator which behaves normal under Havok 1, seems to lose energy in Havok 4 way too fast and usually can't get itself moving for more than a few seconds before plummeting to the ground.

I've run an llGetEnergy() on a timer under Havok 1 and it reported 100% energy at all times, but I would guess this wouldn't be the case under Havok 4 (although I'm yet to actually verify this).


Andrew Linden added a comment - 05/Mar/08 11:21 AM
I've definitely fixed the hover case, and I think all the other modes of script energy consumption, but I haven't yet verified them all. Also, the fixes did not get checked in before the most recent freeze-for-testing-the-next-update event, so these fixes will take two updates to get out.

mathieu basiat added a comment - 07/Mar/08 04:14 PM
FYI this also happens with llGroundRepel

Balpien Hammerer added a comment - 27/Mar/08 01:50 PM
Andrew, I am also seeing a similar issues with major energy differences between H4/H1. In my case it is a multi-avatar zero gee platform that uses llPushObject. It works great under H1 and falls totally apart in H4. I can add details if this bug report is the right one to use.

Balpien Hammerer added a comment - 30/Mar/08 03:54 PM
I have a zero-F plaftform which creates a uniform vertical field using llPushObject (avies float above it). It consists of multiple linked prims each with a push script. Avies are assigned to a script & prim when they enter the field. This is how I worked around the push energy unevenness problem when one uses a single prim to attempt to float multiple avies. Now in H4, the behavior of the platform is back to the extreme unevenness, as if all the prims were being treated as one unit. Only the first avie gets to float and the rest remain on the ground.

The is also a general probme even with the first avie. The script modulates the push by 9.8m * mass * delta_dist ** 2.9 (roughly) to create a linear field. With H4, the avie barely floats and the field not nearly as uniform as in H1. Also, instead of a smooth floation, in H4 it is quite jerky with long moments of no push whatsoever.

If you need a copy of the platform to demonstrate this problem, please contact me.


Drew Dwi added a comment - 02/Apr/08 10:05 AM
is this still an issue in the 1.20 release?

Andrew Linden added a comment - 02/Apr/08 11:33 AM
Most of the energy consumption bugs have been fixed. I'm leaving this open to remind me to check on Balpien's zero-F platform described above.

Some bugged content that are not fixable are those that were right at the edge of their "script energy" budget in Havok1. Some of those objects may have less script energy in Havok4, but I'd expect most to actually have slightly more, which causes them to suddenly start working a lot more efficiently (at pushing other objects, for example). The main bit of content that comes to mind is a diving board we were given that pushes too hard in Havok4 – the magic numbers in the LSL script were tweaked to work in Havok1, and were in interaction with delicate details of script energy consumption.


Drew Dwi added a comment - 02/Apr/08 02:01 PM
The only item I had issues with seems to be working properly now, will post back after some more testing if this is not the case. Thanks for the update.

Balpien Hammerer added a comment - 03/Apr/08 01:26 PM
Andrew, I'm sending you a copy of the zero g platform along with a notecard.

Balpien Hammerer added a comment - 05/Apr/08 09:48 AM
Andrew, I went back and carefully worked through the two observations I noted. The multi-prims acting as one unit problem is my own bug, I must have changed the link order of the prims in my platform without noticing during my testing. So, this is a non-problem. I apologize if I sent you on a wild code chase.

The 2nd problem can be mitigated. H4 tends to apply more energy per initial unit of push than H1 and then apply much less energy than H1 on subsequent pushes. Replenishment is also more coarse grained than H1. But, for my usage, I have added velocity compensation to the iterated pushes and this gets the avies floating the same between the two physics engines.

I doubt many other applications of push are continual, so it is better to get the initial push energy tuned up - diving boards and trampolines ought not slam the avies harder.

Since this platform is a new product, and I have the means to have it operate properly in H4, consider my problem resolved.


Andrew Linden added a comment - 18/Apr/08 02:12 PM
Ok Balpien, I'm closing this for "won't finish" since you have a workaround.

If you read the wiki pseudo code that describes how llPushObject() works you'll notice that there is a bug (that cannot be fixed since it would break a lot of content) that is now a "feature", where the energy cost also scales by the mass fo the pusher (instead of the pushee). You want more "script" energy so you want your pusher to be BIG, however the energy cost also goes up by the pusher's mass, so I suspect there is some sweet spot for the pusher's mass, that is not too big but not too small.

http://wiki.secondlife.com/wiki/LlPushObject/Havok4Implementation

For best results you want the pusher very close to the pushee. You might try seeding the hover zone with phantom prims that don't collide with the avatar but can exist with centers very close to where you want the avatar's center to be.

Good luck.