I am distributing verts on faces with Poisson Disk and then extruding those verts up in Z
Only the X and Y positions of the points are being randomized with a noise texture. Doing it this way allows me to target the last vert in a line by it’s Z value and put a different object at very end.
But now I need at least a tiny bit of Z randomness at the very end of the line. Moving the vert up or down makes its Z position no longer match the condition in the screenshot above.
What is the best way to consistently target the last vert in a line of verts?
Hum, maybe there is a simpler way, if at some point you have the lines without noise, then you may
attribute capture the last vertex based on position. Then apply the randomization, and then get the last vertex back.
Another way is to count how many verts you have per line, if they all have the same vert count you can iterate / modulo through it.
Another way : you said you’re extruding lines , maybe you can just capture the last extrusion, or it’s a figure of speech ?
Please share a .blend if needed ! That will be simpler !
Here we go, you had most of the things solved : GN yellow flowers test_b.blend (154.4 KB)
As said the idea is to capture the end point before randomizing and then use it latter.
I didn’t think about using curves as @zeroskilz pointed out, it works better as a general solution.
I think with procedurals a lot of little cheat are needed. The solution I provided here is very dependent on the situation but it is quite simple. Rather than thinking about general solution, you may find you way with a little trick that works specifically in your case.
what is actually being captured by the capture attribute node? The hardest part of geonodes and shader nodes is I don’t understand how to inspect values.
Your second window broke my dual monitor setup, lol. I cant see any blender window controls on my 2nd monitor and cant close that one
Arf sorry !
This one should work better UI wise. You can also disable Load UI when opening the file, so your keep your layout. GN yellow flowers test_b.blend (153.5 KB)
Hahaha , you should know it better than me, I’ve reused your nodes.
They make a selection based on the position of the point. If the point Z position = Z stalk Height the points are part of a selection.
If you do that before the set position that randomize the position, it works. If you do that after the set position, obviously the Z position is randomized so it doesn’t work anymore.
That’s where the capture attribute come in to play. We “capture” the selection before the set position, and use that after. That selection is “freezed” by the capture attribute.
Indeed, using the spreadsheet could work in some case, but here I don’t think so.
You need to have a good understanding of what is happening.
Even if the result is visual, it’s hard to improvise with GN, it’s also the case with shader nodes but I find them more forgiving. You can manage something without really knowing what you’re doing at least to some extent.
Here you need a good mental representation of what is happening, that’s why it’s important to do really simple exercises at first and then move on to more elaborated, real life scenarios.
I was under the impression that it captured attributes, not something else. I assumed these were the only things to plug into the Capture Attribute Node
and even if you plug something else in they have to terminate at one of these nodes and in the end you get the values from that node.
I would assume an array of positions that have a Z value of zero is what is captured. Instead you’re saying something like a list of index or id numbers corresponding to specific points, not positions, is what is captured? The only way I would guess that was happening is if the Position node was actually an Index or ID node. It makes no sense to me.
Ok, I’ll try to explain as best as I can, feel free to ask question if needed until it’s clear !
An attribute can be any values. These nodes like position , normal give access to built-in attribute that are one thing. But you can make custom attribute with what you want .
You can “capture attribute” any value. It’s a kind of vertex group, or vertex color depending on the attribute type.
In fact, there isn’t much difference between fields and attributes. It’s basically the same thing.
When running the nodes without the capture attribute nodes, we get a value (a field) , we can then decide to store that value as an attribute with capture attribute to use it latter in the tree.
In our case, because the capture attribute is set to Boolean, and to Point , it will store for each point of the Geometry a value that is either 1 or 0 (True/False) according to the result of the compare attribute node.
It’s similar to a vertex group but with more possibilities :
Here the value is different for every point, because the texture is mapped to the object.
Yes you get it, it’s not a list (array) of specific points. It’s a value that is either 0 or 1 for every points.
Once again, kind of a vertex group. The vertex group is for one mesh, but the values changes for every vertex.
With the node you’ve set up, you ask for a comparison between two value ( that’s the compare node).
That comparaison is made for every point of the Geometry. For every point , we compare it’s Z position, and if it’s equal to “Z Stalk Height” the ouput value of the Compare node will be 1 for that point/vertex, and if that’s not the case it will be 0.
Hopes that makes sense, I’m not sure what I wrote is super clear, but feel free to ask more questions and I’ll try to explain it better
i’m only beginning to work with 3.1 and this new geom nodes feature
so still have to learn a lot
i hope they will keep the old properties modifiers stack
much easier for new comer then using this new geom nodes which is very powerful but also much more complicated i think
thanks for the explanations
trying to redo the cube example
only thing i don’t see the right window with the list of values and other things
how can i get this window
i use the old 2.79 set up for my bl 3.1
so can’t see that window for geometry nodes !
Bear in mind that my example is kind of silly, but it can help to understand what’s going on !
You can have the same result without capture attribute in that case :
That way, if I need the original position, I can use the result of the capture attribute.
Because the position node will give different results depending on where it’s called in the tree.
That’s something that is a bit confusing , but really important to get if you want to use GN.
Once you get a better idea of how it works it make sense and that’s very powerful !
Yes, given the state of the tool modifier stack will stay for a while.
And indeed it’s quite useful, node are way more powerful but less simpler.
In some case modifier stack makes more sense to me !
But I can see that having both system can be a bit confusing too…
Could this be described as “SET / DEFINE a custom boolean property ON each point of the geometry”?
Here I’ve stored the value 42 for every points of the mesh.
This is literally setting a value which makes the name “Capture Attribute” even more confusing to me. You don’t have to plug a literal attribute/field/special-input-node into it at all, which is what I thought it was meant to “capture”. Feels more like a “Set Values On Points” node.
Yes ! Set a boolean property on each point of the geometry ! That’s it !
Yes, Set Value could be an alternative name. It can be stored either on points, edges, faces …
I can see why they go with capture, but the most important is to understand how that works.
With time the naming could make more sense.
I still cannot see it and that makes it difficult for me to understand. My mindset playing with geometry nodes was that I was just going to limit myself to the nodes I could understand. After half a dozen tutorial videos about a node I don’t understand I just set it aside and expect to never bother trying to use it.
Yes it’s just a name, it could have been more intuitive, it’s not that bad either !
Did you tried to read blender manual ? It may explain a bit better the internals and all this could make more sense.
Renaming it to “Set Attribute” could do, but it doesn’t really set it, because it’s temporary.
In recent builds there is this node :
That allow to give names to some attribute and store/set them once for good.
It may be a bit simpler to understand , even if both this one and “Capture Attribute” have their uses.
They’re basically doing the same thing, one is temporarily and makes sure you don’t keep un-needed data in the geometry. The other makes it more permanent so you can use that attribute latter if needed , or use it outside of the GN tree .
At this point you should try to understand most of the nodes. Especially if they are often used.
The toolset is quite minimal for now. You’re limiting yourself by not using some of the available nodes.
Take your time to learn them and you’ll start doing wonders with these tools !
But yes, it’s always possible to not use them and do stuff differently.
Here is another example for the Capture Attribute :
My original Geometry is a Curve. I store the Curve Factor using capture attribute.
Curve Factor is a Value going from 0 to 1 along the curve.
Then this curve gets converted to a mesh. But the Factor we store earlier is propagated to the mesh.
We can then use that factor to drive the density of the distribute points .
This use case is quite difficult to recreate if you don’t use Capture Attribute.
Because once the curve is converted to a mesh it’s not a curve anymore , you can’t access the Spline Parameter/Factor value anymore.