Mesh/Mesh Accounting Test

From Second Life Wiki
< Mesh
Revision as of 14:33, 10 December 2010 by Bea Linden (talk | contribs) (→‎See Also)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Glossary

  • Streaming Cost - cost of streaming mesh assets to clients, see Mesh Streaming Cost
  • Physics Cost - cost of performing physical simulation of object on simulator, see Mesh Physics
  • Resource Cost - amount of "prims" an object takes up when rezzed on a parcel (currently, Streaming OR Physics Cost, whichever is greater)
  • Object Cost - a synonym for Resource Cost
  • Render Cost - performance hit incurred by rendering, for informational purposes only, not used for accounting

Note: In UI, Object Cost is displayed as [Object Cost]/[Physics Cost]. If Object Cost is equal to physics cost, the object's physics cost is greater than its streaming cost, so physics cost is used as the object cost. If Object Cost is greater than Physics Cost, the object's streaming cost is greater than its physics cost, so streaming cost is used as the object cost. The only reason Physics Cost is displayed separately is because if an object's physics cost is greater than 32, it cannot be made physical or used as a vehicle, so residents need a way to view physics cost independently of resource cost.

Resource Cost Testing

  • Using a mesh enabled viewer and connected to a mesh enabled sim, enable the render info debug display (develop->show info->show render info).
  • Select a mesh object.
    • Verify: Selected mesh triangle count and streaming cost should be reflected in debug display
  • Edit a mesh object
    • Verify: "Resource Cost" information is be displayed in edit tool, including overall object cost and physics cost
    • Verify: "Resource Cost" may be higher than physics cost, indicating the object's cost is bound by streaming cost (scale up a mesh object set to Physics Shape type = Prim to see this)
    • Verify: "Resource Cost" may be equal or nearly equal to physics cost, indicating the object's cost is bound by physics cost (scale down a mesh object set to Physics Shape type = Prim to see this)

Physics Cost vs Streaming Cost

  • Select a mesh object that has a mesh based physics representation and set its physics shape type to "Prim"
  • Scale object down until the reported physics cost increases and the object cost is bound by physics (ie. the 2 costs are equal)
  • Change the object's physics shape type to "Convex Hull"
    • Verify: the object's cost should be similar to the streaming cost reported in the streaming cost debug display, indicating the object is bound by streaming cost

Prim parcel limits

  • Attempt to exceed a parcel's prim limit using mesh objects of varying cost characteristics (some physics bound, some streaming bound).
    • Observe: mesh objects should be returned when the parcel limit is reached, just like normal prims

Scale Limits (unimplemented)

  • Attempt to exceed a parcel's prim limit by scaling an existing prim (either by scaling an object too large to overflow via streaming cost or scaling a mesh based physics representation too small to overflow physics cost).
    • Observe: scale operation should clamp scale to lowest/highest limit without overflowing the parcel limit
    • Observe: Scripted scale calls should behave similarly.

Evaluation of Efficacy

The goal of the mesh streaming cost algorithm is to prevent a single scene from exceeding the polygon budget. At the very least, it should not be possible to create a mesh based build that causes more triangles per frame to be rendered than an equivalent prim based build. Ideally, the mesh streaming cost algorithm should achieve no more than 250K triangles per frame from inworld geometry with graphics preferences set to "High." To test, you can compare streaming cost of mesh objects vs similar prim objects using the debug display described above, or you can disable all rendering types besides prims/alpha and observe the number of triangles per frame reported in the statistics floater.

  • Identify a typical triangle count to resource cost ratio for prim based objects by surveying existing popular builds.
  • Document range of typical triangle count to resource cost ratio
  • Verify that mesh base assets do not exceed this ratio.

Observe: Triangle count to resource cost ratio of mesh based object should be similar to or much less than prim based objects. That is, prim based objects should have a lower triangle count for a similar resource cost.

  • Verify 1000 prims worth of ducks should have less triangles than 1000 spheres.

See Also