aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs2
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs35
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt44
4 files changed, 51 insertions, 34 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index cca887a..a4c5e08 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -148,7 +148,7 @@ public abstract class BSPhysObject : PhysicsActor
148 // The asset state is first 'Unknown' then 'Waiting' then either 'Failed' or 'Fetched'. 148 // The asset state is first 'Unknown' then 'Waiting' then either 'Failed' or 'Fetched'.
149 public enum PrimAssetCondition 149 public enum PrimAssetCondition
150 { 150 {
151 Unknown, Waiting, Failed, Fetched 151 Unknown, Waiting, FailedAssetFetch, FailedMeshing, Fetched
152 } 152 }
153 public PrimAssetCondition PrimAssetState { get; set; } 153 public PrimAssetCondition PrimAssetState { get; set; }
154 154
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 423c389..dec6b6f 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -249,7 +249,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
249 TerrainManager.CreateInitialGroundPlaneAndTerrain(); 249 TerrainManager.CreateInitialGroundPlaneAndTerrain();
250 250
251 // Put some informational messages into the log file. 251 // Put some informational messages into the log file.
252 m_log.WarnFormat("{0} Linksets implemented with {1}", LogHeader, (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation); 252 m_log.InfoFormat("{0} Linksets implemented with {1}", LogHeader, (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation);
253 253
254 InTaintTime = false; 254 InTaintTime = false;
255 m_initialized = true; 255 m_initialized = true;
@@ -374,7 +374,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
374 } 374 }
375 else 375 else
376 { 376 {
377 m_log.WarnFormat("{0} Selected bullet engine {1} -> {2}/{3}", LogHeader, engineName, ret.BulletEngineName, ret.BulletEngineVersion); 377 m_log.InfoFormat("{0} Selected bullet engine {1} -> {2}/{3}", LogHeader, engineName, ret.BulletEngineName, ret.BulletEngineVersion);
378 } 378 }
379 379
380 return ret; 380 return ret;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 326fc9e..a780526 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -167,7 +167,7 @@ public abstract class BSShape
167 // Prevent trying to keep fetching the mesh by declaring failure. 167 // Prevent trying to keep fetching the mesh by declaring failure.
168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched) 168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
169 { 169 {
170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}", 171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}",
172 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 172 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}", 173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}",
@@ -177,7 +177,8 @@ public abstract class BSShape
177 { 177 {
178 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset 178 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset
179 if (prim.BaseShape.SculptEntry 179 if (prim.BaseShape.SculptEntry
180 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Failed 180 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.FailedAssetFetch
181 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.FailedMeshing
181 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting 182 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting
182 && prim.BaseShape.SculptTexture != OMV.UUID.Zero 183 && prim.BaseShape.SculptTexture != OMV.UUID.Zero
183 ) 184 )
@@ -219,7 +220,7 @@ public abstract class BSShape
219 } 220 }
220 if (!assetFound) 221 if (!assetFound)
221 { 222 {
222 yprim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 223 yprim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedAssetFetch;
223 } 224 }
224 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAssetCallback,found={1},isSculpt={2},ids={3}", 225 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAssetCallback,found={1},isSculpt={2},ids={3}",
225 yprim.LocalID, assetFound, yprim.BaseShape.SculptEntry, mismatchIDs ); 226 yprim.LocalID, assetFound, yprim.BaseShape.SculptEntry, mismatchIDs );
@@ -227,7 +228,7 @@ public abstract class BSShape
227 } 228 }
228 else 229 else
229 { 230 {
230 xprim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 231 xprim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedAssetFetch;
231 physicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}", 232 physicsScene.Logger.ErrorFormat("{0} Physical object requires asset but no asset provider. Name={1}",
232 LogHeader, physicsScene.Name); 233 LogHeader, physicsScene.Name);
233 } 234 }
@@ -235,13 +236,20 @@ public abstract class BSShape
235 } 236 }
236 else 237 else
237 { 238 {
238 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 239 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
239 { 240 {
240 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}", 241 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}",
241 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 242 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
242 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}", 243 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}",
243 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); 244 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
244 } 245 }
246 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
247 {
248 physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. obj={1}, texture={2}",
249 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
250 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,objNam={1},tex={2}",
251 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
252 }
245 } 253 }
246 } 254 }
247 255
@@ -374,7 +382,9 @@ public class BSShapeMesh : BSShape
374 382
375 // Check to see if mesh was created (might require an asset). 383 // Check to see if mesh was created (might require an asset).
376 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 384 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
377 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 385 if (!newShape.isNativeShape
386 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
387 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
378 { 388 {
379 // If a mesh was what was created, remember the built shape for later sharing. 389 // If a mesh was what was created, remember the built shape for later sharing.
380 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh. 390 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh.
@@ -519,7 +529,7 @@ public class BSShapeMesh : BSShape
519 else 529 else
520 { 530 {
521 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh. 531 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
522 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 532 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
523 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", 533 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
524 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name); 534 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
525 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey); 535 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
@@ -561,7 +571,9 @@ public class BSShapeHull : BSShape
561 571
562 // Check to see if hull was created (might require an asset). 572 // Check to see if hull was created (might require an asset).
563 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 573 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
564 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 574 if (!newShape.isNativeShape
575 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
576 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
565 { 577 {
566 // If a mesh was what was created, remember the built shape for later sharing. 578 // If a mesh was what was created, remember the built shape for later sharing.
567 Hulls.Add(newHullKey, retHull); 579 Hulls.Add(newHullKey, retHull);
@@ -1081,10 +1093,13 @@ public class BSShapeGImpact : BSShape
1081 // Check to see if mesh was created (might require an asset). 1093 // Check to see if mesh was created (might require an asset).
1082 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 1094 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
1083 newShape.shapeKey = newMeshKey; 1095 newShape.shapeKey = newMeshKey;
1084 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 1096 if (!newShape.isNativeShape
1097 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
1098 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
1085 { 1099 {
1086 // If a mesh was what was created, remember the built shape for later sharing. 1100 // If a mesh was what was created, remember the built shape for later sharing.
1087 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh. 1101 // Also note that if meshing failed we put it in the mesh list as there is nothing
1102 // else to do about the mesh.
1088 GImpacts.Add(newMeshKey, retGImpact); 1103 GImpacts.Add(newMeshKey, retGImpact);
1089 } 1104 }
1090 1105
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
index df1da63..1e01526 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
@@ -2,11 +2,6 @@ CURRENT PROBLEMS TO FIX AND/OR LOOK AT
2================================================= 2=================================================
3Script changing rotation of child prim while vehicle moving (eg turning wheel) causes 3Script changing rotation of child prim while vehicle moving (eg turning wheel) causes
4 the wheel to appear to jump back. Looks like sending position from previous update. 4 the wheel to appear to jump back. Looks like sending position from previous update.
5Vehicle ride, get up, ride again. Second time vehicle does not act correctly.
6 Have to rez new vehicle and delete the old to fix situation.
7Hitting RESET on Nebadon's vehicle while riding causes vehicle to get into odd
8 position state where it will not settle onto ground properly, etc
9Two of Nebadon vehicles in a sim max the CPU. This is new.
10Enable vehicle border crossings (at least as poorly as ODE) 5Enable vehicle border crossings (at least as poorly as ODE)
11 Terrain skirts 6 Terrain skirts
12 Avatar created in previous region and not new region when crossing border 7 Avatar created in previous region and not new region when crossing border
@@ -23,24 +18,17 @@ vehicle angular banking
23Center-of-gravity 18Center-of-gravity
24Vehicle angular deflection 19Vehicle angular deflection
25 Preferred orientation angular correction fix 20 Preferred orientation angular correction fix
26when should angular and linear motor targets be zeroed? when selected?
27 Need a vehicle.clear()? Or an 'else' in prestep if not physical.
28Teravus llMoveToTarget script debug 21Teravus llMoveToTarget script debug
29 Mixing of hover, buoyancy/gravity, moveToTarget, into one force 22 Mixing of hover, buoyancy/gravity, moveToTarget, into one force
30 Setting hover height to zero disables hover even if hover flags are on (from SL wiki) 23 Setting hover height to zero disables hover even if hover flags are on (from SL wiki)
31limitMotorUp calibration (more down?) 24limitMotorUp calibration (more down?)
32llRotLookAt 25llRotLookAt
33llLookAt 26llLookAt
34Avatars walking up stairs (HALF DONE) 27Convert to avatar mesh capsule. Include rotation of capsule.
35Avatar movement
36 flying into a wall doesn't stop avatar who keeps appearing to move through the obstacle (DONE)
37 walking up stairs is not calibrated correctly (stairs out of Kepler cabin) (DONE)
38 avatar capsule rotation completed (NOT DONE - Bullet's capsule shape is not the solution)
39Vehicle script tuning/debugging 28Vehicle script tuning/debugging
40 Avanti speed script 29 Avanti speed script
41 Weapon shooter script 30 Weapon shooter script
42Move material definitions (friction, ...) into simulator. 31Move material definitions (friction, ...) into simulator.
43Add material densities to the material types.
44One sided meshes? Should terrain be built into a closed shape? 32One sided meshes? Should terrain be built into a closed shape?
45 When meshes get partially wedged into the terrain, they cannot push themselves out. 33 When meshes get partially wedged into the terrain, they cannot push themselves out.
46 It is possible that Bullet processes collisions whether entering or leaving a mesh. 34 It is possible that Bullet processes collisions whether entering or leaving a mesh.
@@ -53,12 +41,8 @@ LINEAR_MOTOR_DIRECTION values should be clamped to reasonable numbers.
53 Same for other velocity settings. 41 Same for other velocity settings.
54UBit improvements to remove rubber-banding of avatars sitting on vehicle child prims: 42UBit improvements to remove rubber-banding of avatars sitting on vehicle child prims:
55 https://github.com/UbitUmarov/Ubit-opensim 43 https://github.com/UbitUmarov/Ubit-opensim
56Border crossing with linked vehicle causes crash
57 20121129.1411: editting/moving phys object across region boundries causes crash
58 getPos-> btRigidBody::upcast -> getBodyType -> BOOM
59Vehicles (Move smoothly) 44Vehicles (Move smoothly)
60Some vehicles should not be able to turn if no speed or off ground. 45Some vehicles should not be able to turn if no speed or off ground.
61What to do if vehicle and prim buoyancy differ?
62Cannot edit/move a vehicle being ridden: it jumps back to the origional position. 46Cannot edit/move a vehicle being ridden: it jumps back to the origional position.
63Neb car jiggling left and right 47Neb car jiggling left and right
64 Happens on terrain and any other mesh object. Flat cubes are much smoother. 48 Happens on terrain and any other mesh object. Flat cubes are much smoother.
@@ -68,8 +52,6 @@ For limitMotorUp, use raycast down to find if vehicle is in the air.
68Verify llGetVel() is returning a smooth and good value for vehicle movement. 52Verify llGetVel() is returning a smooth and good value for vehicle movement.
69llGetVel() should return the root's velocity if requested in a child prim. 53llGetVel() should return the root's velocity if requested in a child prim.
70Implement function efficiency for lineaar and angular motion. 54Implement function efficiency for lineaar and angular motion.
71After getting off a vehicle, the root prim is phantom (can be walked through)
72 Need to force a position update for the root prim after compound shape destruction
73Linkset explosion after three "rides" on Nebadon lite vehicle (LinksetConstraint) 55Linkset explosion after three "rides" on Nebadon lite vehicle (LinksetConstraint)
74Remove vehicle angular velocity zeroing in BSPrim.UpdateProperties(). 56Remove vehicle angular velocity zeroing in BSPrim.UpdateProperties().
75 A kludge that isn't fixing the real problem of Bullet adding extra motion. 57 A kludge that isn't fixing the real problem of Bullet adding extra motion.
@@ -78,11 +60,10 @@ Incorporate inter-relationship of angular corrections. For instance, angularDefl
78 creates over-correction and over-shoot and wabbling. 60 creates over-correction and over-shoot and wabbling.
79Vehicle attributes are not restored when a vehicle is rezzed on region creation 61Vehicle attributes are not restored when a vehicle is rezzed on region creation
80 Create vehicle, setup vehicle properties, restart region, vehicle is not reinitialized. 62 Create vehicle, setup vehicle properties, restart region, vehicle is not reinitialized.
63What to do if vehicle and prim buoyancy differ?
81 64
82GENERAL TODO LIST: 65GENERAL TODO LIST:
83================================================= 66=================================================
84Explore btGImpactMeshShape as alternative to convex hulls for simplified physical objects.
85 Regular triangle meshes don't do physical collisions.
86Resitution of a prim works on another prim but not on terrain. 67Resitution of a prim works on another prim but not on terrain.
87 The dropped prim doesn't bounce properly on the terrain. 68 The dropped prim doesn't bounce properly on the terrain.
88Add a sanity check for PIDTarget location. 69Add a sanity check for PIDTarget location.
@@ -359,4 +340,25 @@ Lock axis (DONE 20130401)
359Terrain detail: double terrain mesh detail (DONE) 340Terrain detail: double terrain mesh detail (DONE)
360Use the HACD convex hull routine in Bullet rather than the C# version. 341Use the HACD convex hull routine in Bullet rather than the C# version.
361 Speed up hullifying large meshes. (DONE) 342 Speed up hullifying large meshes. (DONE)
343Vehicle ride, get up, ride again. Second time vehicle does not act correctly.
344 Have to rez new vehicle and delete the old to fix situation.
345 (DONE 20130520: normalize rotations)
346Hitting RESET on Nebadon's vehicle while riding causes vehicle to get into odd
347 position state where it will not settle onto ground properly, etc
348 (DONE 20130520: normalize rotations)
349Two of Nebadon vehicles in a sim max the CPU. This is new.
350 (DONE 20130520: two problems: if asset failed to mesh, constantly refetched
351 asset; vehicle was sending too many messages to all linkset members)
352Add material densities to the material types. (WILL NOT BE DONE: not how it is done)
353Avatars walking up stairs (DONE)
354Avatar movement
355 flying into a wall doesn't stop avatar who keeps appearing to move through the obstacle (DONE)
356 walking up stairs is not calibrated correctly (stairs out of Kepler cabin) (DONE)
357 avatar capsule rotation completed (NOT DONE - Bullet's capsule shape is not the solution)
358After getting off a vehicle, the root prim is phantom (can be walked through)
359 Need to force a position update for the root prim after compound shape destruction
360 (DONE)
361Explore btGImpactMeshShape as alternative to convex hulls for simplified physical objects.
362 Regular triangle meshes don't do physical collisions.
363 (DONE: discovered GImpact is VERY CPU intensive)
362 364