BulletSim: when meshing or asset fetching fails, include position
and region with the offending object's name in the error message.cpu-performance
parent
9f8a8f3719
commit
3cb65f0d31
|
@ -168,10 +168,10 @@ public abstract class BSShape
|
||||||
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
|
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
|
||||||
{
|
{
|
||||||
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
|
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
|
||||||
physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}",
|
physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. prim={1}, texture={2}",
|
||||||
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
|
LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
|
||||||
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}",
|
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,prim={1},tex={2}",
|
||||||
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
|
prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -238,17 +238,17 @@ public abstract class BSShape
|
||||||
{
|
{
|
||||||
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
|
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
|
||||||
{
|
{
|
||||||
physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}",
|
physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. prim={1}, texture={2}",
|
||||||
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
|
LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
|
||||||
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}",
|
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,prim={1},tex={2}",
|
||||||
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
|
prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
|
||||||
}
|
}
|
||||||
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
|
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
|
||||||
{
|
{
|
||||||
physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. obj={1}, texture={2}",
|
physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. prim={1}, texture={2}",
|
||||||
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
|
LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
|
||||||
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,objNam={1},tex={2}",
|
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,prim={1},tex={2}",
|
||||||
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
|
prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,6 +260,19 @@ public abstract class BSShape
|
||||||
return fillShape.physShapeInfo;
|
return fillShape.physShapeInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String UsefulPrimInfo(BSScene pScene, BSPhysObject prim)
|
||||||
|
{
|
||||||
|
StringBuilder buff = new StringBuilder(prim.PhysObjectName);
|
||||||
|
buff.Append("/pos=");
|
||||||
|
buff.Append(prim.RawPosition.ToString());
|
||||||
|
if (pScene != null)
|
||||||
|
{
|
||||||
|
buff.Append("/rgn=");
|
||||||
|
buff.Append(pScene.Name);
|
||||||
|
}
|
||||||
|
return buff.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion // Common shape routines
|
#endregion // Common shape routines
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,8 +541,7 @@ public class BSShapeMesh : BSShape
|
||||||
{
|
{
|
||||||
// Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
|
// Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
|
||||||
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
|
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
|
||||||
physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
|
physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim={1}", LogHeader, UsefulPrimInfo(physicsScene, prim) );
|
||||||
LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
|
|
||||||
physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
|
physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
CURRENT PROBLEMS TO FIX AND/OR LOOK AT
|
CURRENT PROBLEMS TO FIX AND/OR LOOK AT
|
||||||
=================================================
|
=================================================
|
||||||
|
Vehicle buoyancy. Computed correctly? Possibly creating very large effective mass.
|
||||||
|
Interaction of llSetBuoyancy and vehicle buoyancy. Should be additive?
|
||||||
|
Negative buoyancy computed correctly
|
||||||
|
Computation of mesh mass. How done? How should it be done?
|
||||||
Script changing rotation of child prim while vehicle moving (eg turning wheel) causes
|
Script changing rotation of child prim while vehicle moving (eg turning wheel) causes
|
||||||
the wheel to appear to jump back. Looks like sending position from previous update.
|
the wheel to appear to jump back. Looks like sending position from previous update.
|
||||||
Enable vehicle border crossings (at least as poorly as ODE)
|
Enable vehicle border crossings (at least as poorly as ODE)
|
||||||
|
|
Loading…
Reference in New Issue