In this video I demonstrate how to use Geometry Script to implement at-Runtime mesh booleans, using DynamicMeshActors
Жүктеу.....
Пікірлер: 58
@BlueBlankey2 жыл бұрын
This opens up some huge potentials for procedural generation and dynamic gameplay, a big thank you for this
@Dustb0 Жыл бұрын
Omg after hours of fruitless research this video just saved my day.
@Sworn973Ай бұрын
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
@kvickart2 жыл бұрын
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!
@quantaxy2 жыл бұрын
Thank you so much for sharing your knowledge and insights!
@Beh3D5 ай бұрын
Really powerful tutorial, thank you so much for posting
@TyLovePie Жыл бұрын
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.
@fact3521 Жыл бұрын
Thank you man!
@Genz0o7 ай бұрын
Thank you, very useful
@jakzotak11 ай бұрын
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.
@cadrebadre2 ай бұрын
King.
@ZefugiLive5 ай бұрын
Thank you this much (you can't see it, but I'm holding out my hands as far apart as my arms will allow)
@Latvian3Dman2 жыл бұрын
Thank You for all your shared help
@eclecticgamer51442 ай бұрын
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.
@IzeIzeBaby10 ай бұрын
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
@danielridge6000 Жыл бұрын
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
Жыл бұрын
Is the parent of the blueprint, Generated Dynamic Mesh Actor?
@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
Жыл бұрын
@@Paszq You need to activate Geometry Script plugin
@RamonMonsanto
4 ай бұрын
@@LyriaStudio thank you
@loustewart2 ай бұрын
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?
@islandonlinenews Жыл бұрын
how do I fill an old hole?
@mattkleis10 ай бұрын
Could you do this with an imported static mesh? Like the bunny mesh you used in your other videos?
@eclecticgamer5144
2 ай бұрын
"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.
@Tystros Жыл бұрын
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?
@RyanSchmidtEpic
Жыл бұрын
sorry, it's currently not possible
@DatGuyGLK2 жыл бұрын
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
Жыл бұрын
How did you go with this? I want to create a window at runtime too subtracting it from a regular static mesh 🧐
@PamapGreg
4 ай бұрын
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
@Jbbriant-Ardaria Жыл бұрын
Hello Ruyan, amazing tutorial. How to report a bug?
@IchBinJager Жыл бұрын
Does this work with skeletal meshes?
@AdamGG20386 Жыл бұрын
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
Жыл бұрын
simulating physics with complex collision is not supported. To simulate physics you need to create simple collision shapes (spheres, boxes, convex hulls).
@AdamGG20386
Жыл бұрын
@@RyanSchmidtEpic thank you!
@leejim584 Жыл бұрын
I wonder if it is possible to simulate physics on the dynamic mesh wall
@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.
@Jsharts Жыл бұрын
I'm curious. Is there a way to cut into already existing geometry/non bp geo?
@RyanSchmidtEpic
Жыл бұрын
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.
@lingshuaihe2957Ай бұрын
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!
@yikes54552 жыл бұрын
Can I turn the box into a cylinder ?
@pruthweeshasalian3688
Жыл бұрын
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."
@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
Жыл бұрын
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
2 ай бұрын
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 Жыл бұрын
Does this work on mobile packaged game?
@lingshuaihe29576 ай бұрын
My version is 5.1, why is there no append box node?
@ben_swain19 күн бұрын
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
18 күн бұрын
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
@surprenantzac6 ай бұрын
Is it possible to change the Append Box Transform properties at runtime?
@ferdinanddoblhammer2838
Ай бұрын
Did you find an answer to this? Looking for this aswell
@surprenantzac
Ай бұрын
@@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.
@yangfan2627 Жыл бұрын
I can't pack it into my project, and the wall I created will disappear in the packaged project
@christmas5228
Жыл бұрын
using DynamicMeshActors not GeneratedDynamicMeshActor
@PrinceBrosnanАй бұрын
I beg you to help: can I do this from the existing mesh?
@PrinceBrosnan
Ай бұрын
skeletal mesh*
@martelement603 Жыл бұрын
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
Жыл бұрын
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: kzread.info/dash/bejne/l4KhqtmNfa3Vl84.html&lc=UgxdfK4hamE0PAIWkgx4AaABAg
Пікірлер: 58
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.
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
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!
Thank you so much for sharing your knowledge and insights!
Really powerful tutorial, thank you so much for posting
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 man!
Thank you, very useful
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.
King.
Thank you this much (you can't see it, but I'm holding out my hands as far apart as my arms will allow)
Thank You for all your shared help
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.
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
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
Жыл бұрын
Is the parent of the blueprint, Generated Dynamic Mesh Actor?
@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
Жыл бұрын
@@Paszq You need to activate Geometry Script plugin
@RamonMonsanto
4 ай бұрын
@@LyriaStudio thank you
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?
how do I fill an old hole?
Could you do this with an imported static mesh? Like the bunny mesh you used in your other videos?
@eclecticgamer5144
2 ай бұрын
"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.
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?
@RyanSchmidtEpic
Жыл бұрын
sorry, it's currently not possible
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
Жыл бұрын
How did you go with this? I want to create a window at runtime too subtracting it from a regular static mesh 🧐
@PamapGreg
4 ай бұрын
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
Hello Ruyan, amazing tutorial. How to report a bug?
Does this work with skeletal meshes?
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
Жыл бұрын
simulating physics with complex collision is not supported. To simulate physics you need to create simple collision shapes (spheres, boxes, convex hulls).
@AdamGG20386
Жыл бұрын
@@RyanSchmidtEpic thank you!
I wonder if it is possible to simulate physics on the dynamic mesh wall
@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.
I'm curious. Is there a way to cut into already existing geometry/non bp geo?
@RyanSchmidtEpic
Жыл бұрын
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.
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!
Can I turn the box into a cylinder ?
@pruthweeshasalian3688
Жыл бұрын
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."
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
Жыл бұрын
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
2 ай бұрын
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?
My version is 5.1, why is there no append box node?
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
18 күн бұрын
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
Is it possible to change the Append Box Transform properties at runtime?
@ferdinanddoblhammer2838
Ай бұрын
Did you find an answer to this? Looking for this aswell
@surprenantzac
Ай бұрын
@@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.
I can't pack it into my project, and the wall I created will disappear in the packaged project
@christmas5228
Жыл бұрын
using DynamicMeshActors not GeneratedDynamicMeshActor
I beg you to help: can I do this from the existing mesh?
@PrinceBrosnan
Ай бұрын
skeletal mesh*
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
Жыл бұрын
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: kzread.info/dash/bejne/l4KhqtmNfa3Vl84.html&lc=UgxdfK4hamE0PAIWkgx4AaABAg
我没办法打包到我的项目中,在打包出的项目中我创建的墙体会消失