Hi I have tried practically every procedural spline and instance static mesh tutorial On youtube and while they work I keep having the same issues over and over again and could use some advice.
I Dont want my meshes to be deformed and I want them to be direct lines to each mesh that rotates on the meshs Pivot point EG: the fence post,
But im really struggeling make a BP that automatically does this.
Maybe by automatically placing a spline point at each section length Under each post would work But so far I have not been able to make this happen.
some pics for ref.
First pic is spline mesh
version deforming my meshes.
Second pic is instance static mesh version where I have manually set spline points to linear but it also no behaving correctly like I want But this pic highlights how I want it to look and function.
I also found that if I used the bounding box of the meshes for the section size the meshes don’t get close enough to connect correctly. so Im currently using a manual input number.
as you can see I have a bunch of issues.
Questions
How can I make it anatomically place a spline point at the same place under each post??.
How to prevent deforming the meshes?
How to hard code the spline to only create linear point so they are straight and not curved?
Hi. To make a fence with a straight meshes and correct corners you have to calculate the tangents properly as well as the amount of spline meshes between the corners so that the mesh ends exactly at the corner. If you want to save time and effort here is an asset that does it all and much more.
Thanks, but Im want to also Sell most of the assets in the pictures On the marketplace As I need to start building up my passive income & I spent a lot of time on them and then typically left them to rot.
Just wanted to add a bit more functionality to the fence panels before I did.
Just thinking out loud, but seems like the most practical way to do something like this, would be to place a point, then look for a place along the spline to place a new point that’s a certain distance from the previous point. Not sure the best way to do this, first thought is to make an array with a bunch of points along a spline, go through the array and find the first point that’s slightly more than the target distance, and place a new point.
Yup, it works, just add a look at for the current vector location and the future vector location, and plug that into the rotation. Had to turn the samples up to 800 for the accuracy to be good enough, but it’s still fast and interactive.
Nah, seems super cheap, placing a few hundred works at very responsive/interactive speeds. Works in 3d space too, so hills are no problem. Although you’ll want to place the pivot as close to the interlocking part as possible if you’re doing a lot of height variation.
Also note that the accuracy needs to be increased as the length increases, since it’s a fixed value. Super high accuracy does add lag.
Here’s the final BP I used btw. Probably plenty of improvements to add, like you could find the bounds of the static mesh instead of using a greater than with a manual input.
quick question for those get nodes, Are you using get copy or get ref?
Im not even going to pretend I understand what I just copied. But its not spawning meshes and Im not sure what I missed.
is the samples var set to zero?
Update: I figured out I need to set an amount of samples
Question about how to improve accuracy, Like you mentioned as Its pulling a part and overlapping a bit while dragging the spline points. Cant seem to make it really hold to the fence post point.
WOW, Nice find and thanks for telling me
I will try this out now!
UPDATE! its a good one But Im not sure how they are preventing the spline mesh components from deforming Like in the above picture as This its still deforming my meshes, And I think the bounding box Issue prevents my meshes getting close enough to look connected
On a separate note I have this BP thats almost perfect apart from the fact that its squishing the meshes at each end and Im unable to solve it But I KNOW Its a issue with tangents because if I CHANGE THE CLAMPS to the section length they look ok But just not connecting again.