Some advice for a project
Hello all! I am working on a project where I need to create a surface map of a circuitry-like pattern around a cube. I'd like the lines of the circuits to seamlessly wrap around the surface of the cube and also to follow the contours of the circles in the middle of each face. I've attached an example I made by hand to demonstrate what I'm after. This pattern works, but I'd like to be able to add variation to it. I am totally new to this tool, but I'm sure that NodeBox is perfect for this project. I am seeking any assistance or advice on how to best proceed. Thank you!
-
pattern.jpg 1.19 MB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by john on 18 Mar, 2021 12:11 PM
Hi Andy,
What an interesting project! Yes, this is perfect for NodeBox. Generating the basic layout is easy, but creating aesthetically pleasing circuitry is tricky, even more so if you want each face unique but with connections that match along edges when the cube folds up.
I took a run at it just to give you a start, but I am not pleased with my initial approach (see screenshot and attached ndbx zip file). I made a handful of high-level nodes (actually subnetworks) which provide an outline of my algorithm. Render each node to see how the final product comes together and control click and choose Edit Children to see how each one works:
As you can see, the result is interesting, but probably not what you are trying to achieve. The connections match perfectly, so if you printed this out and folded it to form a 3D cube, all the lines would sync up. But the faces are too orderly - almost identical - and the overall effect does not convey the kind of circuitry you included in your sketch.
I think a better approach would be to make a circuit like pattern that fills each square face and then use a compound node to cut out a circle in the middle of each face. You could then automatically place little dots at the point near the edge of the circle.
You seem to have a knack for making interesting looking circuit tiles, which you can make in Nodebox by drawing a random series of lines and boxes. You can use my layout node to create your faces and study my connections node to see how to draw lines from the edges of each square. If you build each face from the same connection points along the edges they will connect properly when folded even if the interior of each face is different. If you need help punching out the circular hole let me know.
I hope this helps get you started. It doesn't achieve the effect you are going for, but it should give you a feel for the way NodeBox works. Please write back and share your progress. If you get stuck I will be happy to work with you some more on this.
John
2 Posted by Andy on 18 Mar, 2021 08:27 PM
Hey John, thanks for the reply! I looked at your example and it was very helpful, though a lot of it is over my head as I am very new to nodebox. I do think your idea about making a circuit pattern to fill each face is the way to go, however. I got started on this and I've attached my work.
Here's the steps I've taken:
• Create a rectangle
• Use resample to put points along the rectangle edges (42 on each edge in my example - the 3d box will eventually be subdivded into 42 squares to accommodate other aspects of the design)
• Remove the corner points (i foresee weird things happening with those, so i'm ditching them up front)
• Randomly select points from the edge (black dots)
• Create a grid for the interior of the face (red dots)
• Randomly select points from that grid
Next steps as I see them are:
• Make the six-face upside-down cross pattern with this face and have the faces share the black border dots (that way its seamless)
• Generate unique random interior points for each of the six faces (the red dots)
• Run something over the entire thing to connect the black dots to the adjacent red dots such that the angles are 180, 90, or 45 degrees and do something about circuit length (random length in unit of points connected vs. end condition)
• Run something that looks for adjacent unconnected red dots and connect those (to make the squares and fill empty spaces - probably a lot of options for this)
• Cut out the circles
• Add hollow dots to some of the lines to make it look more circuit like
I am going to keep working on this tonight but I have to do my professional job-related work now. I'll upload my progress as I go. Thank you again for your help John! Any feedback or suggestions would be wonderful and hopefully help other nodebox users as well.
3 Posted by Andy on 18 Mar, 2021 08:30 PM
Hey John, thanks for the reply! I looked at your example and it was very helpful, though a lot of it is over my head as I am very new to nodebox. I do think your idea about making a circuit pattern to fill each face is the way to go, however. I got started on this and I've attached my work.
Here's the steps I've taken:
• Create a rectangle
• Use resample to put points along the rectangle edges (42 on each edge in my example - the 3d box will eventually be subdivded into 42 squares to accommodate other aspects of the design)
• Remove the corner points (i foresee weird things happening with those, so i'm ditching them up front)
• Randomly select points from the edge (black dots)
• Create a grid for the interior of the face (red dots)
• Randomly select points from that grid
Next steps as I see them are:
• Make the six-face upside-down cross pattern with this face and have the faces share the black border dots (that way its seamless)
• Generate unique random interior points for each of the six faces (the red dots)
• Run something over the entire thing to connect the black dots to the adjacent red dots such that the angles are 180, 90, or 45 degrees and do something about circuit length (random length in unit of points connected vs. end condition)
• Run something that looks for adjacent unconnected red dots and connect those (to make the squares and fill empty spaces - probably a lot of options for this)
• Cut out the circles
• Add hollow dots to some of the lines to make it look more circuit like
I am going to keep working on this tonight but I have to do my professional job-related work now. I'll upload my progress as I go. Thank you again for your help John! Any feedback or suggestions would be wonderful and hopefully help other nodebox users as well.
Support Staff 4 Posted by john on 30 Mar, 2021 09:34 AM
Hi Andy,
My apologies: for some reason your replies were sent to the spam folder, so I only just now noticed them. Our antiquated forum software does this every now and then. Vexing for both you and me!
Anyway, it looks to me like you're off to an excellent start. I think using pick to remove random dots is clever. As you say, there are a lot of options for hooking them up and filling empty spaces - this part will be tricky and will require experimentation to get the right look and feel. Fortunately Nodebox is quite good at experimentation.
You can probably use the reflect node to get your edge dots to match up, Be careful - there are two reflect nodes; you want the black one that outputs geometry.
Again, my apologies for our over-eager spam detection. I hope you will keep working on this and keep me posted.
John