Particle Info node for Cycles. This can be used to access particle information in...
authorLukas Toenne <lukas.toenne@googlemail.com>
Fri, 8 Jun 2012 16:17:57 +0000 (16:17 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Fri, 8 Jun 2012 16:17:57 +0000 (16:17 +0000)
commit5e1bbde01d0a77c7b032197cff860305462a9cb2
treef751a45ac32c7d210b5e54b5d0a9efab61e16d24
parent82d3d9f2ba47bbf2f868b5a970d1fe149eba13e2
Particle Info node for Cycles. This can be used to access particle information in material shaders for dupli objects. For now only the particle Age and individual Lifetime (in frames) are supported, more attributes can be added when needed.

The particle data is stored in a separate texture if any of the dupli objects uses particle info nodes in shaders. To map dupli objects onto particles the store an additional particle_index value, which is different from the simple dupli object index (only visible particles, also works for particle dupli groups mode).

Some simple use cases on the code.blender.org blog:
http://code.blender.org/index.php/2012/05/particle-info-node/
25 files changed:
intern/cycles/blender/CMakeLists.txt
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_particles.cpp [new file with mode: 0644]
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/kernel/kernel_object.h
intern/cycles/kernel/kernel_textures.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_geometry.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/object.cpp
intern/cycles/render/object.h
intern/cycles/render/scene.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/node.c
source/blender/makesdna/DNA_object_types.h
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/makesrna/intern/rna_object.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_shader.h
source/blender/nodes/shader/nodes/node_shader_particle_info.c [new file with mode: 0644]