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!
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
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.
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?
"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.
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 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.
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?
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
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
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 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?
@@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.
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
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.
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?
simulating physics with complex collision is not supported. To simulate physics you need to create simple collision shapes (spheres, boxes, convex hulls).
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.
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
@@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.
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
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
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."
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.
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?
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
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.
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 ?
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
This opens up some huge potentials for procedural generation and dynamic gameplay, a big thank you for this
Omg after hours of fruitless research this video just saved my day.
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!
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
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.
Thank you so much for sharing your knowledge and insights!
Thank you this much (you can't see it, but I'm holding out my hands as far apart as my arms will allow)
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.
Really powerful tutorial, thank you so much for posting
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?
Could you do this with an imported static mesh? Like the bunny mesh you used in your other videos?
"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.
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...
Is the parent of the blueprint, Generated Dynamic Mesh Actor?
@@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.
@@Paszq You need to activate Geometry Script plugin
@@LyriaStudio thank you
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?
sorry, it's currently not possible
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
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
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.
Dynamic meshes won't work at runtime at all. Boolean operations will do nothing in the packaged build.
@@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?
@@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.
Thank you man!
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
how do I fill an old hole?
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.
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?
simulating physics with complex collision is not supported. To simulate physics you need to create simple collision shapes (spheres, boxes, convex hulls).
@@RyanSchmidtEpic thank you!
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!
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.
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
Thank you, very useful
how to restore the substracted in the passed?
I beg you to help: can I do this from the existing mesh?
skeletal mesh*
Thank You for all your shared help
King.
Hello Ruyan, amazing tutorial. How to report a bug?
Does this work with skeletal meshes?
Is it possible to change the Append Box Transform properties at runtime?
Did you find an answer to this? Looking for this aswell
@@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.
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
How did you go with this? I want to create a window at runtime too subtracting it from a regular static mesh 🧐
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
Can I turn the box into a cylinder ?
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."
I wonder if it is possible to simulate physics on the dynamic mesh wall
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.
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?
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
Hello
When could we create a static mesh back from the dynamic mesh in runtime ? Actually (5.4) dynamics are not supported by lumen
Does this work on mobile packaged game?
I'm curious. Is there a way to cut into already existing geometry/non bp geo?
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.
I can't pack it into my project, and the wall I created will disappear in the packaged project
using DynamicMeshActors not GeneratedDynamicMeshActor
My version is 5.1, why is there no append box node?
you need to activate Geometry Script plugin
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 ?
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
我没办法打包到我的项目中,在打包出的项目中我创建的墙体会消失