How to Interact with Foliage in Unreal Engine 5 - Chop Down Trees

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 80

  • @BerryFarmGaming
    @BerryFarmGaming 2 года назад +10

    I can’t thank you enough for everything you’re doing for us developers who are trying to learn. You’ve personally helped me understand so much about ue5 and I hope that you get the 20 million subs you deserve!

    • @GorkaGames
      @GorkaGames  2 года назад +2

      Thank you so much man! I really appreciate it! I`m glad that my tutorials are helping you out and good luck on your UE journey!!

    • @user-ss4sp1mk5w
      @user-ss4sp1mk5w 5 месяцев назад

      ​@GorkaGames this tutorial is highly incorrect. You cant "add" health to any individual trees, since they are not separate actors and are all inside 1 actor. You are misleading people and wasting people time on wrong techniques

  • @ArmadaWixxi
    @ArmadaWixxi 10 месяцев назад

    You have a brilliant little tutorial channel my friend. Keep up the excellent work! Subbed.

  • @fuzzyhenry2048
    @fuzzyhenry2048 11 месяцев назад

    Thank you. I've seen a lot of tutorials telling me to swap them with normal BPs when the player's around. The customized FoliageInstancedStaticMeshComponent is much easier and handy.

  • @AresWorlds
    @AresWorlds 2 года назад +3

    Your tutorials always bests on youtube

    • @GorkaGames
      @GorkaGames  2 года назад +1

      thank you man, I really appreciate it!!

  • @svens3722
    @svens3722 5 месяцев назад

    that own static fooliage mesh component class is so cool. i did so many other things but this is so nice.

  • @MuttonheadsOfficial
    @MuttonheadsOfficial Год назад +1

    Thank you for the tutorial, but I have an optimization question, the "remove instance" function seems quite cpu-intensive, in my case, I did a mower simulation, removing grass (and therefore a lot of instances) gives me a big frame drop (like 10 fps). Any tips?

    • @ilarinikkarikoski4765
      @ilarinikkarikoski4765 7 месяцев назад

      This would be the mass spam of casting again, and again.
      For something like that, I would personally create a logic that uses one single cast to remove multiple grass elements. Also, the individual grass asset and their level of detail and settings, should be downgraded as much as possible without losing art direction.

    • @johnfl46
      @johnfl46 11 дней назад

      Set to invisible and destroy them in secret on a timed loop

  • @korros1
    @korros1 7 месяцев назад +1

    I now it's a bit late but is there a function to respawn the foliage at the same place?

  • @Gigabyte_bs
    @Gigabyte_bs 2 года назад +2

    thanks for the tutorial

  • @Furiac.
    @Furiac. 2 года назад +2

    i just found this channel and i can already tell this is the best ue5 tutorial channel. so clear and logical with explanations. thank you

    • @GorkaGames
      @GorkaGames  2 года назад

      thank you so much!! I really appreciate it! I`m always trying to make the best UE tutorials!!

  • @BenTheDev
    @BenTheDev 2 года назад +1

    Great video, works great!

    • @GorkaGames
      @GorkaGames  2 года назад

      thanks! i`m gald it helped!

  • @lukemccann95
    @lukemccann95 Год назад +2

    Can you please give an example of how to give each tree its own health? I set a variable inside the foliage instance bp for hp, but once that tree is "dead" i can just 1 hit the rest as if they are all sharing that same health variable. Cheers

    • @hadrienrobin415
      @hadrienrobin415 Год назад

      Got the same problem. I would like to add "durability" to each tree. But i'm not sure it's possible since they are not blueprints. The only solution is to create a blueprint and add it manually ?

    • @spencer6517
      @spencer6517 Год назад

      same here

  • @TG2mil
    @TG2mil 2 года назад +1

    Gorka can you pls make a tutorial for example when you pick up something the attack animation changes

    • @GorkaGames
      @GorkaGames  2 года назад

      yeah, you mean like changing the characters behaviour animation state

    • @TG2mil
      @TG2mil 2 года назад

      @@GorkaGames yeah

  • @devilsplague6666
    @devilsplague6666 2 года назад +1

    Fantastic bud thanks

  • @Surburis
    @Surburis Год назад +2

    Is there any way to only make that effect one type of foliage? Like if I have trees, grass, and rocks but I only want to remove trees?

    • @DATBOYCONROY
      @DATBOYCONROY 9 месяцев назад

      i had this concern as well

  • @SS-gu2tx
    @SS-gu2tx 9 месяцев назад

    How would you handle respawning?

  • @mauromarquet701
    @mauromarquet701 Год назад

    Great video! How do I make an instanced foliage produce sound when I pass over it? I want the bushes to make noise as I walk through them. Thanks!

    • @NinjaSonar
      @NinjaSonar Год назад +1

      This is actually somewhat easy. Look up physical materials for unreal engine. Thats what youre looking for i think.

  • @n1lknarf
    @n1lknarf Год назад +1

    Thanks, didn't know it was that easy. Can you get the mesh data from the foliage component?

    • @krplyr
      @krplyr 5 месяцев назад

      You can get the exact hit actor and if i'm not mistaken you can get all the data there is from there.

  • @eligijuspranskunas3509
    @eligijuspranskunas3509 2 года назад +1

    Brilliant!

  • @giperborey1980
    @giperborey1980 2 года назад +1

    Thanks!

    • @GorkaGames
      @GorkaGames  2 года назад

      thank you for watching!!

  • @AliBounds
    @AliBounds 2 года назад +1

    Awesome video I almost missed hah

    • @GorkaGames
      @GorkaGames  2 года назад +1

      haha thank you as always man!!

    • @AliBounds
      @AliBounds 2 года назад +1

      @@GorkaGames your welcome

  • @Dash-jd3kz
    @Dash-jd3kz 2 года назад

    why is the simulate physics option greyed out when Im trying to enable it, but it wont let me have the option at all?

  • @smarttisan8206
    @smarttisan8206 Год назад

    cannot work on 5.0 version,cause the trace doesnot hit ,but works on 5.3,why?

  • @ApesGameTime
    @ApesGameTime Год назад

    Very helpful. I just have one little problem. Maybe I missed something, but everything is the same as in your video. After removing the instance, the collision for that instance is still there, and you have to walk around the are where the tree was. It's almost like there is an empty place holder with collision on it. I tried disabling collision for the instance after and before removing the instance, but still no luck. Is there any way of removing the collision for that instance, so that we can walk where the tree was?

    • @panfull
      @panfull Год назад

      make sure to have the hit item connected to the remove instance. otherwise I'm not sure why that is happening. is your foliage item made of multiple parts?

    • @ApesGameTime
      @ApesGameTime Год назад

      @@panfull I have the hit item connected to the remove instance node. The tree tree gets removed, but the collision is still there. The trees I am using are the trees found on the market place. I think it is something like European Trees or something like that.

  • @Fanofelement92
    @Fanofelement92 2 года назад +1

    Again plz apply to full sail. You're awesome 😎😎😎😎

    • @GorkaGames
      @GorkaGames  2 года назад

      thank you man! 😄😄

    • @DigitalAlchemyst
      @DigitalAlchemyst 2 года назад

      @@GorkaGames this dude is a little beyond need of full sail, that school is a joke anyway. I enrolled a few years ago but quickly saw trash it was and withdrew and demanded a full cancelation of my tuition

    • @DigitalAlchemyst
      @DigitalAlchemyst 2 года назад +1

      that being said this method will most likely interfere with other functions or not work properly in a more fleshed out game environment, but its a good base to expand upon for deeper use pretty creative. I have not played with anything of this nature with foliage I am wondering if how he built it in this video if you had multiple types of foliage, 12 different trees 3 grass 8 bushes 9 rocks ect, if this would just be targeting the 1 type of tree or every kind of foliage in play, also it would probably be better long term to keep as much of the functionality out of the character blueprint so i liked the suggestion of creating the child of cast to foliage

    • @GorkaGames
      @GorkaGames  2 года назад +1

      @@DigitalAlchemyst yeah, this tutorial just covers the core essentials of an foliage interaction. An advanced way would be to create a class which inherets from the FoliageStaticMeshComponent, and expand its functionality from there, as I mentioned nearly at the end. The you could use an interface, and then in the collision you would create a new channel specific for each foliage type, like trees, rocks, bushes, etc.

  • @HAMUZ9
    @HAMUZ9 Год назад

    How can I hide the point of impact beam?

  • @Phoenix4_Trade
    @Phoenix4_Trade 2 года назад +1

    bro if i learn unreal engine and blender..and i need job how can i get job

    • @GorkaGames
      @GorkaGames  2 года назад

      I recommend to search throug LinkedIn and Twitter, there will be very good offers there

  • @victorlastra5254
    @victorlastra5254 Год назад

    Thanks for the video! How can i add individual health to the trees? using the child class of foliageinstancedstaticmeshcomponent for all the trees makes that everyone share the same health

    • @devcorpseinteractive7490
      @devcorpseinteractive7490 Год назад

      The is no health system on the tree he is simply destroying actor with a key input but if your curious on health system I think matt aspland has a good universal tutorial that can help you

    • @hadrienrobin415
      @hadrienrobin415 Год назад

      @@devcorpseinteractive7490 Got the same problem. I would like to "break" the trees in a couple of hits. The only solution would be to create a blueprint fo the tree and add it manually on all the map ?

  • @Bahahaha25
    @Bahahaha25 Год назад +2

    This is an awesome tutorial. As a beginner, slower the steps would be nice lol.

    • @GorkaGames
      @GorkaGames  Год назад

      thanks! yeah maybe I could explain everything more in detail

    • @Bahahaha25
      @Bahahaha25 Год назад

      @@GorkaGames Actual details was perfect..just went through the steps really quick. lol. Still awesome tutorial tho! Thank you.

    • @maglucen
      @maglucen Год назад

      @@Bahahaha25 Remember that you can always slow down the video, pause or rewind it 😉

  • @dakotayocom7764
    @dakotayocom7764 2 года назад +1

    Would it be good to create an interface in place of the casting? I have never asked that question before which is funny but I am wondering if attaching an interface to every spawned piece of foliage would cause more harm than good. Is this one of the rare occasions were casting goes into final development?

    • @n1lknarf
      @n1lknarf Год назад

      Casting is not as bad as most tutorials make it sound. Once you cast the data is loaded into memory once, and after that every cast is just pulling from memory rather than loading into memory. If you're casting to different blueprints or components constantly it's bad cuz they're different, but if you're casting to engine default bps or components then it's free after the first cast.
      If you want to avoid potential hitches on the first cast just cast during your loading screen, but it really isn't that serious.
      Also keep in mind you're saving a lot using instances so 1 cast is not that bad.

  • @MatMilizia
    @MatMilizia Год назад +2

    While this technique technically works, it will absolutely murder your performance when it scales up to hundreds and thousands of instances. There are other videos online that illustrate this. If only video game development was this easy. I'm not trying to be negative, I'm just trying to help people not go down the wrong path when making a foliage harvesting system for actual games.

    • @florianbadier6867
      @florianbadier6867 Год назад

      why murder perf ? could you explain please

    • @user-ss4sp1mk5w
      @user-ss4sp1mk5w 5 месяцев назад +2

      It doesn't work even technically if your goal is anything more than "remove instance". You won't be able to do anything

  • @aaronmunoz3423
    @aaronmunoz3423 2 года назад +1

    Brooo how did u do the hair like that oh shit bro ur like super good at this engine

    • @GorkaGames
      @GorkaGames  2 года назад

      haha thank you man, I have a tutorial on how I did it! ruclips.net/video/ODkhcRvcaso/видео.html

  • @zachattack3763
    @zachattack3763 Год назад

    very helpful and informative butttt, kinda wish you didnt rush at the end, im so lost with the health, and animations to actions part of this haha

  • @MxzStudio
    @MxzStudio 11 месяцев назад

    Hello, can you make a video on how to replicate

  • @DKJens44
    @DKJens44 2 года назад +1

    So for me this is a tutorial, how do I click the tree to make it disappear. From ChopDownTree, can be here no speech. XD

    • @GorkaGames
      @GorkaGames  2 года назад

      Hey, what do oyu exactly mean?

    • @whyareless
      @whyareless 2 года назад +1

      @@GorkaGames I think he wonders how to remove the tree using mouse left click 👀

  • @muerrtee
    @muerrtee 2 года назад +1

    We are making a survival game +_+

    • @GorkaGames
      @GorkaGames  2 года назад +1

      yeah man! 💪 this system is very powerful and expandable

  • @vasilebrescanprimarul9369
    @vasilebrescanprimarul9369 2 года назад +1

    this has nothing to do with the title Chop Down Trees

    • @GorkaGames
      @GorkaGames  2 года назад

      this is the suface of a tree chopping down system. After destrying the tree you can just spawn another tree with the model in the same position with "Simluate Physics" enabled and it would make the whole loop of chopping trees

    • @vasilebrescanprimarul9369
      @vasilebrescanprimarul9369 2 года назад +1

      I mean chopping a tree would require an axe, some player animation, the tree falling down.
      That is more like a pick-up tree system where you just approaching the tree and make it disappear

    • @PraiseMore
      @PraiseMore Год назад

      @@vasilebrescanprimarul9369 he is literally showing us the start of a system that you could create lol. He shouldnt need to have an axe, animations to show us that this could work for a start of a system of Tree Cutting xD
      Gotta use your IMAGINATION

    • @RiverFox_YT
      @RiverFox_YT Год назад

      @@PraiseMore then why use a clickbait title when it clearly shows nothing to do with CHOPPING TREES? ive noticed this a lot with his videos. titles always say different than the content.