Page MenuHome

Geometry Nodes: Attribute Randomize Spherical Node
AbandonedPublic

Authored by Charlie Jolly (charlie) on Apr 3 2021, 2:58 AM.

Details

Summary

This provides random vectors options for distributing random values.

The use case for the spherical distribution is to provide a way to randomize a vector by angle/direction and length. This can be used to distribute points radially or spherically in angular space.

Currently there are two modes:

Spherical: Distributes points between min and max radius.

Conical: Distributes points between a min-max radius and a min-max cone angle.

Both modes have a Bias control to change the distribution between the min and max radius. This defaults to 0.333 to distribute evenly within the volume.

This was split from D10459.


Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 13870
Build 13870: arc lint + arc unit

Event Timeline

Charlie Jolly (charlie) requested review of this revision.Apr 3 2021, 2:58 AM
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Apr 3 2021, 3:18 AM

Rebase to master. Add threading::parallel_for.

Charlie Jolly (charlie) retitled this revision from Geometry Nodes: Attribute Randomize Spherical Node (WIP) to Geometry Nodes: Attribute Randomize Spherical Node.Jul 27 2021, 4:46 PM
Hans Goudey (HooglyBoogly) requested changes to this revision.EditedAug 12 2021, 6:17 AM

I have similar comments here to D10459.

It could be possible to implement the node already as a function node. Then by the time it's possible to use function nodes for attributes in master this node could be ready.

For a name, some creativity might be necessary, maybe "Random Unit Vector"?

Thankfully that also makes the implementation simpler, all of the GeometryNodeAttributeRandomizeMode logic, the domain logic, the attribute reading and writing can all be removed from the node in that case.

source/blender/nodes/geometry/nodes/node_geo_attribute_randomize_spherical.cc
26–27

Unused includes

This revision now requires changes to proceed.Aug 12 2021, 6:17 AM

Waiting on design task T91373: Random Number node for new Randomise function node. I'll refactor this afterwards.