Hi, I’m creating an addon to where I can draw vines onto an object (Building). I have created the vines with Geometry Nodes and can draw them on objects, however the proximity setup doesn’t seem right. On a flat surface it works perfectly, however on corners there are intersections and weird stretching.
An ideas on how to setup the proximity nodes to possibly fix this error? maybe there’s a better way to get the splines that make up the branches to attach to an object.
Basically, what is happening is that you need to capture the face index of every instance-originating point’s closest face… later you can get the normal using this index along with the Sample Index node when doing the ray-cast. (you may be able to use Proximity node to get this normal but doubt the results will be good.)
Points that don’t hit the surface get deleted.
This sticks the end-points onto the surface, so in this method you’re basically placing simple lines so you’d need to heavily adjust the method to suit your needs.
Thank you so much for taking the time to explain this I really appreciate it.
I thought that this is how it might be done, but had no idea how…I’ve spent all day researching tutorials on raycast in the hope I could find something, tried some stuff and failed hard. How do you work this stuff out?
I’ll give it a try and see if I can adapt it to my setup, I’ll start at the “Set Position” and work my way back.
This part scares me.
I was going to try follow a tutorial for a Cobweb where the endpoints get attached and thought that might work and it looks like you’ve confirmed that…wish me luck!
Makes sense. I guess it’s got a lot to do with understanding the nodes and what they do, there’s also the math to consider.
I tried to adapt it to my setup but failed. I did your setup and tried to add to it, but I need to understand more about the curve lines so I can manipulate it…currently when I draw the spline onto an object straight line shoot off it (as per your setup) I want to be able to have a main trunk so to speak and have a few branches coming off it that are distorted, then I can add the leaves etc.
I’ll try a basic vine with branches and then try add the raycast stuff to it.
I managed to make the “Draw Vine” addon based off a tutorial…I took his setup and manipulated it to suit what I needed.
I then used Serpens to make the addon…Here’s the result.
here’s a more realistic example of how it’s to be used.
I can…it just depends on how your going to use it and how well you know serpens…I’m still learning and get a lot of help from the discord.
Essentially, you first add a Bezier curve to the scene with a run script, then append something to it like a geo nodes modifier, then at the end you select the curve and delete vertices and select the draw curve tool, also with a run script. The Reset Fields setup is to do exactly that reset/clear out any previous selections so they don’t appear again when executing the draw. I got the Draw Curve script asking ChatGPT and edited it to work, I know really basic coding.
I added some new scripts made in ChatGPT to delete the Vine_Leaf when deleting the modifier to start over if needed, otherwise the leaf gets left over and you have to delete it manually. (the vine leaf is part of the geo nodes nodetree with materials)
As well as when converting the geo nodes to a mesh it deletes the Vine_Leaf and renames the converted mesh from BezierCurve to (what ever name you want…just change it in the script)
Hey shawnbecker I used this tutorial and customized it to make it look like vines, I can’t remember exactly what I did as it was a while ago, but this is a good start.
The major difference was the noise added to the web to make it look a lot more like vines, then added leaves.
Does anyone have a better idea or setup for the spline to attach itself to the surface, rather than passing through it.
When drawing the spline on geometry with other geometry below or behind the face that’s been drawn on, the drawn spline passes through the geometry to attach itself to the closest points…I figure that is the work of the “Geometry Proximity” node.
Here’s the result of that.
Is it possible to have the drawn spline only attach itself to the distributed points based on the normal of the geometry…only attaching itself the correct normal facing side and ignoring points below those faces?..esentially taking the long route, rather than the shortest route.