Cycles microdisplacement: ngons and attributes for subdivision meshes
authorMai Lavelle <mai.lavelle@gmail.com>
Sat, 16 Jul 2016 23:42:28 +0000 (19:42 -0400)
committerMai Lavelle <mai.lavelle@gmail.com>
Fri, 29 Jul 2016 07:36:30 +0000 (03:36 -0400)
commitc96ae81160ad1a943fafaca44a7d5e97c2d7a0d7
tree83905d5a6bf2583f44d9dcf90410b5a0c024822c
parentf74645578c9dd38c2543d1211b779a019363b04f
Cycles microdisplacement: ngons and attributes for subdivision meshes

This adds support for ngons and attributes on subdivision meshes. Ngons are
needed for proper attribute interpolation as well as correct Catmull-Clark
subdivision. Several changes are made to achieve this:

- new primitive `SubdFace` added to `Mesh`
- 3 more textures are used to store info on patches from subd meshes
- Blender export uses loop interface instead of tessface for subd meshes
- `Attribute` class is updated with a simplified way to pass primitive counts
  around and to support ngons.
- extra points for ngons are generated for O(1) attribute interpolation
- curves are temporally disabled on subd meshes to avoid various bugs with
  implementation
- old unneeded code is removed from `subd/`
- various fixes and improvements

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2108
30 files changed:
intern/cycles/app/cycles_xml.cpp
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_util.h
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/geom/geom.h
intern/cycles/kernel/geom/geom_attribute.h
intern/cycles/kernel/geom/geom_primitive.h
intern/cycles/kernel/geom/geom_subd_triangle.h [new file with mode: 0644]
intern/cycles/kernel/kernel_textures.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/svm/svm_attribute.h
intern/cycles/kernel/svm/svm_image.h
intern/cycles/render/CMakeLists.txt
intern/cycles/render/attribute.cpp
intern/cycles/render/attribute.h
intern/cycles/render/mesh.cpp
intern/cycles/render/mesh.h
intern/cycles/render/mesh_subdivision.cpp [new file with mode: 0644]
intern/cycles/render/scene.h
intern/cycles/subd/CMakeLists.txt
intern/cycles/subd/subd_dice.cpp
intern/cycles/subd/subd_dice.h
intern/cycles/subd/subd_mesh.cpp [deleted file]
intern/cycles/subd/subd_mesh.h [deleted file]
intern/cycles/subd/subd_patch.cpp
intern/cycles/subd/subd_patch.h
intern/cycles/subd/subd_split.cpp
intern/cycles/subd/subd_split.h
intern/cycles/util/util_math.h