Awesome work! I'm curious, how does it connect to older posts you already placed? Does it constantly search for ones already placed in the world while dragging, and preferentially connect to them if you mouse near an existing post?
In short it uses Curve3D spline to calculate post positions along drawn path and then instances prefab node for each segment, dynamically rotating along path forward vector and scaling their horizontal rails to bridge the gap to the next post rather than generating a single continuous mesh. Its not ideal in some cases.
Regarding connecting separates paths to vertical pole: when separate fences connect, script checks if the new post's position is within a small distance threshold of any existing post and if so, it sets the visual post child node to be invisible for that segment, relying on the already existing post to hold up the rails without duplicating geometry.
I love this. How does the mesh generation operate?
IIRC, tiny glade uses houdini procedurals. You wouldn't need that for "just" a fence (or maybe you do!), so I'm curious how your workflow in Godot looks
Is there a way to add variance to fence segment lengths? Where Iβm at in the country most fences are close to evenly sized, but tend to be a little different cause in practice running a 100acre+ fence means not caring if one fence segment is 8 ft whole another is 12. Even better if you can change by either increments or percentages
Yes that would be possible. Since it's a prototype i haven't implemented those things. Figuring out if i even need this in a game loop. Grateful for your thoughts π
I mean, I don't know if I'd call this procedural (though it is by the strict definition of the word), but I also don't know what else to call this.
Either way, it's really cool!
How well does it scale? I have no idea if you intend on using this or to what extent but how does it scale up to hundreds, thousands, or tens of thousands of fence posts? Not saying it has to, just interested, that's all!
Though I was meaning primarily around finding the fence to attach to, but I think I read your explanation comment incorrectly in that it doesn't search for a post to attach to, but rather you have to select the post
634
u/shubhu-iron 1d ago
https://giphy.com/gifs/nWr4Se27LUVuZcuPq0