Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1487)

Issue 6242069: Particle Info node for Cycles

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 3 months ago by lukas.toenne
Modified:
7 years, 3 months ago
Reviewers:
bf-codereview, brechtvl
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

Adds a new "Particle Info" node for cycles, to allow using particle data in shaders. For now only Age and total Lifetime are supported, but can be extended easily as required. Test render: http://www.youtube.com/watch?v=QvATUlmguyk The particles from all object psys are first converted into an array in the Cycles object. Then the data is stored in a separate particles texture on the device. For mapping dupli objects back onto particles they store an additional particle_id number. This number is then used to look up the particle data from the particle device texture.

Patch Set 1 #

Total comments: 13

Patch Set 2 : Improvements suggested by Brecht #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+461 lines, -50 lines) Patch
intern/cycles/blender/CMakeLists.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
intern/cycles/blender/blender_object.cpp View 1 3 chunks +23 lines, -20 lines 0 comments Download
intern/cycles/blender/blender_particles.cpp View 1 1 chunk +158 lines, -0 lines 0 comments Download
intern/cycles/blender/blender_shader.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download
intern/cycles/blender/blender_sync.h View 1 1 chunk +4 lines, -1 line 0 comments Download
intern/cycles/kernel/kernel_object.h View 1 1 chunk +25 lines, -0 lines 0 comments Download
intern/cycles/kernel/kernel_textures.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
intern/cycles/kernel/kernel_types.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
intern/cycles/kernel/svm/svm.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
intern/cycles/kernel/svm/svm_geometry.h View 1 1 chunk +22 lines, -0 lines 0 comments Download
intern/cycles/kernel/svm/svm_types.h View 1 2 chunks +7 lines, -1 line 0 comments Download
intern/cycles/render/nodes.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
intern/cycles/render/nodes.cpp View 1 1 chunk +41 lines, -0 lines 0 comments Download
intern/cycles/render/object.h View 1 3 chunks +9 lines, -0 lines 0 comments Download
intern/cycles/render/object.cpp View 1 7 chunks +44 lines, -1 line 2 comments Download
intern/cycles/render/scene.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/blenkernel/BKE_node.h View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/blenkernel/intern/anim.c View 1 24 chunks +34 lines, -27 lines 0 comments Download
source/blender/blenkernel/intern/node.c View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/makesdna/DNA_object_types.h View 1 1 chunk +9 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_nodetree_types.h View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_object.c View 1 1 chunk +10 lines, -0 lines 0 comments Download
source/blender/nodes/CMakeLists.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/nodes/NOD_shader.h View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/nodes/shader/nodes/node_shader_particle_info.c View 1 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 7
lukas.toenne
7 years, 3 months ago (2012-05-30 14:23:28 UTC) #1
brechtvl
Thanks for the patch, node setups with this kind of data could be pretty powerful. ...
7 years, 3 months ago (2012-06-01 14:33:32 UTC) #2
lukas.toenne
Improvements suggested by Brecht
7 years, 3 months ago (2012-06-08 10:57:51 UTC) #3
lukas.toenne
http://codereview.appspot.com/6242069/diff/1/intern/cycles/blender/blender_object.cpp File intern/cycles/blender/blender_object.cpp (right): http://codereview.appspot.com/6242069/diff/1/intern/cycles/blender/blender_object.cpp#newcode274 intern/cycles/blender/blender_object.cpp:274: sync_particles(object, b_ob); On 2012/06/01 14:33:32, brechtvl wrote: > This ...
7 years, 3 months ago (2012-06-08 10:59:04 UTC) #4
brechtvl
Besides one comment, LGTM. http://codereview.appspot.com/6242069/diff/11001/intern/cycles/render/object.cpp File intern/cycles/render/object.cpp (right): http://codereview.appspot.com/6242069/diff/11001/intern/cycles/render/object.cpp#newcode150 intern/cycles/render/object.cpp:150: /* XXX why using OBJECT_SIZE ...
7 years, 3 months ago (2012-06-08 15:24:24 UTC) #5
lukas.toenne
http://codereview.appspot.com/6242069/diff/11001/intern/cycles/render/object.cpp File intern/cycles/render/object.cpp (right): http://codereview.appspot.com/6242069/diff/11001/intern/cycles/render/object.cpp#newcode150 intern/cycles/render/object.cpp:150: /* XXX why using OBJECT_SIZE for flag texture as ...
7 years, 3 months ago (2012-06-08 16:04:36 UTC) #6
brechtvl
7 years, 3 months ago (2012-06-08 16:09:41 UTC) #7
Ah, you're right, the object_flag array is too big, doesn't need the OBJECT_SIZE
multiplier.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b