User:Nyx Linden/Revisiting Render Cost

From Second Life Wiki
< User:Nyx Linden
Revision as of 11:14, 20 December 2010 by Nyx Linden (talk | contribs) (Created page with "Rendering "Cost" is a difficult metric to compute and historically has been only of moderate usefulness.<br> With the advent of mesh, it is time to re-think how we measure render…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Rendering "Cost" is a difficult metric to compute and historically has been only of moderate usefulness.
With the advent of mesh, it is time to re-think how we measure rendering load of various pieces of content. As such, we're reviewing the algorithms used to compute render "cost". You can see a summary of changes below:

1.23 and prior:

  1. 1 point for the base avatar
  2. 10 points for each *attachment*
  3. 5 points for each unique texture (on prims).
  4. 1 point for each invisiprim.
  5. 1 point for each prim with glow. (If Glow value is set higher than 0.0 in Texture tab of the build tools)
  6. 1 point for each prim with shininess. (If Shininess is other than "None" in Texture tab of the build tools)
  7. 1 point for each face of every prim that's planar-mapped. (If Mapping is "Planar" in Texture tab of the build tools)
  8. 1 point per meter, per axis, for each prim.
  9. This most often affects skirts, capes, long hair, large wings and long tails.
  10. 4 points for each prim with bump mapping. (If Bumpiness is other than "None" in Texture tab of the build tools)
  11. 4 points for each prim face with transparency.
  12. 4 points for each prim face with an animated texture.
  13. 8 points for each prim that's flexible.
  14. 16 points for each prim that emits particles.

2.X :

  1. 100 point for the base avatar
    1. (-20 points for each baked texture marked invisible)
  2. 10 points for each *prim*
  3. 5 points for each unique texture (on prims).
  4. 1 point for each invisiprim.
  5. 1 point for each prim with glow. (If Glow value is set higher than 0.0 in Texture tab of the build tools)
  6. 1 point for each prim with shininess. (If Shininess is other than "None" in Texture tab of the build tools)
  7. 1 point for each face of every prim that's planar-mapped. (If Mapping is "Planar" in Texture tab of the build tools)
  8. 1 point per meter, per axis, for each prim.
  9. This most often affects skirts, capes, long hair, large wings and long tails.
  10. 4 points for each prim with bump mapping. (If Bumpiness is other than "None" in Texture tab of the build tools)
  11. 4 points for each prim face with transparency.
  12. 4 points for each prim face with an animated texture.
  13. 8 points for each prim that's flexible.
  14. 16 points for each prim that emits particles.

Post-Mesh:

(calculated by category in order; Base avatar then Base cost then Modifiers, etc. Result is rounded down)

  1. 1000 points for the base avatar
    1. (-200 points for each baked texture marked invisible)
  2. Base cost
    1. Normal prims: 10 points per prim
    2. Meshes: 1 point for every 4 bytes of high LOD data for normal meshes, 1 point for every 3 bytes for weighted attachments
  3. Modifiers
    1. Cuts (modified begin/end for either path or profile cut) +1 point per field modified
    2. planar mapped textures +1 point per face
    3. animated textures +4 point per face
    4. alpha textures +4 points per face
    5. invisiprims +1 point per face
  4. Multipliers
    1. hollow - x2
    2. circular profile x2
    3. circular path x2
    4. glow x2
    5. bump x2
    6. shiny x2
    7. flexi x4
    8. sculpties x8 (equivalent to a hollow torus - hollow * circular profile * circular path) + cost of sculpt texture
    9. twist - xN where N = (twist / 90) (min 1, max 4)
    10. scale - xN where N = floor(scale_x + scale_y + scale_z), with a maximum of 4, min 1
    11. revolutions - xN where N = number of revolutions (max 4, min 1)
  5. additions
    1. particles - 100 points per prim
    2. for each unique texture - 5 * (resX/128 + resY/128 + 1)
Examples:
ring 75 = 10(prim) *1.5(sum of sides, min 1, max 4)*2+45(textures)
tube 75 = 10(prim) *1.5(sum of sides, min 1, max 4)*2+45(textures)
torus 105 = 10(prim)*1.5(sum of sides, min 1, max 4)*2*2+45(textures)
hemisphere 111 = 10(prim)+1(cut)*1.5(sides, min 1, max 4)*2*2+45(textures)
sphere 105 sphere  =  10 (prim) * 1.5 (scale) * 2 *2 + 45 (tex)
half-cone 78 = 10(prim)+1(cut)*1.5(sides, min 1, max 4)*2+45(textures)
cone 75 = 10(prim)*1.5(sides, min 1, max 4)*2+45(textures)
half-cylinder 78 = 10(prim)+1(cut)*1.5(sides, min 1, max 4)*2+45(textures)
cylinder 75 = 10(prim)*1.5(sides, min 1, max 4)*2+45(textures)
tetrahedron 60 = 10(prim)  *1.5(sum of sides, min 1, max 4) + 45(textures)
pyramid 60 = 10(prim)  *1.5(sum of sides, min 1, max 4) + 45(textures)
prism 60 = 10(prim)  *1.5(sum of sides, min 1, max 4) + 45(textures)
box 60 = 10(prim)  *1.5(sum of sides, min 1, max 4) + 45(textures)
two linked spheres 210
box with 32x32 texture 22 = 10(prim)  *(.5+.5+.5)(scale) + 7.5(textures)
sphere with dimple & cut 117 = (10 "prim" +1+1)* 1.5 "scale" * 2 *2 + 45 "tex"
sphere with dimple 111 = (10"prim" +1)* 1.5 "scale" * 2 *2 + 45 "tex"
cube with 180 twist 75 = 10(prim)  *(.5+.5+.5) *2 (twist) + 45(textures)
cube with begin and end 5 degree twist 60 = 10(prim)  *(.5+.5+.5) *1 (twist) + 45(textures)
cube with 360 twist 105 = 10(prim)  *(.5+.5+.5) *4 (twist) + 45(textures)
box with 2 planar mapped sides 63 = (10 "prim" +1+1)* 1.5 "scale" + 45 "tex"
59 = box with 1 animated texture , (10 "prim" +4)* 1 "scale" + 45 "tex"
66 = box w/ 1 alpha texture, 10"prim" +4 *1.5(sum of sides, min 1, max 4) + 45(textures)
147 or 157 sphere invisiprim, (10"prim" +1 invisiprim) * 1.5 (scale) *4 sphere *2 bump + 25 (tex)
165 hollow sphere  =  10 (prim) * 1.5 (scale) *4 *2+ 45 (tex)
75 hollow ring = 10(prim) *1.5 scale *2 *2 +45 texture
sphere + hollow - 125
285 = sphere + hollow + glow , 10 (prim) * 1.5 (scale) *4 *2 *2+ 45 (tex)
525 = sphere + hollow + glow + bump
1005 = sphere + hollow + glow + bump +shiny
1005 = cube + hollow + glow + bump +shiny + flexi
175 sculpty  = 10 * 1.5 *8 (sculpt) + 45 tex + 10 sculpt tex
1965 = cube + hollow + glow + bump +shiny + flexi + twist 180
3885 = cube + hollow + glow + bump +shiny + flexi + twist 360
285 = torus + twist x4
65 = box 0.5 x 0.5 x 1.0
75 = box 0.5 x 0.5 x 2.0
85 = box 0.5 x 0.5 x 3.0
85 = box 0.5 x 0.5 x 4.0
160 = box w/ particles
525 = box w/ 6 unique 1024x1024 textures

Testing Procedure for tweaking values

Post-mesh launch, ARC is going to be generalized and the new algorithm renamed (render complexity? visual complexity?). The new algorithm (above) will be able to be applied easily to both avatars and non-avatar content in-world. The new algorithm should take into account multiple factors that were left out in previous iterations. While it is more complex to describe where "cost" comes from in this case, it should be more representative of the graphical load that content presents. That being said, there is no guarantee that the current values given from the algorithm are representative of the performance impact.

As such, the weighting factors of each property of the algorithm need to be tested under controlled conditions to ensure that the relative weights are correct for the algorithm. As such, we will be conducting a series of performance tests to get the algorithm correctly tweaked. More details soon!