Blender Git Loki

Git Commits -> Revision c8b831d

March 31, 2015, 14:52 (GMT)
Cycles: Point density texture experiment

This commit implements point density texture for Cycles shading nodes.

It's done via creating voxel texture at shader compilation time, Not
totally memory efficient, but avoids adding sampling code to kernel
(which keeps render time as low as possible), In the future this will
be compensated by using OpenVDB for more efficient storage of sparse
volume data.

Sampling of the voxel texture is happening at blender side and the
same code is used as for Blender Internal's renderer.

This texture is controlled by only object, particle system and radius.
Linear falloff is used and there's no turbulence. This is because
falloff is expected to happen using Curve Mapping node. Turbulence
will be done as a distortion on the input coordinate. It's already
possible to fake it using nose textures and in the future we can add
more proper turbulence distortion node, which then could also be used
for 2D texture mapping.

OSL is not currently supported. There's no actual stoppers for support
it, but so far it's not really a priority at this point.

Reviewers: campbellbarton, juicyfruit, brecht

Subscribers: campbellbarton, dingto, eyecandy

Differential Revision:

Commit Details:

Full Hash: c8b831d742b064c44f7a4c1a208b57dae06fa0a9
Parent Commit: 79918e0
Lines Changed: +797, -11

4 Added Paths:

/intern/cycles/blender/blender_texture.cpp (+111, -0) (View)
/intern/cycles/blender/blender_texture.h (+31, -0) (View)
/intern/cycles/kernel/svm/svm_voxel.h (+56, -0) (View)
/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c (+74, -0) (View)

23 Modified Paths:

/intern/cycles/blender/addon/ (+2, -1) (Diff)
/intern/cycles/blender/blender_session.cpp (+23, -0) (Diff)
/intern/cycles/blender/blender_shader.cpp (+27, -0) (Diff)
/intern/cycles/blender/CMakeLists.txt (+2, -0) (Diff)
/intern/cycles/kernel/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/kernel/svm/svm.h (+5, -1) (Diff)
/intern/cycles/kernel/svm/svm_types.h (+7, -1) (Diff)
/intern/cycles/render/nodes.cpp (+102, -0) (Diff)
/intern/cycles/render/nodes.h (+23, -0) (Diff)
/release/scripts/startup/ (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_texture.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/node.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/particle_system.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/texture.c (+6, -4) (Diff)
/source/blender/editors/space_node/drawnode.c (+23, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+21, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+154, -0) (Diff)
/source/blender/nodes/CMakeLists.txt (+1, -0) (Diff)
/source/blender/nodes/NOD_shader.h (+1, -0) (Diff)
/source/blender/nodes/NOD_static_types.h (+1, -0) (Diff)
/source/blender/render/extern/include/RE_render_ext.h (+6, -0) (Diff)
/source/blender/render/intern/source/pointdensity.c (+116, -3) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021