Geometry Nodes: porting the VertexWeightProximity modifier #84842
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#84842
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This task covers the design of how the functionality of the VertexWeightProximity modifier could be ported to geometry nodes.
I've started implementing an Attribute Proximity node here: https://developer.blender.org/D10154
VertexWeightProximity modifier
The VertexWeightProximity modifier sets the weights of vertex group based on the distance of each vertex to a Target Object. The distances are mapped to values in the 0 to 1 range.
The main code for this modifier can be found in
blender/source/blender/modifiers/intern/MOD_weightvgproximity.c
. The distance calculations are done using a BVH.Use Cases
Among other things, something users will definitely want to do is:
In this video Miro Horvath shows a nice example: scattering trees in a landscape, but not on a road and a river in the landscape. He achieves this by using VertexWeightProximity to create vertex weights that are 0 around the road and river, and then feeding these vertex weights to the Point Distribute Node. Below are screenshots of his vertex weights and his result:
What's nice about this workflow is that he can move the river around and the trees will appear/disappear as needed.
Design for Geometry Nodes
In the spirit to keep geometry nodes atomic, it probably makes sense to strip away most of the options in the VertexWeightProximity modifier. All the mapping functionality (falloff, lowest, highest, normalize) and masking functionality (the stuff in 'Influence') could be done by other nodes. The geometry nodes should thus basically calculate and output distances. The node could look something like this:
Attribute Proximity Node
So how it would work is that the node would output for each vertex in the first geometry, the distance to the closest point on the second geometry.
Suggestions for better names for the inputs are welcome, maybe
Geometry
andTarget Geometry
?Miro's workflow could then be simplified to something like this:
Scatter on landscape with the values from the previous step as density attribute
Notes
Added subscriber: @victorlouis
Added subscriber: @DimitriBastos
Is it possible to not be totally vertex dependent on those effects?
EDIT for clarity:
For instance, we can create weights by using an empty or another mesh, but it would be nice to create weights using a parametric workflow not mesh dependent like using a curve, or like using some sort of linear object (similar to the weight gradient tool). For what I know, the Weight Proximity Modifier is based on object origin, so even if you use a curve it will only read the curve origin, not the curve points or the curve geometry.
You mean working texture based? I'm not sure what the current plan is for integration of textures and geometry nodes. I think there's some complexities with integrating textures that aren't there for vertex weights, so using vertex weights is just a start.
Added subscriber: @MiroHorvath
Not exactly using textures. I think I'm not making myself clear, sorry. What probably I want to say is if there is a way to add more shapes for creating weights.
For instance, we can create weights by using an empty or another mesh, but it would be nice to create weights using a parametric workflow not mesh dependent like using a curve, or like using some sort of linear object (similar to the weight gradient tool). . For what I know, the Weight Proximity Modifier is based on object origin, so even if you use a curve it will only read the curve origin, not the curve points or the curve geometry.
I think current modifier can already do a few things you describe by choosing Proximity Mode
Geometry
. But indeed, the goal is that distances are calculated to all sorts of geometry, meshes, point clouds, curves etc. I'm not sure how hard supporting curves would be, maybe as a first version curves could be converted to a set of edges.This issue was referenced by
4d39a0f8eb
Changed status from 'Needs Triage' to: 'Resolved'