利用者:DingTo/GSoC 2014/Proposal

提供: wiki
移動先: 案内検索

Proposal

I plan to improve the Cycles renderer, by improving its performance and memory usage. The items are from the official Optimization Ideas list, written by Brecht: http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Optimization

Deliverables

Low Level

  • See if we can use fast inverse sqrt instructions (SSE)
    in progress Inprogress50.jpg 50%
     
  • Add AVX2 kernel and see how much it helps
    done
     

Memory/Performance tradeoff

  • Compute face normal on the fly
    done
     
  • Store smooth normals only when used
    to do
     
  • Support uchar colors.
    done
     

Sampling

  • Avoid sending rays to sample black backgrounds
    in progress Inprogress50.jpg 50%
     

Project Details

General note: Some items on this list are not guaranteed to give noticeable performance/memory improvements. The only way to find out, is to implement these and check. If I quickly find out, that an item is a dead end or only makes things worse, I will go on to the next one and compensate with additional items from this list http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Optimization or as discussed with Brecht.

Fast inverse sqrt instructions (SSE)

We have some 1/sqrt(value) calculations in Cycles, see if we can speed this up by using SIMD instructions, while keeping an acceptable float precision.

Add AVX2 kernel

AVX2 was introduced with Intels Haswell, and will also be available in future AMD CPUs too. The deliverable is to add an AVX2 kernel to Cycles (we already have an AVX kernel) and test how much performance we can gain with a) compiler auto vectorisation and b) dedicated AVX2 instructions or FMA (Fused Multiply Add).

Compute face normal on the fly

The face normal can be computed on runtime (cross product), instead of storage and pre calculations. Performance/memory trade-off will be interesting here.

Store smooth normals only when used

Refactor the storage of smooth normals (which are saved for all meshes atm), to be available only when used. Probably this will be solved by using Cycles' attribute system.

Support uchar colors

Add support for uchar attributes in Cycles, for things like Vertex Colors, to reduce memory usage. Vertex colors are stored as floats currently.

Avoid sending rays to sample black backgrounds

Don't waste samples on black backgrounds (black color, strength set to 0, no background closure etc).