[Question] Procedural Building System?

I realize that there is no Procedural Building System in UE4. So far I’ve just been grouping pieces together to make up part of a building and duplicate these groups around.

Is there a better way to do this using blueprint (my knowledge of blueprint is still incredibly basic)? Having the old system updated and brought to UE4 would be great as well!

You should do a UDN search for “Instanced Static Mesh”

and “InstancedStaticMeshComponent”

link 1

https://rocket.unrealengine.com/questions/2304/bp-generated-environments-how-doable-is-it-for-ful.html

link 2 with blueprint graph

https://rocket.unrealengine.com/questions/12074/question-detecting-collision-in-constructionscript.html
I’ve spawned over 4000 instanced static meshes in a small area without any FPS drop!

If you are doing procedural stuff

you will want Instanced Static Meshes!


#4146 Instanced Cubes

Here I spawned 1 cube for each and every vertex of a fairly complex rock

Rama

Instanced static meshes do have strong disadvantages though (at least they did in UE3), which could have an impact on the appearance and handling of your content. In UE3 instanced meshes were primarily used by the foliage system.

It would be nice if someone in-the-know could clarify exactly what the differences and ramifications are of using instanced mesh components in UE4 over normal mesh components.

Hi Luke,

With instanced static meshes, you are only really doing one draw call per instance type for all of the instances placed in the level of that type. On the whole, procedurally generated systems should utilize instanced static meshes as they are much less taxing. If you were to use regular static meshes, every mesh would be a separate call and you would notice problems with that pretty quickly in larger maps.

Cheers,

Alexander

Thanks everyone. This works great!

#Yay!

Congratulations!

Dont forget to share pics with us over on the forums!
http://forums.epicgames.com/forums/440

:slight_smile:

Rama

It should be noted that instanced meshes do not support lightmaps, thus do not support indirect lighting, and do not support collision in the current build. Thus they can pretty much only be used for foliage, distant things, or special FX.

You can however spawn regular meshes also in about the same way. That is what I do for my plants. Later on if ever instanced meshes work better you could then just switch that around in the BP.

This is the kind of info I was looking for when asking before - actual ramifications (rather than just a description of mesh instancing…).

I’m not using lightmaps, so I don’t have much of a problem. It’s also trivial to add a collision component if you need one too :slight_smile: