UE5 Geometry Script - Booleans at Runtime

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 66

  • @BlueBlankey
    @BlueBlankey 2 роки тому +16

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

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

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

  • @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 5 місяців тому

    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.

  • @quantaxy
    @quantaxy 2 роки тому +3

    Thank you so much for sharing your knowledge and insights!

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

    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.

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

    Really powerful tutorial, thank you so much for posting

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

    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?

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

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

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

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

  • @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 8 місяців тому +1

      @@LyriaStudio thank you

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

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

  • @jcdentonunatco
    @jcdentonunatco Місяць тому

    How can I perform a subtract boolean, but assign a new triangle group/section to the new inside faces? the boolean operations always seems to be the same group as the rest of the mesh

  • @eclecticgamer5144
    @eclecticgamer5144 6 місяців тому +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 2 місяці тому

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

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

      @@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 2 місяці тому

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

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

    Thank you man!

  • @zatlanibrahim5438
    @zatlanibrahim5438 25 днів тому

    So instead of random seed , is it possible to spawn window on location and cut using that window ? How to get the scale of it to cut ? Like the sims game

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

    how do I fill an old hole?

  • @orangeballs4536
    @orangeballs4536 9 днів тому

    when i export the game the boolean function doesnt work. im using an on component hit in the viewport its working find but when i export the game it doesnt work.

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

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

    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!

  • @ben_swain
    @ben_swain 4 місяці тому

    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 4 місяці тому

      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

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

    Thank you, very useful

  • @shengzhaozou9029
    @shengzhaozou9029 19 днів тому

    how to restore the substracted in the passed?

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

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

  • @Latvian3Dman
    @Latvian3Dman 2 роки тому +1

    Thank You for all your shared help

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

    King.

  • @Jbbriant-Ardaria
    @Jbbriant-Ardaria Рік тому

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

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

    Does this work with skeletal meshes?

  • @surprenantzac
    @surprenantzac 10 місяців тому

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

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

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

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

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

  • @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 8 місяців тому

      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

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

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

  • @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 6 місяців тому

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

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

    Does this work on mobile packaged game?

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

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

  • @lingshuaihe2957
    @lingshuaihe2957 10 місяців тому

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

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

      you need to activate Geometry Script plugin

  • @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: ua-cam.com/video/eNmHwTMJogk/v-deo.html&lc=UgxdfK4hamE0PAIWkgx4AaABAg

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

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