1

I'm trying to calculate a set of points in this Combine XYZ node and I want to dynamically create a mesh of vertices from these points. How do I do this? I mean it's possible to pass Combine XYZ to Set Position node but that assumes the vertices already exist. I'm not sure if Points to Vertices or something similar does the job? I need something that converts these points from Combine XYZ node to an actual mesh.

I know I can easily do this with XYZ Math Surface but I'm curious to know If geometry nodes is capable of dynamically generating such a mesh as well. It has the advantage that I can also animate it rather than a static XYZ Math Surface

enter image description here

This is the node setup I have for the sphere

enter image description here

UPDATE:

I just realized using Position node and Grid node really do answer my question:

enter image description here

Harry McKenzie
  • 10,995
  • 8
  • 23
  • 51
  • 1
    the problem is that you have "just" points. For a mesh you need edges and faces (and as you know you can only see faces, if you render). And you don't have these informations if you have just points...of course you can set this points (e.g. from a point cloud), but this doesn't mean that you have a working mesh. – Chris Jul 27 '22 at 10:24
  • yes you have a point. so i guess the XYZ Math Surface function is not possible with geometry nodes? – Harry McKenzie Jul 27 '22 at 10:26
  • it is possible - i am sure, but it is more complicated ;) you have to define somehow, how the points are connected. Or other: you have to create faces and edges as well. – Chris Jul 27 '22 at 10:27
  • i think what you want, is answered here: https://blender.stackexchange.com/questions/260497/how-do-i-create-a-3d-parametric-surface-using-geometry-nodes – Chris Jul 27 '22 at 10:30
  • oh. so it seems geometry nodes might not actually be designed for this type of problem? no i already went through these answers, they don't answer how to dynamically create the mesh which is my prime problem. – Harry McKenzie Jul 27 '22 at 10:42
  • Ok, then I don’t understand what you want…because (just my opinion) this answer do dynamically create mesh. – Chris Jul 27 '22 at 10:49
  • In the image in my post with the nautilus shape or the Sphere shape, I boxed in red the corresponding parameterized functions there. All I want to know is how to set this one up with geometry nodes from scratch. So I tried creating the setup for the sphere. Eventually I want to try creating a node setup of a more complex shape like the nautilus. – Harry McKenzie Jul 27 '22 at 10:57
  • @Chris oh I see the answer of Robin Betts, did I see that correctly he used a Grid and with that he was able to reshape it into that complex shape? So does that mean I can even create the Nautilus shape with just a Grid? – Harry McKenzie Jul 27 '22 at 11:14
  • i am convinced that you can....that's what i wrote ;) – Chris Jul 27 '22 at 11:15
  • and actually...both answer use a grid....and have the same principle ;) – Chris Jul 27 '22 at 11:17
  • cool can you mark this as duplicate then and i'll close it :) – Harry McKenzie Jul 27 '22 at 11:19
  • 1
    your wish is my command.... :D – Chris Jul 27 '22 at 11:20
  • 1
    node setup: [1]: https://i.stack.imgur.com/E22OH.jpg – Chris Jul 27 '22 at 11:27
  • 1
    result: [1]: https://i.stack.imgur.com/CjJSx.gif -> yellow: GN ,"normal": Math surface – Chris Jul 27 '22 at 11:28
  • 1
    friggin awesome! you're the man! i wanted to verify it with the nautilus but got lazy coz there are too many nodes hahahaha thanks a lot for showing it! :D – Harry McKenzie Jul 27 '22 at 11:31
  • 1
    you are welcome - i love GN puzzles ;) and still learning... – Chris Jul 27 '22 at 11:32

1 Answers1

1

These nodes don't work in this way. When you see the round socket it is ok, data travels from left to right, as you expect. But when it comes to diamond sockets, the data travels back from right to left to the source to get the data for the node with the round socket. That means that the node with round socket initiates the flow in diamond sockets. Without it, you will not have any data. So this is your mistake:

I have calculated a set of points in this Combine XYZ vector

No, you haven't calculated anything, if you don't have vertices (or shall we say Data Domain), you don't have its coordinates.

So the question is what are you trying to achieve. If it is a mesh, connected with edges and faces, you have to define this mesh, because at this time you can't build mesh out from points. So you can create a basic shape and move it's points using set position node.

If you want to make a point cloud, you should define a size of this point cloud, how many points in it. Simply make a mesh line and convert it to point cloud using Mesh to Points node:

enter image description here

As I understand, you are trying to do like this:

enter image description here

enter image description here

Crantisz
  • 35,244
  • 2
  • 37
  • 89
  • okay I updated the question. actually i have a set of parameterized equations that i want to use to dynamically create any shape. how do i realize such a mesh? i want to know how to do it with geometry nodes because i already know how to do it with XYZ Math Surface – Harry McKenzie Jul 27 '22 at 10:10
  • I haven't much to add in my answer, except when you are using spline parameter, data domain should be spline. And I suppose it is not a domain that you want to use. Maybe you have an image that are you trying to achieve? Can you share the nodes as well, so I can play with https://blend-exchange.com/ – Crantisz Jul 27 '22 at 10:14
  • 1
    I've updated the answer – Crantisz Jul 27 '22 at 10:28
  • hmmm using a grid is a workaround. it will only create a half sphere https://blend-exchange.com/b/24ydxSN7 and besides it cannot cater to complex shapes such as the presets under XYS Math Surfaces. So I should probably ask if Geometry is even designed for such tasks or probabaly it is not right? – Harry McKenzie Jul 27 '22 at 10:50
  • Edit map range, for second half – Crantisz Jul 27 '22 at 11:03
  • oh i realized your answer and this answer do solve the problem. thank you very much :) – Harry McKenzie Jul 27 '22 at 11:23