Blender Git Commit Log

Git Commits -> Revision 3a438c6

August 1, 2017, 07:10 (GMT)
Hair fiber (child hair) drawing during edit mode, with heavy GPU leveraging.

Hair drawing requires fairly large vertex buffers. Vertices also need to be interpolated
and displaced according to the control (parent) hairs and hair-style features like curling
and clumping.

Instead of doing this in advance on the CPU and uploading a large vertex buffer every frame,
this work can be done on the GPU for realtime display, because interpolation and displacement
are highly parallelizable. The vertex buffers then only need to be uploaded once (as long
as strand lengths remain the same). The vertex format can also be very lightweight, requiring
only a curve parameter and index (half the size needed for full positions).

For interpolating a buffer texture is used in the shader, which contains all information
about the control curves (parents) from which to interpolate final vertex positions.

Commit Details:

Full Hash: 3a438c675f590d13a95929f9da87c2fd4a95faa7
Parent Commit: 57cbaa1
Lines Changed: +1346, -65

4 Added Paths:

/source/blender/blenkernel/BKE_hair.h (+76, -0) (View)
/source/blender/blenkernel/intern/hair.c (+433, -0) (View)
/source/blender/draw/modes/shaders/hair_frag.glsl (+83, -0) (View)
/source/blender/draw/modes/shaders/hair_vert.glsl (+190, -0) (View)

16 Modified Paths:

/release/scripts/startup/bl_ui/space_view3d.py (+3, -0) (Diff)
/source/blender/blenkernel/BKE_editstrands.h (+23, -4) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+2, -0) (Diff)
/source/blender/blenkernel/intern/editstrands.c (+139, -7) (Diff)
/source/blender/draw/CMakeLists.txt (+2, -0) (Diff)
/source/blender/draw/intern/draw_cache.c (+6, -0) (Diff)
/source/blender/draw/intern/draw_cache.h (+4, -0) (Diff)
/source/blender/draw/intern/draw_cache_impl.h (+3, -0) (Diff)
/source/blender/draw/intern/draw_cache_impl_strands.c (+185, -19) (Diff)
/source/blender/draw/intern/draw_common.h (+9, -0) (Diff)
/source/blender/draw/modes/edit_strands_mode.c (+155, -26) (Diff)
/source/blender/draw/modes/shaders/edit_strands_vert.glsl (+0, -6) (Diff)
/source/blender/editors/hair/hair_object_particles.c (+2, -0) (Diff)
/source/blender/gpu/GPU_texture.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+10, -1) (Diff)
/source/blender/makesrna/intern/rna_sculpt_paint.c (+20, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021