Difference between revisions of "Physics Cost test"

From Second Life Wiki
Jump to navigation Jump to search
Line 17: Line 17:
** <span style="background:#FFFF33">How do I attempt to create or upload a 267 hull decomposition?</span>
** <span style="background:#FFFF33">How do I attempt to create or upload a 267 hull decomposition?</span>


=== Test Physics Representation for Rezzed Prims ===
=== Boxes set to Convex Hull ===
* Create a linkset consisting of 10 boxes. Set one of them to have shape type Convex Hull (to trigger the new accounting)
* Arrange them and scale the linkset so that the overall linkset scale is 3m x 4m x 5m
* Verify the object is 2 prim equivalents.


* '''Verify''' a newly uploaded Meshes rezzes with the Physics Shape Type set to "Convex Hull".
=== Mesh model 1 ===
* '''Verify''' a mesh object uploaded without an explicit physics shape or decomposition cannot be changed to shape type Prim and will always be represented as a single convex hull bounding the mesh.
* Import/upload the duck model using a physics decomposition. Let's say the resulting decomposition has a physics cost of 13 prim equivalents (it did in my experiment)
* '''Verify''' no linkset or prim with a pure physics resource cost exceeding 32.0 may be set physical.
* After setting the duck to "PRIM" so that it uses the decomposition, the cost is 13
** <span style="background:#FFFF33">How can we see the pure physics resource cost?</span>
* Scale the duck to 10m x 10m x 10m.  
 
* Verify its physics cost is still 13
* '''Verify''' A prim or linkset will have a physics resource cost (PRC) computed if and only if at least one of the following is true:
* Set the duck Physical.  
1. It contains a mesh asset
* Verify its physics cost is 65 prim equivalents.
2. It contains a prim with a physics shape type other than "Prim"
 
* '''Verify''' a variety of objects have the right Physics Cost according to the following formula.
 
* PRC = = ∑ [ 0.1I + 0.2H + 0.04(V - 4H) + 0.1T (T / 100B) ]
* I = Number of perfect spheres, boxes and cylinders
* H = Number of convex hulls
* V = Number of vertices in hulls
* T = Number of triangles
* B = Volume of Bounding Box
 
# Determine the tentative PRC as the sum of the PRCs of all prims in a linkset, rounded to the nearest whole number.
# Determine the minimum SRC as one half of the number of prims in the linkset, rounding to the nearest whole number. If this number is less than 1, it is rounded to 1.
# The SRC is the greater of 1 and 2.  
 
* When Mesh Physics Shape type is set to Prim:
** Larger means decreased physics cost and Smaller means increased physics cost.
** Objects smaller than 0.2m on all sides should have a cost of 0.1 prims (and be represented as a box).
** Objects that have only 1 dimension smaller than 0.2m should behave and cost as though the user had set it to convex hull.
 
* When Mesh Physics Shape type is set to Convex Hull:
** Cost is the same at any scale.
** Objects smaller than 0.2m on all sides should have a cost of 0.1 prims (and be represented as a box).
 
* example
* example
* example
 
* '''Verify''' a prim with physics shape type "none" does not contribute to the pure PRC.
 
* example
 
 
    * A linkset is not allowed to cost less than 1/2 the number of prims. That's to account for basic work the sim has to do in handling the LLTasks
    * PurePhysicsCost will be the sum of the physics resource costs of the prims before rounding and before accounting for that 1/2 num prims limit on linksets. PurePhysicsCost will determine if you can make a linkset dynamic (e.g., a vehicle)
    * setting the root prim of a prim object to Convex Hull forces the object to use the new accounting system. Setting a child prim to None or Convex Hull does the same.
    * The "pure physics cost" must be < 32.0 before rounding to make the linkset physical.
    * Only the physics resource cost (not simulator resource cost or streaming cost) affects the ability to set an object physical.

Revision as of 15:32, 13 July 2011

Test Plan Name:

Physics Cost test

Sources

https://wiki.secondlife.com/wiki/Mesh/Mesh_physics

Purpose

Test the Physics Cost of prims, meshes and linked sets.

Tests

Verify the mesh asset is valid

  • Verify that a single convex hull is limited to 256 triangles.
    • How do I attempt to upload a 257 triangle mesh?
  • Verify that a decomposition cannot have more than 256 hulls.
    • How do I attempt to create or upload a 267 hull decomposition?

Boxes set to Convex Hull

  • Create a linkset consisting of 10 boxes. Set one of them to have shape type Convex Hull (to trigger the new accounting)
  • Arrange them and scale the linkset so that the overall linkset scale is 3m x 4m x 5m
  • Verify the object is 2 prim equivalents.

Mesh model 1

  • Import/upload the duck model using a physics decomposition. Let's say the resulting decomposition has a physics cost of 13 prim equivalents (it did in my experiment)
  • After setting the duck to "PRIM" so that it uses the decomposition, the cost is 13
  • Scale the duck to 10m x 10m x 10m.
  • Verify its physics cost is still 13
  • Set the duck Physical.
  • Verify its physics cost is 65 prim equivalents.