Unreal Engine 4 - Place foliage at run-time

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ส.ค. 2024
  • Just a brief tutorial showing you how you can place foliage at run-time in UE4. This method does work if you are using procedural foliage, but the component indexes still need to be consistent with the meshes in the foliage tab.
  • เกม

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

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

    First off, thanks for the great tutorials. Getting the index doesn't seem to work any longer in UE5. I have no idea why. Because I'm getting a completely different index as expected.
    So what I did was in the Construction script, I listed all of the indexes and I could see which integer went with what bush/tree. I plan on making a nice UI just for the fun of it.
    Now what if I wanted to "plant" a bush? Would it become an actor or maybe convert it to an instanced mesh?
    This opens up a lot of possibilities like having a background timer that replaces the meshes or changes the size to "grow" plants.

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

    could you do a tutorial on procedural foliage and how to respawn foliage after its gone please

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

    for some reason the component index of the specific foliage type i'm looking for is -1 of what's returning from th eprint string. for example: print string returns 58, the actual index i'm looking for is 57

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

      Don't forget to hook a wire from the Cast To instancedStsticMeshComponent to the Find. I had the same issue. :)

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

    How does one respawn foliage once havested after a set timer?

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

    Could you do a sphere overlap check instead of a trace? I wanted to have an AIActor look around itself for a tree to harvest.

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

      Matt Marcin You can't do a sphere overlap, but you can do a sphere trace, which seems like it would work in your situation.

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

    So i have two different trees, one gives more "logs" than the other, when my foliage spawns back it only spawns as one type
    how do i fix this?

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

    Around 14:45 you mentioned that you want to "save the data" and "re place the a foliage" to make it persistent -- are you implying writing our own serialize/deserialize methods? Or is there a way to make dynamic StaticMeshInstance components persistent on level save?

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

      I'm sure you could link each instance up to a Struc of some sort containing all of it's transform data and just save an array of those strucs for it to construct on each load

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

    Hello, this Tutorial is awesome! I have a question, how can u specify what foliage you want to spawn? Thank you so much!

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

      Maybe I need to read the data table to select the trees, but I have to use a few days to solve this problem, I feels very difficult

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

    cool cool but for the love of god stop doing this thing with your lips every 2 seconds