aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDahlia Trimble2009-04-19 01:21:38 +0000
committerDahlia Trimble2009-04-19 01:21:38 +0000
commit5f1fa0d3d766d600421321889d49ab9a2f254ed6 (patch)
tree22d04a2bee4f34f6067524b8d9c8fa024612acf1
parentThank you kindly, MCortez, for a patch that: (diff)
downloadopensim-SC_OLD-5f1fa0d3d766d600421321889d49ab9a2f254ed6.zip
opensim-SC_OLD-5f1fa0d3d766d600421321889d49ab9a2f254ed6.tar.gz
opensim-SC_OLD-5f1fa0d3d766d600421321889d49ab9a2f254ed6.tar.bz2
opensim-SC_OLD-5f1fa0d3d766d600421321889d49ab9a2f254ed6.tar.xz
Added a "force_simple_prim_meshing" option to the ODE settings in OpenSim.ini which will use meshes for collisions with simple prim shapes rather than internal ODE algorithms. This may help with Mantis #2905 and Mantis #3487 for those experimenting with capsule settings.
Note that this will increase memory usage and region startup time.
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs43
-rw-r--r--bin/OpenSim.ini.example10
2 files changed, 28 insertions, 25 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 9451ad9..1abedf5 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -184,6 +184,7 @@ namespace OpenSim.Region.Physics.OdePlugin
184 private float minimumGroundFlightOffset = 3f; 184 private float minimumGroundFlightOffset = 3f;
185 185
186 public bool meshSculptedPrim = true; 186 public bool meshSculptedPrim = true;
187 public bool forceSimplePrimMeshing = false;
187 188
188 public float meshSculptLOD = 32; 189 public float meshSculptLOD = 32;
189 public float MeshSculptphysicalLOD = 16; 190 public float MeshSculptphysicalLOD = 16;
@@ -408,6 +409,7 @@ namespace OpenSim.Region.Physics.OdePlugin
408 bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f); 409 bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f);
409 bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f); 410 bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f);
410 411
412 forceSimplePrimMeshing = physicsconfig.GetBoolean("force_simple_prim_meshing", forceSimplePrimMeshing);
411 meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true); 413 meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true);
412 meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f); 414 meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f);
413 MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f); 415 MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f);
@@ -1429,18 +1431,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1429 PhysicsActor result; 1431 PhysicsActor result;
1430 IMesh mesh = null; 1432 IMesh mesh = null;
1431 1433
1432 //switch (pbs.ProfileShape)
1433 //{
1434 // case ProfileShape.Square:
1435 // //support simple box & hollow box now; later, more shapes
1436 // if (needsMeshing(pbs))
1437 // {
1438 // mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
1439 // }
1440
1441 // break;
1442 //}
1443
1444 if (needsMeshing(pbs)) 1434 if (needsMeshing(pbs))
1445 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); 1435 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
1446 1436
@@ -2152,23 +2142,26 @@ namespace OpenSim.Region.Physics.OdePlugin
2152 } 2142 }
2153 2143
2154 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim 2144 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
2155 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) 2145 if (!forceSimplePrimMeshing)
2156 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1 2146 {
2157 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z)) 2147 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
2158 { 2148 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
2159 2149 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z))
2160 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
2161 && pbs.ProfileHollow == 0
2162 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
2163 && pbs.PathBegin == 0 && pbs.PathEnd == 0
2164 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
2165 && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
2166 && pbs.PathShearX == 0 && pbs.PathShearY == 0)
2167 { 2150 {
2151
2152 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
2153 && pbs.ProfileHollow == 0
2154 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
2155 && pbs.PathBegin == 0 && pbs.PathEnd == 0
2156 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
2157 && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
2158 && pbs.PathShearX == 0 && pbs.PathShearY == 0)
2159 {
2168#if SPAM 2160#if SPAM
2169 m_log.Warn("NonMesh"); 2161 m_log.Warn("NonMesh");
2170#endif 2162#endif
2171 return false; 2163 return false;
2164 }
2172 } 2165 }
2173 } 2166 }
2174 2167
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 27aa5e0..8612875 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -569,6 +569,16 @@
569 ; (see NINJA Physics documentation, http://opensimulator.org/wiki/NINJA_Physics) 569 ; (see NINJA Physics documentation, http://opensimulator.org/wiki/NINJA_Physics)
570 ; default is false 570 ; default is false
571 ;use_NINJA_physics_joints = true 571 ;use_NINJA_physics_joints = true
572
573 ; ##
574 ; ## additional meshing options
575 ; ##
576
577 ; physical collision mesh proxies are normally created for complex prim shapes, and collisions for simple boxes and
578 ; spheres are computed algorithmically. If you would rather have mesh proxies for simple prims, you can set this to
579 ; true. Note that this will increase memory usage and region startup time. Default is false.
580 ;force_simple_prim_meshing = true
581
572 582
573 583
574[RemoteAdmin] 584[RemoteAdmin]