Vector displacement for the sculpting draw brush #104481

Merged
Jeroen Bakker merged 18 commits from robin.hohni/blender:sculpt-vector-displacement into main 2023-02-14 15:29:40 +01:00

18 Commits

Author SHA1 Message Date
Robin Hohnsbeen 2753cc0ee2 Cleaned up texture size computation and added comments 2023-02-13 09:36:07 +01:00
Robin Hohnsbeen 3564b4504f One more struct keyword removed 2023-02-10 20:57:35 +01:00
Robin Hohnsbeen 36fa56bd11 Removed unnecessary struct keyword 2023-02-10 20:45:59 +01:00
Robin Hohnsbeen 121cca227e Merge branch 'main' into sculpt-vector-displacement
# Conflicts:
#	source/blender/editors/sculpt_paint/sculpt_intern.hh
2023-02-10 20:30:02 +01:00
Robin Hohnsbeen cf6502f04c Applied clang format 2023-02-10 19:53:35 +01:00
Robin Hohnsbeen 964afd48e1 Fixed brush inversion 2023-02-09 21:58:36 +01:00
Robin Hohnsbeen a4b83842c4 Merge branch 'main' into sculpt-vector-displacement 2023-02-08 19:28:41 +01:00
Robin Hohnsbeen 577a437c66 Changed order of includes because of comment 2023-01-24 21:12:09 +01:00
Robin Hohnsbeen 30b0063f36 Improved code style and removed function paint_get_tex_pixel_color_with_clamp 2023-01-24 21:04:02 +01:00
Robin Hohnsbeen 3528f8a955 Reverted changes for masking in SCULPT_brush_strength_factor 2023-01-24 11:10:16 +01:00
Robin Hohnsbeen ed74933f2b Fixed comment for brush_local_mat 2023-01-24 11:08:35 +01:00
Robin Hohnsbeen e18f7440cb Reverted unnecessary formatting changes and includes 2023-01-23 23:26:10 +01:00
Robin Hohnsbeen 3cea9dd4a1 Sculpt: Apply texture size to displacement vector and use strength on all vector components 2023-01-23 23:14:58 +01:00
Robin Hohnsbeen 5ca7ce0752 Sculpt: Reduced modified files for patch and included feedback 2023-01-23 22:36:24 +01:00
Robin Hohnsbeen 696c8fe263 Sculpt: Undo changes to mtex and threadid in brush_factor method 2023-01-22 12:14:10 +01:00
Robin Hohnsbeen 01c579db54 Sculpt: Added vector displacement for sculpting draw brush (area plane method only for now)
Vector displacement maps (VDM) provide a way to create complex displacements that can have overhangs in one brush dab.
This is unlike standard displacement with height maps that only displace in normal direction.
Forms like ears, curled horns, etc can be created in one click if VMDs are used.

This patch reads the RGB channels of a texture in a brush stroke and interprets them as individual vectors, that are used for the vertex offset.
As of now, this is only working for the draw brush using the area plane method. Symmetry and radial symmetry is working.

Sculpt: Store inverse of brush_local_mat beforehand so it won't be calculated for every displaced vertex

Brush_local_mat_inv is needed to transform vectors of a vertex displacement map back to object space.

Sculpt: Added hint in tooltip that vector displacement works only with area plane mapping

Differential Revision: https://developer.blender.org/D17080
2023-01-22 11:18:51 +01:00
Robin Hohnsbeen 02b958e9af Sculpt: Store inverse of brush_local_mat beforehand so it won't be calculated for every displaced vertex
Brush_local_mat_inv is needed to transform vectors of a vertex displacement map back to object space.
2023-01-22 10:49:46 +01:00
Robin Hohnsbeen ce08bff6f0 Sculpt: Added vector displacement for sculpting draw brush (area plane method only for now)
Vector displacement maps (VDM) provide a way to create complex displacements that can have overhangs in one brush dab.
This is unlike standard displacement with height maps that only displace in normal direction.
Forms like ears, curled horns, etc can be created in one click if VMDs are used.

This patch reads the RGB channels of a texture in a brush stroke and interprets them as individual vectors, that are used for the vertex offset.
As of now, this is only working for the draw brush using the area plane method. Symmetry and radial symmetry is working.
2023-01-21 14:14:44 +01:00