This provide random vectors in spherical or conical distributions.
This replaces previous attribute patch D10883: Geometry Nodes: Attribute Randomize Spherical Node
Differential D12746
Geometry Nodes: Add Random Spherical Distribution node Authored by Charlie Jolly (charlie) on Oct 4 2021, 2:03 PM.
Details This provide random vectors in spherical or conical distributions. This replaces previous attribute patch D10883: Geometry Nodes: Attribute Randomize Spherical Node
Diff Detail
Event TimelineComment Actions This patch needs an update to latest master, but I think it's worth pursuing. It's especially useful when combined with the raycast node.
Comment Actions This seems to work very well! I'm basically evaluating this with the use case of choosing direction for the raycast node. I'm sure there are more, but I believe that's a basic on this should be able to handle. Using the conical version, I really wish I could choose the the up vector, I think it would make the node much more friendly to use: What do you think about that? Here's my test file: I think I'd like to require a similar test file be committed to the geometry nodes tests repository. Now that the crazyness of the fields transition is over, we should start to be better about adding tests for new features.
Comment Actions Address comments. Used Axis rather than Direction. This does make conical mode more useful. Comment Actions Radial Bias controls distribution of vector lengths between min and max radius. On a disc, when both min/max angles are set to 90 degrees On a hemisphere, when angles are set to 0 and 90 degrees Comment Actions Change Axis to Rotation as axis is less friendly for animating (180 flipping) or controlling with an empty. Comment Actions I'd like some artist to test this, but as far as I'm concerned it's probably close to ready. If you merge master, maybe we can make a build of the patch?
Comment Actions Address comments. D12746 builds available here: https://builder.blender.org/download/patch/ @Simon Thommes (simonthommes) can you test the patch and provide feedback or accept the patch? Comment Actions Rebase to master. Rename node from Random Spherical Vector to Spherical Vector. After more testing it was frustrating to not be able to control the distribution of points more finely. Comment Actions Sorry, missed this patch for a while! I tested it now, looking very nice, I think this will be very useful! I have a couple of notes:
Comment Actions I just noticed that the Rotation input was a request by @Hans Goudey (HooglyBoogly) :D Comment Actions @Simon Thommes (simonthommes) as usual, thanks for the feedback, I'll take a look and update the node Comment Actions We chatted about this patch in today's meeting and agreed that the rotation input can be removed. @Jacques Lucke (JacquesLucke) brought up a good point, that the manual mode could just be replaced with a vector map range if we had nodes to convert between spherical and cartesian space. Comment Actions Yes, I did think perhaps it could be split out into two nodes. I'll revert manual mode changes and update the patch. @Simon Thommes (simonthommes) do you want to create a task for spherical space with notes on naming and whether to use radians or factors? Comment Actions Cool, thank you! Yes, I'll create that task. I can foresee a couple of design questions that need to be figured out as well. Comment Actions Revert and remove manual mode. @Simon Thommes (simonthommes) I've kept Rotation socket but hidden the values. So either keep node as is with hidden values and useable Tangent Comment Actions Thanks for the changes!
But I'm also fine with a hidden Rotation input like you have it now. I think, I'd put it first on the node inputs though in that case. I think that would read more naturally.
That output would already encapsulate both the vector and the tangent (normalized).
I don't really see a need for this and I personally would expect a tangent in this context to be normalized. Comment Actions Nice! For me this patch is good to go now :) Maybe @Hans Goudey (HooglyBoogly) can just take another quick look on the code side of things, otherwise I think this can be merged. Comment Actions Here are the notes from a recent sub-module meeting where we discussed this patch:
So, I think that means the way to move forward is focusing on the "Compose/Decompose/Combine/Separate Vector" nodes, then implementing this as a node group(s) and seeing if the built-in node is still required. I also wanted to say that I'm personally sorry for not having a consistent opinion about this again. Thinking about T95445: Collect node groups to ship in possible asset bundle and more about the performance aspects changed the way I viewed this. Comment Actions Ok, thanks for the message. It is frustrating but I'll keep this open until we have the spherical coordinate node at least. | ||||||||||||||||||||||||||||||||||||||||