PCG Sampling Meshes - Unreal 5.2 Tutorial - Part 6

Поділитися
Вставка
  • Опубліковано 29 вер 2024
  • How to generate point data from meshes and use them to make plants grow on top of rocks.
    #ue5 #unreal #pcg #procedural #proceduralgeneration #tutorial

КОМЕНТАРІ • 81

  • @hbowles6273
    @hbowles6273 Рік тому +16

    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.

    • @deuuss1
      @deuuss1 Рік тому

      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?

    • @hbowles6273
      @hbowles6273 Рік тому

      ​@@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.

    • @deuuss1
      @deuuss1 Рік тому

      @@hbowles6273 Awesome! I'll give this a go. Thanks!

    • @deuuss1
      @deuuss1 Рік тому

      @@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.

    • @BoryslavF
      @BoryslavF Рік тому +1

      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

  • @maddocmiller6475
    @maddocmiller6475 Рік тому

    Best PCG Tutorials right now. Learned so much. Thanks!

  • @RobertoAyalaFotografo
    @RobertoAyalaFotografo Рік тому +4

    "Mesh to Points" is not visible in Unreal 5.3 Mac version, no idea on windows.

  • @TheSocket775
    @TheSocket775 Рік тому

    Man this is gold! Thanks a lot for sharing and keep up rocking! Haha

  • @ParikshitBhujbal
    @ParikshitBhujbal 10 місяців тому +2

    Is there any difference between using Mesh Sampler and MeshtoPoints nodes?

  • @antoninoatanasio8054
    @antoninoatanasio8054 Рік тому +9

    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.

  • @Demonleonardo
    @Demonleonardo 10 місяців тому +2

    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

    • @MrZzm88
      @MrZzm88 9 місяців тому

      me too. It looks like this plugin is changing very fast.

    • @OmidGhajar
      @OmidGhajar 8 місяців тому +4

      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.

  • @haiyangzhao4469
    @haiyangzhao4469 11 місяців тому +2

    I can't find the node "mesh to point" in UE5.3

    • @Gulzt
      @Gulzt 6 місяців тому

      It's now called "Mesh Sampler"

  • @TheMalarz1989
    @TheMalarz1989 11 місяців тому +1

    7 months have passed and there is no Mesh to Points node any more. What is the new name of that node?

  • @tonylai6702
    @tonylai6702 6 місяців тому +1

    How can I make the points spawn on the mesh instead of at the world origin?

    • @Gulzt
      @Gulzt 6 місяців тому +1

      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.

  • @MitchelWild
    @MitchelWild Рік тому +3

    I had to use BP_Element_MeshtoPointsWithColors. 5.2 - 5.29.12. Worked like a charm. Thanks man

  • @hgsupertramp
    @hgsupertramp 5 місяців тому

    Mesh to Points don't exist on 5.3 anymore, Thanks Unreal!

  • @Dhieen
    @Dhieen 2 місяці тому

    how do you spawn the trees on top of the rocks that are not placed with pcg but by hand?

  • @AMARNATHS-db5yk
    @AMARNATHS-db5yk 3 дні тому

    I'm trying this one

  • @TheEsborn
    @TheEsborn Рік тому +3

    Fantastic series, thanks for this:) Would be great if you could do one for only spawning on a spesific material or landscape layer.

    • @FreetimeCoder
      @FreetimeCoder  Рік тому +1

      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.

  • @suke0408
    @suke0408 3 місяці тому

    Three assets are placed at each vertex. Is there a way to place them into one?

  • @DarkTowerInt
    @DarkTowerInt Рік тому +1

    Can you make a sample for a procedural village? With roads / houses / props / walls?

    • @funforgiven
      @funforgiven Рік тому +1

      Yeah, it would be really good to see everything combined.

  • @HYPERGIRLAI
    @HYPERGIRLAI 2 місяці тому

    Nice work...I don't think 5.4 has MeshToPoints node? I can't find it...?

    • @Kno3Breakfast
      @Kno3Breakfast 2 місяці тому

      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.

  • @LoongKinGame
    @LoongKinGame 6 місяців тому

    Where is mesh to point?????????????

  • @忆寒0128
    @忆寒0128 2 місяці тому

    why i no have mesh to point

  • @tayayoung6031
    @tayayoung6031 Рік тому +1

    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!

    • @tayayoung6031
      @tayayoung6031 Рік тому

      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)

    • @TheClanOfHari
      @TheClanOfHari Рік тому

      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 .

    • @Ymoriart
      @Ymoriart Рік тому

      @@TheClanOfHari Hey, did you found a solution ? I have the exact same problem

  • @MsColey10
    @MsColey10 Рік тому +1

    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.

    • @FreetimeCoder
      @FreetimeCoder  Рік тому +2

      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.

    • @mattmillus
      @mattmillus Рік тому

      @@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

    • @richardvaasone5658
      @richardvaasone5658 Рік тому

      @@mattmillus try copyPoints to copy the points from wherever they spawn to the static mesh that you spawn in the graph

  • @danielbalzer3524
    @danielbalzer3524 Рік тому

    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!

  • @henryyamin
    @henryyamin Рік тому

    what if I'm manually placing instances? How do I scatter on manually placed instances from a static mesh?

  • @robertnavarrete4424
    @robertnavarrete4424 Рік тому +1

    i dont have the node mesh to points i don't know why

    • @TheClanOfHari
      @TheClanOfHari Рік тому

      You should have mesh sampler and to point nodes separately

  • @marcelenderle4904
    @marcelenderle4904 Рік тому

    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

  • @markamaik3315
    @markamaik3315 Рік тому

    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

  • @EvrenSaracgilArchitecture
    @EvrenSaracgilArchitecture Рік тому

    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.

  • @KaelthasProductions
    @KaelthasProductions 8 місяців тому

    Do i really need to have an input mesh? what about if i want the points floating in the air

  • @SagunManandhar
    @SagunManandhar 11 місяців тому

    Hi, Is it possible to sample vertices from alembic cached geo instead of static mesh ?

  • @raphaelaugusto1
    @raphaelaugusto1 Рік тому

    Thank you very much, it helped a lot to understand.

  • @TheClanOfHari
    @TheClanOfHari Рік тому

    My points are at origin and how to transform them to the target without moving target?

  • @ubaid3603
    @ubaid3603 Рік тому

    thanks, but how to get multiple mesh with tags? like spline

  • @TheWraitz
    @TheWraitz Рік тому

    Do not add a Nanite Mesh xD Crashes instantly.

  • @Slapdash86
    @Slapdash86 11 місяців тому

    Superb tutorials! Great style and page

  • @ryanjstever
    @ryanjstever Рік тому

    Im loving it! Appreciate it soooo much!

  • @vekuhudesign7382
    @vekuhudesign7382 Рік тому +1

    I can't find Mesh to Point Node. I can see only MeshSocketstoPoint. What could be the reason?

    • @GvRDesigns
      @GvRDesigns Рік тому +5

      I think you need to put in a Execute Blueprint node then under Template/Blueprint Element Type you will find MeshToPoints Node

    • @vekuhudesign7382
      @vekuhudesign7382 Рік тому

      @@GvRDesigns Thankyou 👍

    • @MitchelWild
      @MitchelWild Рік тому

      @@GvRDesigns Ty sir

    • @NickNenov
      @NickNenov Рік тому

      @@GvRDesigns thanks for the tip, I wonder why in the video he got it just by typing it?

    • @thegeooclarke
      @thegeooclarke Рік тому

      @@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

  • @louisveran2439
    @louisveran2439 7 місяців тому

    It helps a lot, thank you :)

  • @johnym9051
    @johnym9051 Рік тому

    This is so brilliant tutorial series. Thank you! I hope you will continue with this :)

  • @istealpixel7371
    @istealpixel7371 Рік тому

    dream come true :)

  • @hugoducrocq4428
    @hugoducrocq4428 Рік тому

    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 ?

    • @FreetimeCoder
      @FreetimeCoder  Рік тому

      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.

    • @haneetkhanna1883
      @haneetkhanna1883 Рік тому +1

      @@FreetimeCoder mesh to points is not there in 5.2. or they changed its name. can you help with that

  • @Utopia2023Game2
    @Utopia2023Game2 Рік тому

    good job

  • @Lv7-L30N
    @Lv7-L30N Рік тому

    gracias

  • @ryanjstever
    @ryanjstever Рік тому

    there is no "Mesh to Points" node anymore. What do we use now?

    • @Buubbles
      @Buubbles Рік тому +7

      Execute Blueprint node -> In Blueprint Element Type, choose MeshToPoints

    • @MrZzm88
      @MrZzm88 9 місяців тому

      @@Buubbles you are a hero!

  • @haneetkhanna1883
    @haneetkhanna1883 Рік тому

    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

    • @Buubbles
      @Buubbles Рік тому

      Use Execute Blueprint node -> In Blueprint Element Type, choose MeshToPoints

    • @scoster3328
      @scoster3328 11 місяців тому

      You can also find it in content browser, go to engine and search for meshtopoints open it and expose it to library

  • @daliborsailovic8100
    @daliborsailovic8100 Рік тому

    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

    • @Ymoriart
      @Ymoriart Рік тому

      I have the same problem, did you found a fix for that ?

    • @OverJumpRally
      @OverJumpRally Рік тому

      @@Ymoriart You need to use the node Copy Points.