UE4 - Interact with Foliage at Run-time (Cut down trees, remove foliage, etc...)

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ค. 2024
  • This is just a tutorial showing how to interact with foliage at run-time in Unreal Engine 4. Be sure to watch the whole video, I explain a few important things throughout.
    Some examples of what you can do:
    •Cut down trees (Make them tip over)
    •Remove Foliage
  • เกม

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

  • @alextwofaced8596
    @alextwofaced8596 7 ปีที่แล้ว

    The essence of the video literally is finding instance of InstancedStaticMeshComponent, for example from hit result, and messing around with it. Didn't look for Hit-item tho before) Thx man!

    • @cutyfttyggtffu7780
      @cutyfttyggtffu7780 10 วันที่ผ่านมา

      Jesus Christ loves yall if yall did not know already come to Christ repent non denominational KJV John 3:16-17 16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. 17 For God sent not his Son into the world to condemn the world; but that the world through him might be saved.

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

    Thanks so much!!! This really helped out a lot took just a few minutes to get my Lumberjack system to work with this, really cleaned up a lot of unnecessary work thank you. I also referenced you in my latest update video so people can find you easier.

    • @AngryBO2Gamer
      @AngryBO2Gamer  9 ปีที่แล้ว

      Adam Hargett I really appreciate that, and I'd like to thank you for subscribing, and in case you are interested, I am working on a tutorial series that will guide you through the process of recreating Nazi Zombies in UE4.

    • @avo9488
      @avo9488 9 ปีที่แล้ว

      AngryGamerTV That's great I look forward to see what you've put together :)

    • @cutyfttyggtffu7780
      @cutyfttyggtffu7780 10 วันที่ผ่านมา

      Jesus Christ loves yall if yall did not know already come to Christ repent non denominational KJV John 3:16-17 16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. 17 For God sent not his Son into the world to condemn the world; but that the world through him might be saved.

  • @SaiNarayan_
    @SaiNarayan_ 8 ปีที่แล้ว +4

    Thanks for this tutorial! It was super detailed and helpful! Keep making more! =)

    • @AngryBO2Gamer
      @AngryBO2Gamer  8 ปีที่แล้ว

      +Sai Narayan Glad you enjoyed, I encourage you to check out my active tutorial series where I teach you how to recreate Nazi Zombies in UE4.

    • @cutyfttyggtffu7780
      @cutyfttyggtffu7780 10 วันที่ผ่านมา

      Jesus Christ loves yall if yall did not know already come to Christ repent non denominational KJV John 3:16-17 16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. 17 For God sent not his Son into the world to condemn the world; but that the world through him might be saved.

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

    Amazing tutorial. Will be trying it shortly!

    • @cutyfttyggtffu7780
      @cutyfttyggtffu7780 10 วันที่ผ่านมา

      Jesus Christ loves yall if yall did not know already come to Christ repent non denominational KJV John 3:16-17 16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. 17 For God sent not his Son into the world to condemn the world; but that the world through him might be saved.

  • @MNGubbaldoGooche
    @MNGubbaldoGooche 6 ปีที่แล้ว

    Amazing video, very well paced, very clear. I'm going to watch your other videos now. But in case you haven't dont this already, could you do a quick tutorial on how to set up a gathering system. You know where you use an axe to knock the tree down after a number of chops.
    Thanks :D

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

    I learned a lot! Thank you sir for this awesome tutorials! ;)

    • @AngryBO2Gamer
      @AngryBO2Gamer  9 ปีที่แล้ว

      ceewwb I'm glad you enjoyed, be sure to subscribe to be notified of my new tutorials.

    • @ceewwb
      @ceewwb 9 ปีที่แล้ว

      AngryGamerTV I already did that, I also enabled email notifications! xD

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

      ceewwb Thankyou. In case you are interested, I am working on a series in which I recreate Nazi Zombies from scratch, and teach everyone how to do it, you can find it on my channel.

  • @christophe1584
    @christophe1584 4 ปีที่แล้ว

    Nice video, thank you for that helpful tutorial :) !

  • @M0A2X8
    @M0A2X8 7 ปีที่แล้ว

    Thanks for that awesome tutorial m8!

  • @predatoria3008
    @predatoria3008 7 ปีที่แล้ว

    Great tutorial. Thanks!

  • @Nox0midnightstudios
    @Nox0midnightstudios 9 ปีที่แล้ว +34

    Nice vid! And interesting how many noises you can make with your mouth. :D

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

      Nox ygen Yep, my mic is not sensitive at all, so I have to pretty much stick it right on my mouth for anyone to be able to hear me.

  • @mhnoni
    @mhnoni 7 ปีที่แล้ว

    Thanks a lot mate , great trick for optimized way of making game .

    • @hirvielain9013
      @hirvielain9013 4 ปีที่แล้ว

      Exactly. Initially my idea was to convert all of the static meshes to actors simultaneously at the beginning of the play. This _might_ be a more optimized solution. :D

  • @lendo182
    @lendo182 6 ปีที่แล้ว

    Thanks a lot for this Tutorial !!!

  • @UpsideDownOwl
    @UpsideDownOwl 8 ปีที่แล้ว

    Very good trick for optimizations . thanx

  • @JasperCousins
    @JasperCousins 9 ปีที่แล้ว

    Wow, I cant thank you enough! this tutorial has made my day, I'm making a game where you play as a dragon so I want you to be able to destroy forests, boulders, burn away even the grass!

    • @AngryBO2Gamer
      @AngryBO2Gamer  9 ปีที่แล้ว

      Jazz C Hmm, not sure if it was you, but a few months ago I saw a few posts on the forums from someone wanting to edit foliage like this, they were also making a dragon game, I am glad this is helping you out. All I ask for in return is publicity, maybe you could reply to my thread on the forums if that is where you came from :)

    • @JasperCousins
      @JasperCousins 9 ปีที่แล้ว

      AngryGamerTV Ah, yeah that was me, I never found anything conclusive on the forum though so I had given up but yesterday I started experimenting with the procedural foliage tool which reminded me how much I needed this.
      I will post a link on the forum I was on and I will put a link to this video in the description when I put up another video of my game so people can find out how to make interactive foliage themselves.

    • @AngryBO2Gamer
      @AngryBO2Gamer  9 ปีที่แล้ว

      Jazz C Thanks, I appreciate it.

  • @Activeatom-zp4hd
    @Activeatom-zp4hd 6 ปีที่แล้ว

    if you get the player rotation the add the force in that direction it makes it more realistic when it falls

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

    At the end when you said to turn an object into foliage for the optimizations.
    Would it be valid to use that format on the trees here, after they have been knocked down.
    Say if ignored for 2 mins then convert back to foliage.

  • @RobCardIV
    @RobCardIV 4 ปีที่แล้ว

    wooohooo.
    this is just what i was working on.

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

    I can hear your heartbeat thought the whole video.

  • @pjpankras
    @pjpankras 8 ปีที่แล้ว

    Can I replace the trace by just checking if the tree is hit by an object? I like to use your example just to be able to knock over a tree when a vehice hits it. Any tips?

  • @CGPacifica
    @CGPacifica 8 ปีที่แล้ว

    Holy crap, thank you so much.

  • @jluko1220
    @jluko1220 7 ปีที่แล้ว

    Hi, I've been trying to execute a concept for weeks now with no avail. Basically I want to be able to animate vines growing on the player character (as a stun move for a Boss AI) Something similar to the natures grasp from WOW. You have any idea where I can start with that?

  • @phychomatic21
    @phychomatic21 5 ปีที่แล้ว

    Hi there. Thanks I been looking for something like this. Quick question. Once the tree becomes an actor, how do I reference said actor to say destroy actor or further interaction with it for more wood before it gets destroyed

  • @TheLordStuff
    @TheLordStuff 4 ปีที่แล้ว

    Hi there, do you have an idea of how one would make this work with in-progress joining players? The problem is if a client spawns after an instance has been removed, it is still there for the client. The spawned actor is there too, because it's properly replicated.

  • @Maelgrim35
    @Maelgrim35 8 ปีที่แล้ว

    Great Video!

    • @AngryBO2Gamer
      @AngryBO2Gamer  8 ปีที่แล้ว

      +Maelgrim35 Thanks, glad you think so! I have a giveaway going on right now in-case you haven't entered it, it ends in like 28 hours, I have a video on my channel that talks about it.

  • @Paul-hw7kc
    @Paul-hw7kc 3 ปีที่แล้ว +3

    I wish he would had covered how to add force to the tree to make it fall over. I have very little experience with physic interactions. I've tried adding force at location but the tree doesn't bulge even at 1,000,000 force. If anyone knows a way to do this please let me know.
    Update... I figured it out! I'll share my solution since I know these things can be frustrating. After my actor spawned, I did another line trace. I broke the hit down and connected that with Add Force. In the break down, I plugged hit component into Add Force's target pin. I took the direction my line trace was facing and multiplied it to give it more force. I plugged that into the force pin, and it worked! Note, I'm spawning my actor after the mesh was destroyed not before like the tutorial.

  • @someone-yw2qw
    @someone-yw2qw 7 ปีที่แล้ว +5

    is this asmr ? great video btw

  • @TheIsleNarrator
    @TheIsleNarrator 4 ปีที่แล้ว

    Thank you Sir!

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

    hey, just wondering. So I've made it so you click the tree and it removes the tree and replaces it with the new interactable one. I was just wondering how I could set it so it took a certain number of hits until it was replaced? Thanks!

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

      It's probably way too late to answer this for you, but for anyone coming in later and having the same issue:
      You could put a counter variable into your interactive, not replace it immediately, but cast to your interactive, get its counter variable, and make a counter in your character which counts for every hit on that single mesh it traced to, and when the character counter and the interactive counter are equal, replace it

  • @Wolf103085
    @Wolf103085 9 ปีที่แล้ว +8

    I was wondering if you can do something like "The Forest" without having to model a whole new tree using Speed tree/default trees within UE4 with the chopped layers. Mainly the tree dissolving when you are hitting it.
    I'd like to see that type of tutorial :-)

    • @cutyfttyggtffu7780
      @cutyfttyggtffu7780 10 วันที่ผ่านมา

      Jesus Christ loves yall if yall did not know already come to Christ repent non denominational KJV John 3:16-17 16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. 17 For God sent not his Son into the world to condemn the world; but that the world through him might be saved.

  • @BrianMcGauley
    @BrianMcGauley 8 ปีที่แล้ว

    incredibly helpful for my project, got me to the next level. But I have a question for you. Say I add a widget to the actor I'm replacing, can I instance that in an array? I've been trying with no luck :( I need it to be seperate so that I can track health for each seperate instance I'm replacing with an actor (for healthbars.) Without seperating it I'm just getting glitchy healthbars trying to track every actor at the same time :/ Any tips?

  • @overrated6348
    @overrated6348 8 ปีที่แล้ว

    Thanks for the video Angry, I think i mite adapt this into event beginplay for my level. doing it this way would convert all foliage into bp actors on loading the level.

  • @hirvielain9013
    @hirvielain9013 4 ปีที่แล้ว

    Thank you!

  • @VladyVeselinov
    @VladyVeselinov 7 ปีที่แล้ว

    Awesome!

  • @pesaladesilva1105
    @pesaladesilva1105 3 ปีที่แล้ว

    Hi, wow this is amazing. I was recently experimenting ray tracing and tried to get a ray from a spline point to a landscape( a ray hitting perpendicular to a landscape). My goal is to get the z value of the landscape position hit by the ray. Would be grateful if you can have a suggestion on this. Thank you :)

  • @darkrisen8635
    @darkrisen8635 6 ปีที่แล้ว

    What About setting the re-spawn of the tree so it can be traced and get resources from if a recourse is setup. (Wood From Tree). ???

  • @riazulrahil
    @riazulrahil 3 ปีที่แล้ว

    Thank You :-)

  • @MrJayke-yr6vk
    @MrJayke-yr6vk 6 ปีที่แล้ว +1

    it works perfectly in editor but in packaged and standalone the "remove instance" node does not work

  • @daturave
    @daturave 8 ปีที่แล้ว

    Any help on the Index macro? I don't have any understanding on how macros work and can't get a proper index (0 -> -1). Does it matter that i use a sphere hitbox to check for instances to switch (overlap)?

    • @daturave
      @daturave 8 ปีที่แล้ว

      +daturave Can anyone verify if this is still true answers.unrealengine.com/questions/39102/can-instancedstaticmeshes-have-individual-collisio.html ?

  • @spydergs6982
    @spydergs6982 7 ปีที่แล้ว +108

    I wanted to watch this video but the loud lip smacking I couldn't handle.

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

      XD This post is beautiful XD

    • @seanwarren9357
      @seanwarren9357 6 ปีที่แล้ว +7

      Oh why do I read comments before finishing a vid.
      XD

    • @Aerotune0
      @Aerotune0 5 ปีที่แล้ว +5

      I didn't notice until I read your comment and now I can't unhear.

    • @cj-xr2kd
      @cj-xr2kd 4 ปีที่แล้ว +1

      *smacks lips* Misophonia club unite. *Smacks lips* thanks. *Smacks lips*
      Good tutorial though, auto generated captions help

    • @_jdfx
      @_jdfx 3 ปีที่แล้ว

      right now, that's above 13% of people with misophonia watching this...

  • @RicardoRocky0
    @RicardoRocky0 3 ปีที่แล้ว

    perfect!

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

    *mutes audio and turns on closed captions* I never thought I'd wish so intently on being deaf. The sweet embrace of silence is the only thing that got me through this. Please tell me you've since changed the way you start and end sentences.

  • @lowpolyambitions5853
    @lowpolyambitions5853 7 ปีที่แล้ว

    Any way to only knock it down after a certain number of hits?

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

    I cant seem to get it to delete the instances... tried attaching the return value of the remove instance and it returns "false"

  • @CanalDojogames
    @CanalDojogames 5 ปีที่แล้ว

    Hello, i want to make something like this but when Interact the tree Go down and its trunk keep there.... Any tips How can i make It?

  • @TheUncooked
    @TheUncooked 7 ปีที่แล้ว +33

    great video!!!!, but man those lip smacks..

  • @mrnubbins6301
    @mrnubbins6301 8 ปีที่แล้ว

    Hey my tree reacts to my character bumping into it on the ground and the tree violently spins like a tornado, all over the place, lol Any ideas? unreal engine 4.11.2

  • @riazulrahil
    @riazulrahil 3 ปีที่แล้ว

    Yes, Please!

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

    My fps go down when I remove instance. How to solve it?

  • @tomi71
    @tomi71 3 ปีที่แล้ว

    Maybe too late to ask, but I have a throwable object and I would like it to remove foliage when it hits/overlaps it. So doing this without line tracing. Is it possible to do it that way. On begin overlap OR the hit event?
    Did once almost succeeded but it removed ALL foliage from the world. So trying to remove component instance instead of foliageActor. Did all the same as in here except spawning another object (I only want to remove the overlapped foliage) and instead of line trace I used box collision on the throwable object but casting fails every time.
    Can somebody suggest something to try in this case.

    • @tomi71
      @tomi71 3 ปีที่แล้ว

      I realized that casting was succesful but "Remove Instance" does nothing. If I change that to Set visibility, it will turn tree invisible BUT it will turn all of that type of a tree invisible.
      I wonder why in overlap it chooses all the same type of foliage even though they can be tens of meters away of each other.
      Why line tracing chooses only one. Or is it that Transform node that chooses only one location.

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

    i'm trying to do this with "event begin overlap" isntead of a line trace. but for some reason it just doesn't work. any idea why?
    line trace works perfectly fine. i feel like the problem might be the object index pin in the line trace being different in event begin overlap, any ideas?

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

      ok hahah i was hooking up the "overlapped component" pin istead of "other component" pin, switching that fixed my issue.

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

    is there a way to have the foilage spawn back after time?

  • @Diana2zzz
    @Diana2zzz 5 ปีที่แล้ว

    hello,how can I save the removed tree or planted trees

  • @jamesharder3753
    @jamesharder3753 5 ปีที่แล้ว

    After I baked my lighting, the shadow from the foliage objects were backed onto the map and remained after the object was turned to an actor.
    Do you know how to address this?

    • @TheAxebeard
      @TheAxebeard 5 ปีที่แล้ว

      Don't use baked lighting.

  • @benthedaddyYT
    @benthedaddyYT 6 ปีที่แล้ว

    Gives off some odd errors if you try to remove one of thousands of instances. Causing some insane lag on removal of that one instance.

  • @mr.sunshine4432
    @mr.sunshine4432 4 ปีที่แล้ว

    I know this an old video but if anyone could help, that would be great. I followed it and everything works (all print strings aswell) but the created actor doesn't spawn when the static mesh (foliage) is removed. Anyone know what could be the problem?

    • @Paul-hw7kc
      @Paul-hw7kc 3 ปีที่แล้ว

      It might be spawning just not spawning at the correct location. Make sure world space under get instance transform is ticked. If that's not the cause, it might be a collision issue.

  • @Maelgrim35
    @Maelgrim35 8 ปีที่แล้ว

    Hey man, I followed this line by line and getting cast failed on every trace, the collision is working because i see a red dot where the collision box is that blocks traces but its failing the cast to instanced static mesh component for some reason, any thoughts? Cheers!

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

      +Maelgrim35 Ok so you have to paint on with foilage tool, if you just pull out the static mesh it no work, now I know! So now even though I have my custom collision on my blueprint on not to block pawn, or anything that matter other than traces, it still blocks the player from walking through it when the blueprint comes in and takes the place for the instanced static mesh, ill just keep putting my problems and solutions here so all can learn, thanks!

    • @Maelgrim35
      @Maelgrim35 8 ปีที่แล้ว

      +Maelgrim35 You can change this in the details page of the blueprint that was made, cheers everyone!

    • @jaxcarls7412
      @jaxcarls7412 7 ปีที่แล้ว

      it didn't work for me? any more solutions? I pained with foliage but the trace still stops at the casting process

  • @jaxcarls7412
    @jaxcarls7412 7 ปีที่แล้ว

    I can't get this to work, I simulated it and it turns failed at the casting process? What am i doing wrong? I have singel static mesh and foliage placed. But nothing seems to work as i want

    • @M0A2X8
      @M0A2X8 7 ปีที่แล้ว

      its not working because you used a single static mesh, try with foliage instead.

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

    Omg, you smacking your lips so often really irked the hell out of me. Made it so difficult to get through this lmao
    other than that one gripe, this was a good tutorial ! :)

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

      peeling my fucking skin off

  • @John-un3lj
    @John-un3lj 4 ปีที่แล้ว

    Keep smacking them lips, one of the best videos on the subject out there!

  • @Xhyllos1
    @Xhyllos1 7 ปีที่แล้ว

    if else if else if else if else if else if else if else if else if else if........ Epic really needs to make a blueprint paintable with the foliage tool.

  • @groggygeeks8342
    @groggygeeks8342 6 ปีที่แล้ว

    Awesome video dude!! Just need a little help with something to do with this tutorial if you have some free time? Urgent help required :(

  • @survivorx6536
    @survivorx6536 7 ปีที่แล้ว

    Can you do a tutorial on how to cut down trees after you have equiped an axe or something.

    • @comfychairstudios746
      @comfychairstudios746 7 ปีที่แล้ว

      Did you by chance find an answer? i am also looking for that type of tutorial.

    • @survivorx6536
      @survivorx6536 7 ปีที่แล้ว

      No we didnt ever get an answer

    • @comfychairstudios746
      @comfychairstudios746 7 ปีที่แล้ว

      Well shucks... that is frustrating... did you ever find another solution?

    • @survivorx6536
      @survivorx6536 7 ปีที่แล้ว

      Nope i need tree cutting but in this case im going to have to leave it until i get someone

    • @comfychairstudios746
      @comfychairstudios746 7 ปีที่แล้ว

      just sent you a message

  • @m.cruzzz444
    @m.cruzzz444 2 ปีที่แล้ว

    Lo unico que queria saber era como ponerle Colision al Foliage que ponia en el nivel... Gracias crack

    • @m.cruzzz444
      @m.cruzzz444 2 ปีที่แล้ว

      estoy usando UE 4.27

  • @decilgang
    @decilgang 7 ปีที่แล้ว

    This would not work in situations with large numbers of foliage like in a full game.

  • @dorblitz4045
    @dorblitz4045 7 ปีที่แล้ว

    Lip smacking like this can be prevented if you bite in a fresh apple before recording. At least thats what I heard.

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

    this is super unscalable

  • @saulgoodman612
    @saulgoodman612 7 ปีที่แล้ว +18

    nice tutorial, but tell your girlfriend to not be so loud when she sucks, its pretty distracting.

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

    SO GROSSSSSS