UE5 Geometry Script - Booleans at Runtime

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ย. 2024
  • In this video I demonstrate how to use Geometry Script to implement at-Runtime mesh booleans, using DynamicMeshActors

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

  • @BlueBlankey
    @BlueBlankey 2 ปีที่แล้ว +16

    This opens up some huge potentials for procedural generation and dynamic gameplay, a big thank you for this

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

    This is amazing I've been playing around with it in the last few days. The runtime booleans are enabling a feature I've been wanting in my game for awhile, so thank you for that!

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

    DAAAAAAAAAAAMmmmm this video save lifes, people spending months creating stuff for it to not work at runtime.
    Thanks a lot for this one! I know it is super old now, but still one of the best videos ever about this

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

    These are great videos! I'm hoping you can resume making videos soon. It would be nice to see some use cases for runtime geometry editing.

  • @Dustb0
    @Dustb0 ปีที่แล้ว +2

    Omg after hours of fruitless research this video just saved my day.

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

    Can't tell if I am doing something wrong. When setting up the construction script, I get as far as Reset. When I try to add Append Box, it does not exist...

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

      Is the parent of the blueprint, Generated Dynamic Mesh Actor?

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

      @@sbnewsom Not OP, but I have the same issue in 5.2. Yes, the parent in the top left corner is Dynamic Mesh Actor. Can't find "Append Box" even without context-sensitive checkmark.

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

      @@Paszq You need to activate Geometry Script plugin

    • @RamonMonsanto
      @RamonMonsanto 7 หลายเดือนก่อน +1

      @@LyriaStudio thank you

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

    Hmm...set camera to orthographic, slap a texture on that box, substract cylinder meshes for holes instead of the box and bam... worms terrain (kinda :P)
    Would be interesting to see if this performs well enough :o

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

    Really powerful tutorial, thank you so much for posting

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

    Is it possible to change the cut model to a custom model, I tried to do this with my hair and his cut doesn't work!

  • @mattkleis
    @mattkleis ปีที่แล้ว +2

    Could you do this with an imported static mesh? Like the bunny mesh you used in your other videos?

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

      "Sorta".
      You can't do it directly to the static mesh. But you can create a new dynamic mesh blueprint and set the dynamic mesh to the static mesh of another object.

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

    Thank you so much for sharing your knowledge and insights!

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

    Do you have any idea when runtime generated geometry will be able to work with Nanite? That's really what's missing at the moment I think. I'd be happy with it taking 1 seconds to convert a dynamic mesh to a nanite mesh at runtime, as long as it's async and doesn't freeze the game. Is that really impossible at the moment?

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

    Hey, thanks for the tutorial and geometry script faq post, very helpful. Do you happen to know what is the exact cause of dynamic mesh actors not updating in a packaged game? The append box creation and boolean operations work in editor and in standalone mode but when packaging the boolean operations break for me. My construction script is handling the box creation like in your tutorial and the event graph fires the hole making function, works until packaged... any ideas?

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

    How do you get the dynamic mesh to replicate to all clients? I can only see it on the owning client. I'm using Spawn Actor for Gameplay Task, which works correctly when I have a simple static mesh actor, but does not work when I use this dynamic mesh actor. The dynamic mesh actor is only visible to the owning client, but all clients still collide with it.

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

      Nvm, got it working by setting all the variables in the dynamic actor blueprint to RepNotify and by moving the logic from Construction Script to Event BeginPlay

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

    Thank you man!

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

    how do I fill an old hole?

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

    Ive been playing around with this and noticed applying this to a vehicle (actor with physics enabled on a central static mesh) the collisions stop working as expected. Im pretty sure this is from the complex collision setting and was wondering if there are any ways this could work on a vehicle like mine?

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

      simulating physics with complex collision is not supported. To simulate physics you need to create simple collision shapes (spheres, boxes, convex hulls).

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

      @@RyanSchmidtEpic thank you!

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

    I beg you to help: can I do this from the existing mesh?

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

      skeletal mesh*

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

    Would something like window placement in runtime be possible? Im trying to wrap my head around how would the mesh need to be cached to be able to 'move' the carver mesh. Would be really helpful for the archviz people of unreal

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

      How did you go with this? I want to create a window at runtime too subtracting it from a regular static mesh 🧐

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

      Hi, I know i'm late but i guess you could use a mask shader instead of booleans to create a window, if you don't want it to be interactable of course. This way you can make a fake hole in the wall

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

    Thank you, very useful

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

    I can't pack it into my project, and the wall I created will disappear in the packaged project

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

      using DynamicMeshActors not GeneratedDynamicMeshActor

  • @Jbbriant-Ardaria
    @Jbbriant-Ardaria ปีที่แล้ว

    Hello Ruyan, amazing tutorial. How to report a bug?

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

    Does this work with skeletal meshes?

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

    Can I turn the box into a cylinder ?

    • @pruthweeshasalian3688
      @pruthweeshasalian3688 2 ปีที่แล้ว

      Yes, you can. At 1:41, you can see him search for and click on "append box", just use append cylinder instead, to cut cylindrical holes.
      If you want to preserve the intersection of the wall with a cylinder instead of cutting a cylindrical hole, you can change the boolean operation at 3:54 to "intersection."

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

    Does this work on mobile packaged game?

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

    I wonder if it is possible to simulate physics on the dynamic mesh wall

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

      you can set up simple collision shapes (boxes, convex hulls, etc) and then it's possible to enable simulate-physics. However creating those simple collision shapes for an arbitrary-shaped mesh (eg after you have random cut holes) can become quite difficult.

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

    My version is 5.1, why is there no append box node?

    • @iven_e_
      @iven_e_ 24 วันที่ผ่านมา

      you need to activate Geometry Script plugin

  • @surprenantzac
    @surprenantzac 9 หลายเดือนก่อน

    Is it possible to change the Append Box Transform properties at runtime?

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

      Did you find an answer to this? Looking for this aswell

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

      @@ferdinanddoblhammer2838 Instead of using the Construction Script, just use Functions. The Construction Script only happens once. So you have to manage the Functions with Events.

  • @Jsharts
    @Jsharts 2 ปีที่แล้ว

    I'm curious. Is there a way to cut into already existing geometry/non bp geo?

    • @RyanSchmidtEpic
      @RyanSchmidtEpic  2 ปีที่แล้ว +2

      Not really. You can edit a DynamicMeshActor/Component even if it is not a BP (from another BP). But you cannot edit a cooked StaticMeshComponent easily. You can replace the cooked StaticMeshComponent with a runtime-generated StaticMeshComponent, or a DynamicMeshComponent, and then it would be possible to edit. But you will have to jump through some hoops to do this. In 5.1 we will have the ability to copy from an existing StaticMeshComponent at runtime which will make it (somewhat) easier, though.

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

    Hey there! There is a new option to convert static meshes to dynamic mesh now in 5.1, but it doesn't work in packaged builds. Do you have any plan to implement this feature for packaged games as well?

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

      CopyMeshFromStaticMesh will work at runtime in 5.2 if you have CPU Access enabled on the Asset, however the mesh you get back at runtime is different then the one you get in the Editor

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

      Hello
      When could we create a static mesh back from the dynamic mesh in runtime ? Actually (5.4) dynamics are not supported by lumen

  • @eclecticgamer5144
    @eclecticgamer5144 5 หลายเดือนก่อน +2

    FYI: Mesh Booleans are (relatively) Extremely slow. You can only do about 10 simultaneously before seeing visible stuttering. I.E. Shot gun blast knocking individual holes = entire game stops for half a second or more.

    • @HaloDude557
      @HaloDude557 18 วันที่ผ่านมา

      Dynamic meshes won't work at runtime at all. Boolean operations will do nothing in the packaged build.

    • @eclecticgamer5144
      @eclecticgamer5144 18 วันที่ผ่านมา

      @@HaloDude557 And what is your source of information? Why would Epic even create dynamic meshes if they didn't work in the packaged build? And why does Voxels work in packed builds in real time, but you believe dynamic Meshes, that Epic themselves built, won't?

    • @HaloDude557
      @HaloDude557 18 วันที่ผ่านมา

      @@eclecticgamer5144 it’s not something I believe. I tested this myself. Dynamic meshes are meant to be a modeling tool for editor use. Procedural meshes are for in game use.

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

    Thank you this much (you can't see it, but I'm holding out my hands as far apart as my arms will allow)

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

    Great video!
    I'm thinking of using this to allow me to make an open world survival game where the ground can be manipulated in limited ways, like with games such as Ark and Conan exiles you can place structures, but in my game you can "place" basements, or flatten terrain in small spots. That way you have base the building freedom closer to something like Minecraft or 7 days to die, but without a voxel system and being admittedly more limited.

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

    我没办法打包到我的项目中,在打包出的项目中我创建的墙体会消失

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

    King.

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

    Thank You for all your shared help

  • @martelement603
    @martelement603 2 ปีที่แล้ว

    Hello, thank you very much for this playlist, it helps a lot.
    I tried implementing something to delete a triangle with a linetrace from my mouse using "Find Nearest Point On Mesh" (using Build BVHFor Mesh before) and passing the out hit location of my line trace to the query point. But it looks like the nearest result triangle id returned by "Find Nearest Point On Mesh" is not the correct one.
    I also tried deleting the triangle by passing directly the "out hit face index" from the line trace, it works for the first 4/5 triangles, and after that it's shifted.
    Any ideas ?

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

      sorry but the triangle IDs returned by a line trace come from the version of the mesh that the physics system sees, which is not aware of "mesh editing" as a concept. To do what you are describing, you would need to create a Mesh BVH for the mesh and use it's raycast function, instead of relying on physics line traces. This video shows how to create a Mesh BVH: th-cam.com/video/eNmHwTMJogk/w-d-xo.html&lc=UgxdfK4hamE0PAIWkgx4AaABAg