Unreal Tutorial: Geometry Script Boolean Operation at Runtime

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

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

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

    Looks great!! You could probably improve performance a bit by caching the DynamicMesh version of the projectile mesh (ie avoiding CopyMeshFromStaticMesh on every hit). That function also won't work at runtime, you would need to store the projectile mesh a different way (eg in a hidden DynamicMeshActor is one option).

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

      Oh that’s a great improvement! Thanks! A pleasure that you have seen the video!

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

      Hey there! I was trying this out for myself, and wondering what would be a good way to actually cache the DynamicMesh version of the projectile mesh?

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

      I just allocated the dynamic mesh in rebuild saved it to a variable then got it on my weapon hit. Performance was better, no delay before the shot. But as the mesh gets more complex with every hit you start to take a good frame rate reduction.

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

      @@ackillesbac You could try simplifying the mesh after each hit, there are quite a few different simplification functions. Unfortunately it is somewhat unavoidable for the mesh to get more complex with every hit, you are adding more shape complexity and that requires more triangles.

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

      @@RyanSchmidtEpic if you could have nanite working on a dynamic mesh it would open up an amazing world of dynamic detail.

  • @6Twisted
    @6Twisted 2 ปีที่แล้ว +9

    And here I am struggling to simply delete unused assets without corrupting the whole project.

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

    Does this work in packaged build?

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

    Looks like the geometry script can be used for a lot of different purposes.
    We'll see if the performance will limit some of those.
    Great tutorial!

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

    Is it possible to copy a static mesh to a dynamic mesh to be your target mesh as well as your tool mesh??? Seems a bit limited if we can use primitives only

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

      Hello.. Did you find a solution to this yet?

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

    Excellent!!! I have a question, if I am making a simple boolean operation,, e.g subtract window with a box from a wall
    Is there a way to modify this afterwards, e.g change the subtraction location or dimension?
    I am sure we can somehow record the boolean operations and modify them but I have no clue how, any ideas???

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

    Nice work on this! Would love to see more :)

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

    Amazing Tutorial thank you so much !!

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

    How do you set materials?

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

    You can use Generated Mesh Actor outside of the editor?

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

    Can you suggest anything to move vertices in runtime packaged project ? C++ or blueprint.
    Static Mesh to Dynamic Mesh is editor only. MeshConversion::Convert and RebuildStaticMeshFromDescriptionsfunctions give fatal error in packaged projects.

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

    Great guide, you got any more to show us, its been a few months????

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

    The dynamic mesh component seem to only be able to use complex collision, is there any work around to let it also simulate physic?

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

    Great video, what would happen if you made the player model into the operation, instead how would that look. Also can you make it so if you cut out a section around it will fall with gravity

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

      Great questions!
      1. If the player model (the actual) mesh would be taken as the tool mesh, the performance would drop enormously because there are tons of hits every second. Besides that, the operation would still work and also looks pretty well (like a cartoon character would run through a wall :)).
      2. The gravity part is tricky! I'm also tinkering around with this a lot -- and will eventually make a tutorial for this. Only solution I was able to find to set Simulate Physics is to copy the dynamic meshes to static meshes. There are some interesting ways to utilize this: for example, you could Copy the dynamic mesh to a static mesh when the triangle count reaches a certain number (but that, you should know how "destroyed" the wall is). Then you could simulate physics, so the wand simply tips over. I doubt that it's currently possible to create a Geometry Collection from the created static mesh and apply a certain fracture to it via blueprints so that a Chaos solver can do their job -- but I'm pretty confident that something like this will come, so that we can also apply Chaos features more flexible.
      3. If you want the subtracted piece to fall to the ground, then you basically need two boolean operations for every shot: the subtraction and an intersection. The intersection part could be copied to a static mesh (or even create a new static mesh asset in blueprint, there is a new node for this), then spawned at the hit location and simulate physics. The single boolean operation is already pretty expensive (and I'm looking for ways to increase the performance by using the Apply Simplify to Triangle Count so that I can set a triangle treshhold) and I assume two operations would be a killer.

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

    Exactly what i need! Thanks!

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

    Is it possible to make outwards deformations at runtime when the cursor hits a certain spot on the wall?

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

    Thanks. Exactly what I was looking for. It's not possible in UE4, right?

  • @NN-mi8hv
    @NN-mi8hv 2 ปีที่แล้ว +1

    Hello. You can use a complex /custom mesh (for example a cactus) instead of a wall? or no?

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

      Sure thing! You have to use the COPY FROM STATIC MESH node to create a dynamic mesh out of the cactus. The rest remains the same! :)

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

      @@quantaxy Hello, Great video btw!
      I tried this node but in runtime whenever the projectile hits "the cactus", the game completely freezes for 1 second or so, and then it continues. But "the cactus" is not boolean cut, it remains unchanged. can you help please?

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

    Any idea if you can use nanite with runtime dynamic meshs?

  • @Puncake-pe4ws
    @Puncake-pe4ws 2 ปีที่แล้ว

    really cool tutorial!

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

    Have you tried packaging your projects? The meshes disappear in the final build.

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

      It disappeared when I packaged it too.

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

      Hi, true: The Generated Dynamic Mesh Actor is editor-only. (But I assume they will change this when Geometry Scripts are not experimental anymore).
      You could try two different approaches:
      Either using the Dynamic Mesh Actor and use the Begin Play Event to access the Dynamic Mesh from the Component. Or you could also try to add the Dynamic Mesh Component to another blueprint class and access the dynamic mesh; you could also put the rebuild on tick (but that's even more expensive).

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

      I have tried a few things, but my knowledge seems to be a little lacking, so I will try again when I have a better understanding.
      Anyway thank you very much for your excellent tutorial and advice.@@quantaxy

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

      @@quantaxy I reparented the BP to Dynamic Mesh Actor, generated the box on play instead of on rebuild, but the boolean operations don't work. The mesh renders in the packaged game now thankfully, and has collision, but I can't subtract geometry from it and create holes. Do you know a way around that?

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

      Even for me
      Doesnt work

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

    You are best. Thank you

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

    Sick brooo

  • @fukkenPavlo
    @fukkenPavlo 18 ชั่วโมงที่ผ่านมา

    This is wonderful technique and your teaching skill is top notch, i wish there were more content from you❤

  • @lolaswift111
    @lolaswift111 9 หลายเดือนก่อน +1

    can we do this to Skeletal mesh?

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

    Know this is old, but would it be possible to do the same but with landscape mesh? So we can make our underground passage building blueprint and not have to manually cut out the landscape that pass right trough the building.

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

    Man you saved me so much time! I was working on updating from of our 4. Projects up to 5. and got stuck with our Mesh Library.
    Playing around after watching your video we figured out it would be much faster just to use the new components.
    Thank you so much, I owe you a coffee! (Und wenn ich richtig höre: Eventuell ist es ja gar nicht so weit zwischen uns ^^)

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

      Great to hear! (Und ja, richtig gehört :D)

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

    It is a Great tutorial the problem is that it doesnt work when you make the packaging of the game. The bp is not considered
    Could you help me?

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

      Hello! Have you resolved this problem?

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

    Is there a way to spawn these meshes dynamicly at runtime btw? I was wondering if you could make a whole new system for procedurally generated stuff.

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

    very cool! Would this work with nanite objects?

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

    yes yes yes yes yes yes

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

    Super. I like this, ... aber ich schaffe einen kleinen, aber wichtigen Schritt nicht. Ich bekomme dies nur im PIE zu laufen. Sobald ich das packe, sind die Wände weg. Hast Du einen Tipp für mich. Schon mal jetzt aber danke für das Video. Weiter so. ;-)

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

      Hey, danke für deinen Support! Der GeneratedDynamicMeshActor funktioniert nur im Editor. Du könntest das gesamte Script auch in eine andere Klasse umschreiben und dann dort einfach eine DynamicMeshComponent hinzufügen.

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

      @@quantaxy Werde das nochmal querchecken. Ich will verschiebbare Downlights (Leuchten) in der Decke, was bedeutet das Loch muss sich mitverschieben. In 4.26 und 4.27 ging das via Ryan Schmidts Tutorials und das entsprechende Plugin. Das gute bei mir, die Geschwindigkeit ist zweitrangig. ...I couldn't resist to chat in German. As said, keep up the good work.

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

      @@quantaxy Thank you. The trick I did not get immediately was the "get dynamic mesh" node. So making a "dynamic mesh actor" class, get the "dynamic mesh component" and use the "get dynamic mesh" node does the trick. Afterwards I understood I can use your script, package it and work with it. So my downlight function works in unreal 5. I owe you something, Your nudge was what I needed. Whenever you are passing Vorarlberg I will be happy to invite you for lunch, ....

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

      Happy to hear you could make it work!!