User:Nyx Linden/Revisiting Render Cost

From Second Life Wiki
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.

"Render Weight"

(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. Base cost is a weighted average of the number of triangles times 5. Triangle count is weighted by the count of triangles at each LOD and the area each LOD is visible from, giving the average number of triangles visible within the visible range of the object. This uses the same distribution function as the streaming cost code, but left in terms of triangles, not scaled to prims.
    2. This is the base cost for regular prims, sculpties, and mesh prims.
  3. Multipliers (per prim)
    1. glow x1.5
    2. bump x1.25
    3. flexi x5
    4. shiny x1.6
    5. invisiprims x1.2
    6. rigged mesh x1.2
    7. planar mapped x1.0 (negligible impact)
    8. animated textures x1.4
    9. alpha x4.0
  4. additions
    1. particles: + 100 points per prim
    2. light emitting prims: + 500 points per prim
    3. media-enabled faces: + 1500 points per face
    4. for each unique texture (including sculpt textures) in the linkset: + 256 + 16 * (resX/128 + resY/128)
SL 3.0 These are placeholder costs. Don't rely on them.
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 + 4x Revolutions
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!


SL 3.something - when the new costs are implemented.
Display weight = object streaming cost * 83.333333 * multipliers + additions.
ring 0.5m ^3 = ring streaming cost [0.1] * 83.333333 * multipliers [1] + texture [5 * (256/128 + 256/128 + 1)] = 392
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 + 4x Revolutions
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