Unreal Engine 5.2 PCG - Short Ep 1 - Sampling on any static meshes

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 2024

ความคิดเห็น • 73

  • @alyxlarsen2144
    @alyxlarsen2144 2 หลายเดือนก่อน +1

    Thank You!!!!! I have been looking for this for hours!!

  • @mihaiwilson
    @mihaiwilson 2 หลายเดือนก่อน

    Thanks so much, didn't realize these features had been added - super useful.

  • @user-nb3kg9hk8x
    @user-nb3kg9hk8x 2 หลายเดือนก่อน +1

    5.4
    World Ray Hit Query
    Override Default Params => Set Ray Parameters

  • @ianchristensen8116
    @ianchristensen8116 ปีที่แล้ว +1

    I like the format. Looking forward to more of these!

  • @as2onish
    @as2onish ปีที่แล้ว +4

    Great video! I like this style, the way you walk through the potential problems/gotchas. Only feedback, you mentioned in 5.3 there will be a different way to do a dependency. It would have been nice to at least get a sentence about how that will work. It would make the useful lifespan of this video a bit longer.

    • @adrienlogut3482
      @adrienlogut3482  ปีที่แล้ว +3

      Right! It will be the Gather node there will be an extra pin

  • @Yarogor
    @Yarogor 11 หลายเดือนก่อน +1

    THANK you! That help me a LOT.

  • @NorwinLabs
    @NorwinLabs 4 วันที่ผ่านมา

    Is there a reason that my PCG volume stops generating foliage when used on a procedural mesh? I am using a procedural mesh for my landscape and a pcg volume for foliage. After a specific chunk, the foliage just stops. Any reason why you know of?

  • @MMALAB
    @MMALAB 8 หลายเดือนก่อน

    Great video, I've learned so much. I have a question, in my ue5 project I have a house -a mesh, imported from blender and I use PCG to generate grass on a landscape. I can't figure out how exclude grass, because it is inside the house as well.

    • @adrienlogut3482
      @adrienlogut3482  8 หลายเดือนก่อน

      Check my other video :)
      th-cam.com/video/IE9Evj5suYA/w-d-xo.html

  • @je_architektur
    @je_architektur 3 หลายเดือนก่อน

    Great video, it's a good introduction to pcg. I have a question about a scenario like the first example. I have hand placed static meshes on a very large area, and I want to place grass on them, using a tag filter. Unfortunately, the problem is that apparently all points are sampled in the background and then filtered so that only those on the static mesh remain.
    To replicate i have a cupe with tag, the tag filter in the world ray node an (my densidy is quite high with about 30 objects on the cube. When the pcg is scalled, there are still 30objects but at one point i have an error that more than 300.000.000 points are generated and it crashes.

    • @adrienlogut3482
      @adrienlogut3482  3 หลายเดือนก่อน

      Indeed the surface sampler will generate a grid on the top of the volume then project them, and keep the point if it hits something.
      So yeah, it's not practical in your use case. You might be better off having a custom actor with your static mesh and a PCG component on top, with some bounding box. With this the generation will be constraint to the mesh, and not the whole world.
      Or use a Get Actor Data on all world actors to get all your meshes positions and generate only in this location, but that's a bit more complex :)

  • @goncalosoares8483
    @goncalosoares8483 ปีที่แล้ว

    Awesome, could you make one on how to use attributes to override nodes' properties. Like how to select an actor based on attributes

    • @adrienlogut3482
      @adrienlogut3482  ปีที่แล้ว +1

      That's not really possible in 5.2, at least not without manually add Spawn Actor nodes for each different actor you want to spawn. It will be possible in 5.3 though.

    • @HappyCamper1206
      @HappyCamper1206 ปีที่แล้ว

      ​ @adrienlogut3482 Is this currently possible in the 5.3 preview or is this something that will be possible in future 5.3 updates? And if it is currently possible could you point me in the direction of how that can be achieved?

  • @Arlski
    @Arlski 6 หลายเดือนก่อน

    Thank you!

  • @ArtfulSem
    @ArtfulSem 3 หลายเดือนก่อน

    how to change execution queue in 5.3 ?

    • @adrienlogut3482
      @adrienlogut3482  3 หลายเดือนก่อน

      I imagine you refer to the order of execution? If so, It's the Gather node, you can plug data that is needed for dependency but doesn't need to be used with the Dependency Only pin on the Gather node.

  • @Lazarosinep
    @Lazarosinep 6 หลายเดือนก่อน

    This stacking is amazing! Is it possible to use this method to draw splines and have them spawn meshes on top of an existing, same blueprint spline?
    Let's say I use a spline to spawn boxes, and I want to use the same spline 10 times, to spawn boxes on top of already spawned boxes. Is this possible? Can you make a video for this?
    Thanks!

  • @anotherreality7951
    @anotherreality7951 4 หลายเดือนก่อน

    is it possible to combine static mesh blueprint with PCG ?

    • @adrienlogut3482
      @adrienlogut3482  3 หลายเดือนก่อน

      Yes, you can use the Spawn Actor with Collapse Actor, it will extract the static mesh component from the actor. Or you can even spawn as a normal actor, with the no merging option, but it will be slower if you have a lot of them.

  • @tmaintv
    @tmaintv 8 หลายเดือนก่อน

    This is a great way to do videos. Really helpful and smart. I’d like to ask if you have any advice on combining the ray cast with the texture sample node at all. I have got both elements working but not together as of yet. Any advice would be appreciated

    • @adrienlogut3482
      @adrienlogut3482  8 หลายเดือนก่อน +1

      Hi! I don't think you can use the world Ray hit query node as is on a texture.
      On a simple case, let's say you have a square with the texture in your world and you use the world Ray hit query. If you know the size of your texture, you can transform the position of the points sampled between -1 and 1, like texture UV and then use the projection node with the texture as projection target.

    • @tmaintv
      @tmaintv 8 หลายเดือนก่อน +1

      Thanks, that makes sense. I’ll keep trying and report back if I have any luck

    • @eris4196
      @eris4196 4 หลายเดือนก่อน

      @@tmaintv Hey! Could you figure it out?

    • @tmaintv
      @tmaintv 4 หลายเดือนก่อน

      ⁠​⁠@@eris4196I haven’t got back to it I’m afraid. I believe it is possible but haven’t had a chance to work on it again yet. If I do I’ll let u inow

    • @eris4196
      @eris4196 4 หลายเดือนก่อน

      @@tmaintv thank you!

  • @lesan001
    @lesan001 5 หลายเดือนก่อน

    how would i go about spawning around a hand placed mesh?

    • @adrienlogut3482
      @adrienlogut3482  3 หลายเดือนก่อน +1

      Get Actor Data allows to gather actors in the world, so you could tag your hand place meshes and use their positions to generate stuff around.

  • @sincosFly
    @sincosFly 11 หลายเดือนก่อน +1

    How can i to combine with Spline?

    • @adrienlogut3482
      @adrienlogut3482  10 หลายเดือนก่อน

      Depends on what you want to do, but you can project your spline on this abstract surface too :)

    • @sincosFly
      @sincosFly 10 หลายเดือนก่อน

      @@adrienlogut3482 I want to limit PCG area by spline. Not by PCG volume.

    • @adrienlogut3482
      @adrienlogut3482  10 หลายเดือนก่อน

      Spline sampler on interior to use as an intersection with all your sampling.

    • @sincosFly
      @sincosFly 10 หลายเดือนก่อน

      @@adrienlogut3482 I know.... but i have try load PCG graph by Blueprints actor... this tuts is not working.

    • @adrienlogut3482
      @adrienlogut3482  10 หลายเดือนก่อน

      Not sure what your problem is then, you can come ask it in the discord channel with an explanation of what you are trying to achieve and some screenshots/videos: discord.com/channels/187217643009212416/1089670031782191145

  • @romank3157
    @romank3157 11 หลายเดือนก่อน

    Ok, now generation on spawned PCG meshes works well with "Gather" node in 5.3. But, I have a question. How do you use "Bounding shape" pin of the surface sampler with world partition? It seems that if you try to feed anything in it, for example - a set of points, defined by the spline, it creates duplicates of all the points generated by the surface sampler within that bounding shape for each PCG partition actor. Is this a bug? Or just the way how surface sampler works with world partition? Beacuse it looks like, by default, it uses the bounds of each partition actor.

    • @adrienlogut3482
      @adrienlogut3482  11 หลายเดือนก่อน

      By default it will indeed use the bounds of each partition actor. But if you feed anything else, it will use it and that's your responsibility to make sure that this bounding Shape is the intersection between your data and the bounds of the partition actor (which you can get with GetActorData with self)

    • @romank3157
      @romank3157 11 หลายเดือนก่อน

      @@adrienlogut3482 Thanks, that's worked! Actually, already figured that out after watching previous video.

    • @romank3157
      @romank3157 11 หลายเดือนก่อน

      ​@@adrienlogut3482 Another question: is there a way to diable pcg nodes execution if there are no data in the input? It seems that when pcg partionion is turned on, it creates partiton actors within original actors bounds, and executes the whole node network for each partition actor, even if there are no sampled points (so, the log is full of errors - "no data on pin...."), and its still takes a lot of time to execute those "empty" graphs.

    • @adrienlogut3482
      @adrienlogut3482  11 หลายเดือนก่อน

      We are working on that. Right now we have to spawn all the PA before generating because we cannot spawn them at runtime. As for empty data, we are tuning those warning down as empty data might be a valid case (especially in partition)

    • @romank3157
      @romank3157 11 หลายเดือนก่อน

      @@adrienlogut3482 Makes sense. So now, if we want to use partition, we should use multiple PCG actors and carefully set their bounds? (otherwise it will take forewer to generate and most likely eat up all available RAM and crash) At least, maybe there is a way not to use 3d partition grid if we ever want to use partition and sample points on anything other than the landscape (with world ray hit query)? Beacuse now, it seems it's the only way for surface sampler to work on collision channel for partitioned PCG actors. And 3d grid generate a LOT of partition actors, if the sampled surface have height variation, most of them will be empty, but still calculated.

  • @SagunManandhar
    @SagunManandhar 10 หลายเดือนก่อน

    Hi, is it possible to instance geometry in animated alembic geo ? ????

    • @adrienlogut3482
      @adrienlogut3482  10 หลายเดือนก่อน

      We have external alembic support in 5.3, but I don't know how it handles animated stuff though :(

  • @user-fm9zo5le2v
    @user-fm9zo5le2v 2 หลายเดือนก่อน

    Can you control the number of points somehow?

    • @adrienlogut3482
      @adrienlogut3482  2 หลายเดือนก่อน +1

      If you use the surface sampler you can play with the extents, looseness and points per squared meter

    • @user-fm9zo5le2v
      @user-fm9zo5le2v 2 หลายเดือนก่อน

      @@adrienlogut3482 Thanks. But I need an exact number of points. This number will be passed from the parent blueprint. Mesh Sampler allows that through Poisson sampling: you can set max points.
      Don't know why they didn't put that in Surface Sampler too.

    • @adrienlogut3482
      @adrienlogut3482  2 หลายเดือนก่อน +1

      Nothing prevents you to filter the points afterwards so you extract just a specific number of points.
      I have another video to select a exact number of points with a Blueprint node.
      And we implemented the native version of it, just that it didn't make the cut for 5.4.
      By essence the surface sampler is a stochastic sample, so that's why there is no fine control like that on the node. Also being a multi threaded node + the fact that you can have a complex bounding Shape makes it impractical to have a max number of points.

    • @user-fm9zo5le2v
      @user-fm9zo5le2v 2 หลายเดือนก่อน

      @@adrienlogut3482 Yeah, but what if I have thousands of PCG volumes in the level? Will there be performance issues to do all those calculations on each, just to get a specific number of points? Seems like an expensive work-around.

    • @adrienlogut3482
      @adrienlogut3482  2 หลายเดือนก่อน

      Indeed but that always depends on what you want to do and when it happens. If it's generating offline, it matters less than if it generates at runtime. You can also optimize it yourself to play with the points per squared meter depending on the size of the volume.
      But it's also not always a good idea to over optimize at the beginning, so try it out and see if the performance is good enough for you.

  • @lazycuyo1606
    @lazycuyo1606 11 หลายเดือนก่อน

    I tried to sample on hand placed meshes just like in your example but mine is ignoring the meshes, I put 4 sphere meshes, is there something i'm doing wrong? Useful tutorial by the way

    • @adrienlogut3482
      @adrienlogut3482  11 หลายเดือนก่อน

      Probably because of the collision presets! Make sure it matches!

    • @JamesBeukelman
      @JamesBeukelman 8 หลายเดือนก่อน

      @@adrienlogut3482 I'm having the same issue. Not sure about the collision preset as I'm just working with the default cube and hand placed it in the world. I'm using 5.3 and I'm wondering if it's bugged. Have you tried to recreate this in 5.3? Thanks for the tutorials btw, love them.

    • @adrienlogut3482
      @adrienlogut3482  8 หลายเดือนก่อน

      @@JamesBeukelman Just tried it in 5.3. Placed a Cube, a PCG Volume encapsulating the cube. Then World Ray Hit + SurfaceSampler + Debug gives me the right result ^^

    • @janavram5948
      @janavram5948 7 หลายเดือนก่อน

      got the asme issue and got frustrated, because these comments could not help either... but it is probably simple, select ur PCGVolume in the editor top. Here in video it is PCGVolume3... hope that helps

    • @sechygs
      @sechygs 4 หลายเดือนก่อน

      @@janavram5948 I was having the same issue. My problem was that the Point Extents were too big (100 by default), so it didnt spawn anything. My meshes were smaller, so putting values like 5 or 10 worked!

  • @user-tb3qj3ih4y
    @user-tb3qj3ih4y 11 หลายเดือนก่อน

    你好,请问为什么我的网格体采样不生成点呢?步骤都没错的,哪里出问题了呢?

    • @adrienlogut3482
      @adrienlogut3482  11 หลายเดือนก่อน

      Sorry doesn't speak Chinese so I've used Google Translate. I try to give people as much info so they can trouble shoot if something doesn't work. Important to check the order of execution, collisions presets and boundaries.

  • @user-vi6je4vv9l
    @user-vi6je4vv9l ปีที่แล้ว

    good

  • @Megallean
    @Megallean 10 หลายเดือนก่อน

    So for the scattering meshes overtop of scattered meshes like in 2:43, I can't seem to get a method that works in 5.3. The Gather node doesn't seem to work as a dependency, regardless of how I plug things into it or what settings are used. I noticed in the Electric Dream demo, they do have an example that does use it, but it just seems to work somehow? Pulling it apart doesn't reveal how it works.
    I'm trying to get points that have already been generated re-projected overtop of ground meshes that another branch of nodes spawn. And I'm struggling to find out how to do that.

    • @adrienlogut3482
      @adrienlogut3482  10 หลายเดือนก่อน +1

      You can join discord.com/channels/187217643009212416/1089670031782191145 and post your issue there, tag me (@thelonelychaman) so we can have a look!