aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorRobert Adams2013-06-10 14:12:45 -0700
committerRobert Adams2013-06-10 14:12:45 -0700
commit795acaa6aa8e32ad0281226208a6b1bbc2292bf5 (patch)
tree1f70c5072960f50233cab5d6942f96620d5df4ed /OpenSim/Region/Physics
parentRemove Temporary from use to shortcut asset stores. The Local property (diff)
downloadopensim-SC_OLD-795acaa6aa8e32ad0281226208a6b1bbc2292bf5.zip
opensim-SC_OLD-795acaa6aa8e32ad0281226208a6b1bbc2292bf5.tar.gz
opensim-SC_OLD-795acaa6aa8e32ad0281226208a6b1bbc2292bf5.tar.bz2
opensim-SC_OLD-795acaa6aa8e32ad0281226208a6b1bbc2292bf5.tar.xz
BulletSim: add failure flag for meshing failure vs asset fetch failure
so error messages make more sense. Change some BulletSim status log messages from WARN to INFO. Update TODO list.
Diffstat (limited to 'OpenSim/Region/Physics')
-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 867d2ab..202a4ce 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.
@@ -517,7 +527,7 @@ public class BSShapeMesh : BSShape
517 else 527 else
518 { 528 {
519 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh. 529 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
520 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed; 530 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
521 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", 531 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
522 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name); 532 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
523 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey); 533 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
@@ -559,7 +569,9 @@ public class BSShapeHull : BSShape
559 569
560 // Check to see if hull was created (might require an asset). 570 // Check to see if hull was created (might require an asset).
561 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 571 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
562 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 572 if (!newShape.isNativeShape
573 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
574 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
563 { 575 {
564 // If a mesh was what was created, remember the built shape for later sharing. 576 // If a mesh was what was created, remember the built shape for later sharing.
565 Hulls.Add(newHullKey, retHull); 577 Hulls.Add(newHullKey, retHull);
@@ -1079,10 +1091,13 @@ public class BSShapeGImpact : BSShape
1079 // Check to see if mesh was created (might require an asset). 1091 // Check to see if mesh was created (might require an asset).
1080 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 1092 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
1081 newShape.shapeKey = newMeshKey; 1093 newShape.shapeKey = newMeshKey;
1082 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 1094 if (!newShape.isNativeShape
1095 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing
1096 || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
1083 { 1097 {
1084 // If a mesh was what was created, remember the built shape for later sharing. 1098 // If a mesh was what was created, remember the built shape for later sharing.
1085 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh. 1099 // Also note that if meshing failed we put it in the mesh list as there is nothing
1100 // else to do about the mesh.
1086 GImpacts.Add(newMeshKey, retGImpact); 1101 GImpacts.Add(newMeshKey, retGImpact);
1087 } 1102 }
1088 1103
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