netherknight Posted February 25, 2021 Share Posted February 25, 2021 Hi! I'm just starting to work with the distance from geometry node and would like to scatter a number of points over a grid of cubes based on the distance to the camera. I am running into two maybe easy to fix issues. As far as I know the DFG node (distance from geometry) creates a attribute named "dist" I would like to use that attribute in a series of adjustments made to the cubes. Now I can call on "dist" with the "@dist" expression but I dont know how to use that in a node such as scatter. Secondly I am looking for higher values closer to the reference object. Using DFG without adjustment gives higher values to objects furhter away. Any help would be appreciated. -Thomas Quote Link to comment Share on other sites More sharing options...
ninjismo Posted February 27, 2021 Share Posted February 27, 2021 Hey Thomas! If you have the @dist attribute on your points you can then use it to drive other attributes such as pscale. You can then use an attribute wrangle to control the min and max values and resize your cubes. I've attached an example file distancefromgeo_thomas.hip Quote Link to comment Share on other sites More sharing options...
netherknight Posted March 5, 2021 Author Share Posted March 5, 2021 This is perfect thank you. Distance from geometry is starting to make a lot more sense. So I'm seeing how to cast @dist to the example pscale. But would it be possible to cast it to a float in a FOR EACH? so that I could for example adjust the max density of a scatter node based on the proximity of a grid of packed cubes? So lets say a grid of 10 cubes, for each cube check the distance to the camera and scatter a maximum of 1.000 points over the closest and a minumum of 200 points over the cube most far away. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.