Join Blender Studio for just €11.50/month and get instant access to all of our training and film assets!
Download the file created in this video here:
This is great! It's taken me a bit of time to get there, but I managed it. I now have a pretty good understanding of how we got there and the logic behind it. Many thanks
This video was hardcore af. I am glad to have survived it. A very well made video. Rock it up.
@Jerry Perkins (mx1001) haha, glad you're enjoying it!
Hello Simon. First of all, this is the best geo nodes explanation I've came across. I have a software engineer background and the whole concept appeals to me. I do have difficulties with the advanced rock scattering. Is there a way to post a picture or my geo nodes and the results I'm getting?
@Yuriy Lisytsky Thanks, I'm glad to hear! Have you tried comparing your file to the result setup in the description? If that doesn't help you can use an image sharing service and paste the link here, so I could take a look.
@Simon Thommes , Thanks, I just remade everything from scratch and it works now. I have got a bit better understanding of the setup.
Alright--hello from 2024 and Blender 4.0. I'm not sure what I'm doing wrong. This node tree appears to be throwing away faces instead of whole rocks. What has changed? What do I need to do differently?
Found it! Somehow bumped the "instance" selection on the Delete Geometry node.
@Dar Toften Great you found the issue. Accidentally changing options or values when navigating the node-tree interface is something that can happen and is difficult to identify. Something I do a lot, which helps with this is to hide options and inputs which I know I don't need to change, so they disappear from the interface.
Hiding inputs is on CTRL+H and hiding options is in the context menu of the node, I bound it to ALT+H myself.
hey all ! i am using blender 4.0 , i just wanted to say that if ur struggling to see the result after connecting the points to the target of geometry proximity , make sure u change the FACES to POINTS, and it will be fixed
I find a lot of fancy naming and little meat and potato content
@Sironious Make sure to study and understand the theory part of every chapter if you struggle with the practical example. I'm explaining everything in there.
It would be of great help if you build along the student
The greater than node and the Lesser than node aren't affecting the rocks and I don't know why... Can someone help? I followed all the steps but it's not working :(
@Najette Chouchane Can you try comparing your result with the file download to see if there is a difference? Otherwise I'd need a bit more information.
@Simon Thommes I found the problem! I compared the 2 files and found that I made a mistake. I didn't attach one of the nodes to the join geometry node. Thank you!! It's all fixed now.
@Najette Chouchane Ah, that's great to hear!
If the offset vector for the Set Position node is evaluated using normals: what normal is being used for a certain position? There can be more faces per vertex, so there can be more normals to choose from.
@Crisp Ness The normal is not special in terms of how geometry nodes deal with it. It's just derived data on the face domain. The set position node operates on the point domain, so that face data is interpolated to the vertices. This is similar, but not exactly the same as the vertex normals. Currently there is no way yet to read or write to the custom normals used for rendering, that are on the face corner. But this will be added in the future, it is planned for 4.0 afaik.
@Simon Thommes Thank you for your clear answer, so far from the future. Apart from it being the answer to the specific question, there is extra value in it. It shows me how I can reason about GN and what concepts to consider.
At 17:50 a "Map Range" node is used with "Linear" interpolation and "Clamp" turned on. As far as I understand it, clamping means that input values below "From Min" are mapped to "To MIn" and values above "From Max" are mapped to "To Max". Without clamping this would simply extend the straight line between the points (From Min, To Min) and (From Max, To Max) to infinity (see my illustration here: https://www.dropbox.com/s/l03nq35rekdzusd/Blender%20Map%20Range%20Node%20Clamped%20and%20Not%20Clamped.png?dl=0). If "To Max" is set to 90 percent with active clamping, wouldn't this mean that distances beyond 1 still have a 10 percent probability to spawn small and medium size rocks? Another question: How can "Smooth Step" and "Smoother Step" as map range interpolations be visualized?
Yeah, just a short message from the future (January 2023) concerning the field-on-geometry-preview-feature mentioned at 6:40: It's now there and it's a node called "Viewer". Left click on a node while pressing CTRL + SHIFT and you'll see the evaluated values displayed on the geometry which got put into the node you've just left clicked. The preview already works in "Solid" preview shading.
@Ingmar Franz Hi, thank you for the update! It looks though that the viewer node doesn't work in my setting. I connected the Points output from the Distribute Points on faces node to the Target input of the Geometry Proximity node (as shown at 09:00). Then I connected the distance output of the Geometry Proximity node to the Value input of the Viewer node. And then geometry of the whole setting I connected to the Geometry input of the Viewer node. I can't see any results in the viewport. I've checked all the methods of viewport shading and I've also checked if there are any checkboxes in the Overlays settings that would allow me to turn on/off the displaying of the viewer node results, but I didn't find anything related. At this point, I can't figure out what am I doing wrong, so any help is appreciated.
@Anna Panova I couldn't get the viewer node to work either. I noticed that if I passed the position attribute to it, like he does at 8:35, my rocks also have some position colors, in addition to the ground plane. I gave up and just followed the instructions in the video and it worked for me.
@Nickolai Belakovski @Anna Panova It's a bit hard to say what the issue is like this.
Can you confirm that the viewer works in general for you, by just connecting the position? Also make sure every setting is the same as in the video. For example the geometry proxity node needs to be set to points to work properly here. And keep in mind that instances are not real meshes. So if you have instanced geometry the viewer cannot consider the transformation of the instance but just the original mesh.
@Simon Thommes When I connect the position attribute, I get a 4-color panel that looks like yours in 8:35, but with colors on the rocks as well. Oddly, the order in which I connect the position attribute and the geometry changes what the output looks like. I've put screenshots and details about the order here: https://imgur.com/a/0vdF3iL
@Simon Thommes I think I see one reason I get different output based on the order. When I ctrl+shift on the "join geometry" node, the second input on the viewer node is a float field (white in color), but when I ctrl+shift on the position the second input is a vector field (purple)
@Nickolai Belakovski Yes, the reason it's black and white is that a vector is connected to a float socket. That shouldn't happen with ctrl+shift+click. If it does, that's a bug.
the reason that the rocks get colors that are not consistent with the ground is that they are instances. The actual geomtry you are inspecting the position of is without any transforms at the origin. And then the rocks are instanced, moved and rotated into place. If you Realize Instances
before the viewer the position will be consistent, but then you are not benefiting from the fact that the rocks are instanced anymore.
The "Geometry Proximity" node in this lesson's node setup has an unconnected "Source Position" input socket. So, if it's not connected to anything, it evaluates the points of the geometry which is put into same node as the "Geometry Proximity" node (after some optional math nodes in between)? Do I understand it correctly that this evaluation looks (in the final node setup) for the closest distance that a face of one of the large rocks has to the instance points for the small and medium size rocks? Furthermore, wouldn't it make sense to also realize the instances of the small and medium size rocks before calculating the proximity? Finally, I'm wondering what could be connected to the "Source Position" input socket of the "Geometry Proximity" node?
@Ingmar Franz Field inputs that don't have a slider exposed usually fall back to a default field input, just the same way that texture nodes don't need to have the vector input connected. When you hover over the field socket you can see what field is used. Here it's the position attribute.
This position relates to the geometry you want to evaluate the proximity on, not the target geometry. So usually you don't need to connect anything to get the proximity of points to a target geometry. But you can essentially override the position that is used to sample the proximity without actually moving the points. And if, for example, you plug in just a single vector, you get the proximity of that virtual point at the position that vector represents to the target geometry, for all points.
@Simon Thommes Thanks a lot! Now, it's clear what this "Source Position" input socket does with a single vector connected to it. Is there an important use case where you need for every point of the source geometry the same distance value derived from a single point's position relative to the target geometry?
@Ingmar Franz I don't have an exact use-case, but that single point could for example be an empty that you can move in 3D space. Sou you could use the proximity of that empty to a target geometry on all points.
That trick with compiling the scale normal on multiple set positions would be great for animating a balloon blowing up or a muffin being baked.
I still can find some intersections between medium and large rocks after playing with the seed value in the attached blend file. Rarely, but there are. (In my own blend file this happens a bit more often) And if instances are realized through Relize instances node, and geometry node applied, the distances can be measured between large rock's questionable vertices and nearest faces of medium rock and they are smaller then 0.2 meters. Does anybody have any idea why this might be happening ? The minimal distance can be increased, and the intersections disappear, but that's not the point.
@Yevtushenko Oleksandr The reason is most likely the randomization of the scale of the rocks. Because this system is not actually detecting mesh intersections, but only removing points in a certain radius, as soon as a rock has a higher radius that will lead to an intersection. The randomization of the rocks, as I have it in the file means, that some rocks will be slightly scaled up and thus still intersect in some cases. When you change the randomization maximum to 1, that should disappear.
@Simon Thommes Maybe, the instances of the small and medium size rocks should be realized ("Realize Instances" node) so that we can use the vertices of these rocks for measuring the distances. This could perhaps further reduce the probability of intersections.
@Ingmar Franz That does work, but it is also a lot more expensive to calculate. Especially because it depends on the complexity of the rock mesh.
@Simon Thommes Aha ! Sounds perfectly reasonable.
So, the scaling is done AFTER the distances are measured and instances removed, and this might create new small intersections after scaling (In my blend file I have a bigger scale range, that's why it happens more often). The rotation node can also interfere with proximity calculations if rocks aren't perfectly round. And of course, if vertices on a large rock are not close enough to the closest faces on medium/small rock, then they still can intersect.
Thank you for the answer ! That clarifies things to me.
Join to leave a comment.