Fields and Anonymous Attributes [Proposal]

Now THIS is readable.

5 Likes

I’m not sure if this is what you mean by noise texture not working for selection, but make sure you up the contrast in some way, like here I do with a color ramp,or you could use a float compare node or a map range or a rgb curves node, to make sure you are getting 0’s and 1’s / true - false.

1 Like

Since quite a few nodes seem to be identical between GN node editor and shader editor, I wonder how much parity could we achieve between GN and Shader Editor. It’d be amazing if we could even reuse node groups between the two, as long as they do not contain the editor specific nodes (Geometry sockets in shader editor or BSDF sockets in GN editor).

I still can’t believe how much easier it is to use than what we got in the master. Despite being still very limited, it took me just a few minutes to create a network that adds cliffs to landscape heightmaps:

A few observations from this short test:

  • We really need an ability to disable that nonsense which automatically reconnects existing node wires to next node slot when connecting a new wire over it. It’s already a big pain in the shader editor, but it’s even more damaging when trying to use geometry nodes.
  • When working with complex data, the UI lags and freezes a lot, which makes sense given how much stuff needs to be calculated, but it’s still a big workflow speed bottleneck. It’d be really good if the GN node network did not get recalculated, and therefore UI not frozen, when for example just adding new nodes to the graph (or copy pasting nodes), which are not yet connected to anything. Such nodes should not have any impact on the network result, therefore it should not prompt recalculation of the result.
24 Likes

I really want to test the build for terrain creation, must to be the best

Thanks, for sharing the examples!

Note, the goal here is not to figure out if this is better than master, we know that it is. The goal is to figure out how this compares to the other proposals:

Unfortunately, I’m still not done with the prototype for the expandable geometry socket proposal. Mainly the input/output handling is fairly tricky because it changes how the node system is evaluated quite fundamentally. Will share a build for that soon anyway, it just won’t contain everything.

21 Likes

ah well fair enough. i would have expected the conversion from float to boolean to use rounding

Updated Prototype

  • Add a very basic way to visualize which input sockets are constant and which are fields
  • Add a node to store a field on a geometry and output an anonymous attribute
    • Rename “Attribute Fill” to “Store Persistent Attribute”
  • Support selection in the point translate node
  • Remove all redundant “Attribute” nodes
    • Some are still in the prototype because their functionality hasn’t been replaced yet
  • Update the extrude node with field inputs and selection outputs
  • Support switching between two fields in the switch node
  • Support fields/anonymous attribute selections in a few curve nodes
    • Select by handle type node
    • Set spline type node


One interesting difference between this and the geometry expander prototype is that we can use the original “Top Faces” selection even after the topology has changed, without more nodes or more interaction

Builds are here:

25 Likes

Hans, if you are still at the grindstone do you know if the expandable geometry socket prototype was successfully uploaded? I can’t find it in the builds, and it would be nice to try out over the weekend while I have time.

Yeah, it looks like the Windows build failed earlier. I triggered it again a moment ago.

3 Likes

Cheers, happy Friday

1 Like

Yes! This is so beautiful. I was really worried the old nodes would remain there, cluttering the user experience.

I know this is still a prototype, but what would go a long way would be Image Texture node, which would just take vector as a mapping input and outputting RGB and A sockets.

I am not yet sure if it’d be a better idea to have the GN version of the node, which uses Texture datablock, or the Shader Editor version, which uses Image datablock. The former would be great in that it would allow us to immediately use all the different legacy procedural textures, not just image files, but the latter would be closer to the ideal workflow, where there would be parity between GN texture nodes and Shader Editor texture nodes.

My vote tilts more towards the latter, as it would be a good direction to eventually deprecate those legacy procedurals in favor of being able to use texture node networks in places like displace modifier.

4 Likes

Remove from the add/search menu or entirely from blender ?
If the first case, it won’t break files and will lower the probability of users ranting about spending time on now obsolete nodegroups

Another thought on the constant inputs of nodes:

Since it is planned anyway to implement a “Point Instance” node that can instance geometry directly instead of an object, I think it would be useful to allow the instanced geometry to depend on the attributes of the instancing point.

For example the following setup would distribute n-gons on a plane with a random n between 3 and 6:

Or alternatively something like this with anonymous attributes?

Note that the “Vertices” input of the “Mesh Circle” node is connected to a non-constant field.
This would of course mean, that the “constant” inputs are no longer really constant, only that they are not allowed to evaluate a field that depends on attributes inside the geometry domains. So it might be more consistent to just treat these inputs like any other and show a warning if they do not provide the dependencies of a field they are connected to.

I updated my reply with the delaunay triangulation demo to include the expandable geometry sockets prototype and a comparison of both approaches.

4 Likes

Composing fields.
Object is just a cylinder with subdivisions.
“Attribute Fill” used to apply field.

I tried to keep the actual fields separate from the “Attribute” input.



18 Likes

Are fields related to dynamic typing or duck typing?

It looks like Contextual typing or something.

Having fun with this prototype, Using fields to select faces to extrude and displace the points along normals. I find it pretty intuitive. Can’t wait to have all the options on the extrude node!
Thanks for all the hard work everybody! I’ll try the expandable sockets branch as well if I have time!

19 Likes

Updated Prototype

  • New field inputs nodes
    • Add “Position” input node, to replace using the attribute node for position
    • Add “Face Normal” input node
    • Add curve parameter node to give the length factor of each point along a curve (NURBS not supported currently) (demo below)
  • Add “Extract Attribute” node like the “pop” from the expandable geometry socket proposal
  • Add initial “Extrude and Move” node for use case demo
  • Add “Set Position” node
  • Support fields in the Point Separate node
  • Support 1D noise in the noise texture node
  • Rename “Store Attribute” to “Attribute Freeze”
  • Fixes for adapting selection attributes between domains. Previously some interpolations weren’t quite what was expected.

As always, builds are here:

Builds are just started, they won’t be ready for a few minutes

28 Likes

Thanks Hans for the hard work.
I tried the build, it seems much more intuitive to use normal nodes on attributes data.

Not sure if my feedback is all relative to this alpha, and I’m sure a lot of it is already known. I’d like to provide as much good feedback as possible so please feel free to let me know if this is useful and what you’re looking for.

  1. Auto-conversion is very useful, and there are many areas where it could be used. I saw float can already work as Vector which is great, here are a few more examples:


  2. Being able to create objects within the nodes would be extremely useful for having a packed setup and being procedural

  3. I find it hard to figure out how to distribute in object components other than vertices.

  4. It would be intuitive if the instances would use the point they were distributed on as their local space, and be able to work in different spaces. There could be “Point Space”, “Object Space”, “Global Space”.

  5. I think it would be useful to be able to just create a number of points and distribute them. The Density option is useful, but is there a way to be precise about the number of points being created?

  6. I noticed we can only save basic datatypes on points, it would be amazing to be able to save whatever data we need on each point.

  7. On that regard, it would also be fantastic to have a Script node that we can use to parse data and apply formulas that are inefficient to create with nodes.

Thanks again!

4 Likes