Placing buildings along a spline

Hey everyone,
I’m trying to create a historic city environment by using procedurally placed buildings, but I’m having trouble with spline meshes. The system I’m trying to create is something like this one: Making Assassin's Creed Unity: Part 2 - Next Generation Technology - YouTube
Neither Landscape Splines or spline blueprints will work, so I need a sort of combination of the two. The problem with Landscape Splines is that they are really slow and you can’t edit buildings individually, and the problem with blueprint splines is that they aren’t automatically placed next to each other like Landscape Splines.

This is what I get with Landscape Splines:
However, when I use blueprint splines the meshes stretch out instead of lining up like that.

Any suggestions on what to try?


This is the demo object shown in the ContentExamples project you can download through the “Learn” tab in your Launcher:

Screenshot 2017-02-11 20.03.42.png

The Blueprint looks like this:

Screenshot 2017-02-11 20.03.42.png

You probably used a “set start and end” node. This will stretch your mesh to the start and end points you provided. In this Bluprint however, you only place meshes at a certain points, not its start and end.

Try playing around with it a little. Generally, study the ContentExamples project, it helped me very much!

EDIT: to get the meshes to be placed next to each other you’re going to have to adjust the number of meshes in this Blueprint. You could of course calculate how many meshes fit into it using the spline length and your mesh measures (provided you know the measures of your mesh). There are several good YouTube tutorials on this topic!

EDIT2: this is only a BP with a spline and a mesh variable where you’d place your building into…
As far as I know, spline meshes won’t let you customize each building the way the Anvil Engine of Assassin’s Creed does (but I don’t know for sure)

Thanks for the reply!
I’ve played around with that blueprint a bit before, and although I could get it to place the correct amount of buildings, I couldn’t get it to actually change the shape of the mesh to fit curves.(you can see in this image how the front of the building is narrower than the back: As far as customizing buildings, I don’t really need to change individual buildings as the player will just be walking along the street, but I do need to leave out spaces for alleys and intersections. If spline meshes won’t do that I might have to use a whole different program.

Thanks again for helping!

So then you only need to think about what you actually want to achieve.

Here is a simple road mesh I made using a spline mesh with setting start and end points:

Screenshot 2017-02-11 20.56.22.png

By using start and end points, the mesh automatically deforms so it connects to the mesh next to it (which is what you want). But as I demonstrated in the pic, using the spline points themselves as start and end points causes the meshes to get stretched or compress if you don’t spread the spline points evenly over the spline (which is what you don’t want =D).

All you have to do to change this is calculate your own start and end points instead of using the points that define your spline. These calculated points should be evenly spread over your spline and could be approximately based on the number of buildings that fit onto the spline (I guess it’s no big deal if it’s a bit inaccurate, as long as the strechting stays small enough so you don’t see it). This should be fairly easy though!


EDIT: for the alleys and such, I’d just place two of the spline meshes in your world and leave a gap between them… editing an “alley” feature to your spline mesh wouldn’t be worth the effort I guess

So if there is no way to add customization to a spline blueprint, would it be better to stick with Landscape Splines? The main problem I have with them is how slow they are, whenever I move, rotate, or scale a spline point the engine freezes for a few minutes and it’s pretty much impossible to do anything like that. The problem isn’t with my hardware as my PC is quite fast, but I really have no idea what could be causing it to go so slow.

Again, thank you for your help!

I think you should stick to spline meshes instead of landscape splines…

I’m not very sure of this, but I think the major difference between those two is that landscape splines can manipulate the landscape in order to make room for your mesh (like when you want to place a road on a mountain, it cuts down the cliff and places the road onto it… this can be seen on the Landscapes map in the ContentExamples project). This could also be what’s making it so slow for you.

If you really want to customize them the way it worked with the Assassin’s Creed engine, you should do some more research… Maybe it’s possible, I don’t know… But I don’t think it is…

If, however, you don’t need any customization in a scale like that, and all you want is a row of buildings that lock up with each other without stretching in a weird way, there shouldn’t be any problem using spline meshes the way I mentioned above!

EDIT: Also, I don’t think landscape splines allow for customization the way the Anvil engine allows. And when I talk about customization, I mean the ability to customize every building seperately, like choosing the number of storeys, picking another type of roof / facade… That sort of customization…

I can do without customization, that’s completely OK. I’m not just trying to make a street, I’m trying to make a small but complete city based on this map, and spending time adjusting the number of buildings on each spline BP wouldn’t work. I’ll try adjusting the resolution of the terrain and see if that helps.