5.2 Procedural Content Generation spawning on Megascan Assets

Hi, I’m using Unreal 5.2 and using Procedural Content to try spawn static meshes (Huts and houses) on another larger Static mesh from Megascans ( A large snow hill).

I was following this tutorial - Procedurally generate content on actors in UE5.2 - YouTube

I cannot get the huts to spawn on the hill. I think it has something do to with the collision of the Hill from Megascans, cause when I go into the static mesh and add a simple box collision, then suddenly points appear but results are bad - see below

Try looking at the mesh collision in the static mesh editor. It’s probably too simple. You could try changing the collision setting to ‘use complex as simple’.

Ive tried that, When I change to complex as simple in the static mesh, PCG graph doesn’t work at all. It’s weird cause I’ve tested this on a simple cube. (Make BP, add Cube as static mesh, drop BP in level, add PCG graph to BP and it spawns points). No complicated geo/mesh works, like a hill. Any suggestions or tutorials anybody knows? Thanks

Use complex as simple, with block all. ( It might be on ‘block dynamic’ ).

Thanks I tried that and it doesnt work unfortunately. It only spawns points at top.

Is that hill available from MS as a single mesh? If so, what is its name? If not, then maybe you could upload it here as an FBX, and I’ll take a look.

Yeah its a single mesh I downloaded from MS - Huge_Snow_Hill_vdspdazqa. Thanks for helping, appreciate it. Let me know if you can get it working. thanks

As you can see, the collision is the correct shape now

I’m wondering about your PCG graph, can you show that?

My collision looks the same as yours above, see below. Have you tested the PCG graph on this, does it spawn points on hill because my still only spawns cubes at top? My PCG graph is simple getActorData node attached to SurfaceSampler node. The GetActorData node settings below. Selection tag ‘ledge’ is linked to the BP_Hill.



image

I agree, the lack of info on this stuff is astonishing…

3 Likes

Yeah, and alot of the youtube videos on PCG are outdated as the nodes have been replaced with new ones for 5.2. I’ll try your solution. I did find another solution, I followed this tutorial - Spawn vines on any mesh procedurally! - Unreal 5.2 PCG - Part 1 - YouTube and it worked but instead of using MeshSampler node at 3:59min (which i couldnt find), I used the MeshToPoints node (adding an execute blueprints node and choosing MeshToPoints from blueprint element type dropdown menu). So the issue wasn’t really the collision, its using the right nodes. Thanks again for your help, appreciate it.

1 Like