Thank you for this! The 5.2 release version (or at least next preview release) will have a node that directly interops with Geometry Script. This gives nice additional sampling options like poisson sampling, and better perf. It will be enabled by enabling the "Procedural Content Generation Framework Geometry Script Interop" plugin and then dropping in a "Mesh Sampler" node.
Hi there! Interesting, I've been trying to create a custom bp for sampling all the meshes with a tag and then looping through them and adding points on top, but even if I can do that with geo spripting I cannot bypass the mesh to points so I still need to specify one mesh (which does not really scale well). Have you try anything on that area?
@@deuuss1 I think a solution is to use Get Actor Data with a given tag that you apply to all the relevant actors, and connect it to a BP node that loops over results and selects primitive components, and then gets the mesh from them. In the final 5.2 release, these instructions would be a bit saner - use a Get Primitive Data node to get the primitive components from the actors you're interested in, which can be direclty passed into the BP which can get the meshes from them.
@@hbowles6273 Is there any documentation on this? Sorry to keep bothering, Im gettting the primitive data on the graph and Im casting to pcgprimitivedata on the BP but cannot seem to figure out how to get the static mesh from that.
Dude you are flying!!! I'm following all of your tutorials closely and learning a lot from them, please upload more, like a machine. Very good explanations by the way, concise and on point.
Hey, dude, I am using Unreal 5.3.1, I can't find the node named "Mesh To Points", I just find the mesh sampler, point from mesh, but while I tried to use these two nodes to generate the same thing just like you, it doesn't work as I expect, do you know how to make it in Unreal 5.3.1? thx for your help
In UE5.3, you need to enable another PCG plugin alongside the main one and it's calls The Procedural Content Generation Framework Geometry Script Interop plugin which is required to sample points on Static Meshes.
Following the previous tutorial, first create an actor with a PCG component. Then use the graph from this here tutorial in that component. In the PCB Graph, find the "Get Actor Data" node, set its Actor Filter to Parent and the Mode to Get Single Point. Drag a wire from Out and find the `Attribute Maths Op Add`- node. Take the Mesh Sampler node's out and feed it to `In A`, and the Get Actor Data Out into `In B`. On the Add node, change both Input Source 1 and Input Source 2 to $Position. This will offset each point to match the actor parents location.
It has been replaced with "Mesh Sampler". If any blueprint is missing you can use the node "Execute Blueprint" and you can use old blueprints from there and it will outright tell you if it has been depreciated and the name of the new node.
Hi, when I sample my points from my mesh and put mesh and pcg volume to the same location, the points don't overlap. it seems like the points are generated in the corner of my volume instead of the middle. Does anybody know how to fix that? Thank you for the tutorial!
Figured it out. it doesn't care where the mesh is in unreal engine. it goes by the pivot point of the original mesh (since I exported a large grass section of an architectural environment which was not at 0,0,0 it got wonky)
I need help! I copy and paste mesh reference into the mesh to points node. The mesh is showing in the static mesh slot but nothing is happening. There is no debug info from the mesh. It's not linking to my PCG.
By default the mesh sampled points will be at the world origin. If your PCG is too far off you might be looking in the wrong location. Alternatively put them through a Transform Points and enable debugging with the Scale Method "Relative". The points could be too small to see otherwise.
@@FreetimeCoder Same issue here, no debug points show up. My PCG graph and mesh have the exact same loc/rot/scale, its just the default FPS project with the SM_Statue mesh dropped in
Great tutorial 🙏 quick question: is it somehow possible to use blueprints within the static mesh spawner? I have assembled different types of platforms within blueprint actors I would like to scatter around a tree but it just lets me use a single mesh. Thanks for the tutorial series on PCG!
Thank you for this series, it helpd me alot! For everyone that wants to spawn meshes into other meshes and use then in your level, procedural or not, you have to instal the procedural content generation framework geometry scrpit plugin to use the mesh sampler node. From that, using copy node you can easily spawn stuff over other meshes. This tutorial is also great: ua-cam.com/video/ZXh6oesGTGg/v-deo.html
Any way to reduce the size / amount of the points on the mesh? I get really big points on the mesh that essentially covers the whole rock. When putting another mesh on top of it like in the video the static mesh spawner object covers the entire rock. Help would be appreciated
There doesn't seem to be a way to eliminate points on the intersection surfaces of overlapping rocks, distributing the points only to the visible surfaces of the rocks, just like projecting onto the terrain.
Amazing tutorial thank you ! How can we apply this technique with multiple mesh entries ? it is possible, like to add thing on multiple different meshe or we had to dupicalte everytime the Mesh to point to put the right mesh corresponding inside ?
Thanks! For now it's only one mesh per sampler so you'll need to do a bit of copy pasting yeah. The mesh sampler is a BP though so you could also attempt to reverse engineer a multi sampler.
Hey there, my points are always at 0, 0, 0 world position and can not find a way to change it. Anyone know how to do that? I m using latest 5.2 version. @FreetimeCoder
Thank you for this!
The 5.2 release version (or at least next preview release) will have a node that directly interops with Geometry Script. This gives nice additional sampling options like poisson sampling, and better perf.
It will be enabled by enabling the "Procedural Content Generation Framework Geometry Script Interop" plugin and then dropping in a "Mesh Sampler" node.
Hi there! Interesting, I've been trying to create a custom bp for sampling all the meshes with a tag and then looping through them and adding points on top, but even if I can do that with geo spripting I cannot bypass the mesh to points so I still need to specify one mesh (which does not really scale well). Have you try anything on that area?
@@deuuss1 I think a solution is to use Get Actor Data with a given tag that you apply to all the relevant actors, and connect it to a BP node that loops over results and selects primitive components, and then gets the mesh from them.
In the final 5.2 release, these instructions would be a bit saner - use a Get Primitive Data node to get the primitive components from the actors you're interested in, which can be direclty passed into the BP which can get the meshes from them.
@@hbowles6273 Awesome! I'll give this a go. Thanks!
@@hbowles6273 Is there any documentation on this? Sorry to keep bothering, Im gettting the primitive data on the graph and Im casting to pcgprimitivedata on the BP but cannot seem to figure out how to get the static mesh from that.
I've been looking for something like the Mesh Sampler node since the start. You're a godsend to let me know that it exists! :D
Best PCG Tutorials right now. Learned so much. Thanks!
"Mesh to Points" is not visible in Unreal 5.3 Mac version, no idea on windows.
Man this is gold! Thanks a lot for sharing and keep up rocking! Haha
Is there any difference between using Mesh Sampler and MeshtoPoints nodes?
Dude you are flying!!! I'm following all of your tutorials closely and learning a lot from them, please upload more, like a machine.
Very good explanations by the way, concise and on point.
Hey, dude, I am using Unreal 5.3.1, I can't find the node named "Mesh To Points", I just find the mesh sampler, point from mesh, but while I tried to use these two nodes to generate the same thing just like you, it doesn't work as I expect, do you know how to make it in Unreal 5.3.1? thx for your help
me too. It looks like this plugin is changing very fast.
In UE5.3, you need to enable another PCG plugin alongside the main one and it's calls The Procedural Content Generation Framework Geometry Script Interop plugin which is required to sample points on Static Meshes.
I can't find the node "mesh to point" in UE5.3
It's now called "Mesh Sampler"
7 months have passed and there is no Mesh to Points node any more. What is the new name of that node?
How can I make the points spawn on the mesh instead of at the world origin?
Following the previous tutorial, first create an actor with a PCG component. Then use the graph from this here tutorial in that component.
In the PCB Graph, find the "Get Actor Data" node, set its Actor Filter to Parent and the Mode to Get Single Point.
Drag a wire from Out and find the `Attribute Maths Op Add`- node. Take the Mesh Sampler node's out and feed it to `In A`, and the Get Actor Data Out into `In B`.
On the Add node, change both Input Source 1 and Input Source 2 to $Position.
This will offset each point to match the actor parents location.
I had to use BP_Element_MeshtoPointsWithColors. 5.2 - 5.29.12. Worked like a charm. Thanks man
me too
Thanks, this was helpful
Mesh to Points don't exist on 5.3 anymore, Thanks Unreal!
how do you spawn the trees on top of the rocks that are not placed with pcg but by hand?
I'm trying this one
Fantastic series, thanks for this:) Would be great if you could do one for only spawning on a spesific material or landscape layer.
From what I can tell there are no nodes for sampling landscape layers yet. But it's early days I'm sure we'll get more nodes in time.
Three assets are placed at each vertex. Is there a way to place them into one?
Can you make a sample for a procedural village? With roads / houses / props / walls?
Yeah, it would be really good to see everything combined.
Nice work...I don't think 5.4 has MeshToPoints node? I can't find it...?
It has been replaced with "Mesh Sampler". If any blueprint is missing you can use the node "Execute Blueprint" and you can use old blueprints from there and it will outright tell you if it has been depreciated and the name of the new node.
Where is mesh to point?????????????
why i no have mesh to point
Hi, when I sample my points from my mesh and put mesh and pcg volume to the same location, the points don't overlap. it seems like the points are generated in the corner of my volume instead of the middle. Does anybody know how to fix that? Thank you for the tutorial!
Figured it out. it doesn't care where the mesh is in unreal engine. it goes by the pivot point of the original mesh (since I exported a large grass section of an architectural environment which was not at 0,0,0 it got wonky)
Yeah they spawn at origin. How to transform the points now to the mesh? I am not using a mesh spawner to generate my target mesh .
@@TheClanOfHari Hey, did you found a solution ? I have the exact same problem
I need help! I copy and paste mesh reference into the mesh to points node. The mesh is showing in the static mesh slot but nothing is happening. There is no debug info from the mesh. It's not linking to my PCG.
By default the mesh sampled points will be at the world origin. If your PCG is too far off you might be looking in the wrong location. Alternatively put them through a Transform Points and enable debugging with the Scale Method "Relative". The points could be too small to see otherwise.
@@FreetimeCoder Same issue here, no debug points show up. My PCG graph and mesh have the exact same loc/rot/scale, its just the default FPS project with the SM_Statue mesh dropped in
@@mattmillus try copyPoints to copy the points from wherever they spawn to the static mesh that you spawn in the graph
Great tutorial 🙏 quick question: is it somehow possible to use blueprints within the static mesh spawner? I have assembled different types of platforms within blueprint actors I would like to scatter around a tree but it just lets me use a single mesh. Thanks for the tutorial series on PCG!
what if I'm manually placing instances? How do I scatter on manually placed instances from a static mesh?
i dont have the node mesh to points i don't know why
You should have mesh sampler and to point nodes separately
Thank you for this series, it helpd me alot!
For everyone that wants to spawn meshes into other meshes and use then in your level, procedural or not, you have to instal the procedural content generation framework geometry scrpit plugin to use the mesh sampler node. From that, using copy node you can easily spawn stuff over other meshes. This tutorial is also great: ua-cam.com/video/ZXh6oesGTGg/v-deo.html
Any way to reduce the size / amount of the points on the mesh?
I get really big points on the mesh that essentially covers the whole rock. When putting another mesh on top of it like in the video the static mesh spawner object covers the entire rock. Help would be appreciated
There doesn't seem to be a way to eliminate points on the intersection surfaces of overlapping rocks, distributing the points only to the visible surfaces of the rocks, just like projecting onto the terrain.
Do i really need to have an input mesh? what about if i want the points floating in the air
Hi, Is it possible to sample vertices from alembic cached geo instead of static mesh ?
Thank you very much, it helped a lot to understand.
My points are at origin and how to transform them to the target without moving target?
thanks, but how to get multiple mesh with tags? like spline
Do not add a Nanite Mesh xD Crashes instantly.
Superb tutorials! Great style and page
Im loving it! Appreciate it soooo much!
I can't find Mesh to Point Node. I can see only MeshSocketstoPoint. What could be the reason?
I think you need to put in a Execute Blueprint node then under Template/Blueprint Element Type you will find MeshToPoints Node
@@GvRDesigns Thankyou 👍
@@GvRDesigns Ty sir
@@GvRDesigns thanks for the tip, I wonder why in the video he got it just by typing it?
@@NickNenov just purely because of the version he was using. There have been updates since and they have rejigged a few of the nodes around
It helps a lot, thank you :)
This is so brilliant tutorial series. Thank you! I hope you will continue with this :)
dream come true :)
Amazing tutorial thank you ! How can we apply this technique with multiple mesh entries ? it is possible, like to add thing on multiple different meshe or we had to dupicalte everytime the Mesh to point to put the right mesh corresponding inside ?
Thanks! For now it's only one mesh per sampler so you'll need to do a bit of copy pasting yeah. The mesh sampler is a BP though so you could also attempt to reverse engineer a multi sampler.
@@FreetimeCoder mesh to points is not there in 5.2. or they changed its name. can you help with that
good job
gracias
there is no "Mesh to Points" node anymore. What do we use now?
Execute Blueprint node -> In Blueprint Element Type, choose MeshToPoints
@@Buubbles you are a hero!
why cant i see the mesh to points command in my unreeal engine 5.2. what am i doing wrong. i only see mesh sockets to points
Use Execute Blueprint node -> In Blueprint Element Type, choose MeshToPoints
You can also find it in content browser, go to engine and search for meshtopoints open it and expose it to library
Hey there, my points are always at 0, 0, 0 world position and can not find a way to change it. Anyone know how to do that? I m using latest 5.2 version. @FreetimeCoder
I have the same problem, did you found a fix for that ?
@@Ymoriart You need to use the node Copy Points.