Foliage Wind Sway - UE4 Materials 101 - Episode 37

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

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

  • @deltaau8022
    @deltaau8022 4 года назад +13

    Ben 3 times now you have created the exact tutorials I needed at the times I've needed them the most. First was rock layers, than water and now this one with tree swaying to directional wind. Thank you so much, your tutorials are very informative and have been of so much use.

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

    Right to the point. Figured out what I was looking for immediately. Great tutorial!

  • @psubst9054
    @psubst9054 4 года назад +3

    your tutorials are amazing, greetings from Russia

  • @красивый-у8щ
    @красивый-у8щ 2 года назад +2

    used this in a game jam thank you so much

  • @turalmemmedov3648
    @turalmemmedov3648 Год назад +3

    Hi there, I know this is an old video, recently I found that, if we use preskinned local bounds node's Max output, shader works with foliage tool. We dont need to manually enter the value. And Object scale Z value deforms foliage wrong. At least for me. But one thing is, after replacing Object radius with preskinned local bounds node, we need to edit nodes values after that node. I used different nodes for more controll than video. After divide node, I used cheapcontrast, power, add, multply to correct bending "artefact" and to controll from how low bending happens. Hope it will help to anyone.

  • @paradoxgbr6496
    @paradoxgbr6496 4 года назад +4

    Hello, please tell me, do you have a video where you animated the trunk of your tree

  • @HB-wk6zj
    @HB-wk6zj 4 года назад +4

    You're the best Ben thank you!!!!

  • @AhmedHasan91
    @AhmedHasan91 4 года назад +1

    thanks a lot buddy.. keep up the good work,, i really wish you best of luck to grow the channel because you are the best on youtube..

  • @alexanderalikin1210
    @alexanderalikin1210 4 года назад +3

    I'd like more tutorials on the water:
    - boundless ocean (LODs?)
    - waves layering on top of each other
    - get the height value at a given position out of the material (for buoyancy outside the shader). Typically most oceans compute the waves twice (in C++ and in shader) cuz 'there is no way' to get the height data out of the material. Maybe they're wrong
    - sprays at the waves crest
    - foam on the waves
    Etc.

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

    This does not work for instance foliage type component as instanced foliage types return the origin of first instance.
    Instanced static mesh component works.
    Both UE5 demo medival village and megascan packages all use pivot painter. Hopefully Ben can do a video explaining the pivot painter implementation.

  • @jackturner7814
    @jackturner7814 3 года назад +1

    Do the tree assets have to be SpeedTree Assets? When i try to use this shader, the trees dont sway, so much as get thicker and thinner.

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

    seems late but do you have the grass, I've tried subtracting the LinearGradient but still same output.

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

    A very interesting lesson, but I would like there to be dependencies on the values of the wind class, so that through this class it would be possible to control the settings of all vegetation.

  • @mindped
    @mindped 3 месяца назад

    why in yours the smaller the object the much larger the sway? Like if i have a tube for a wire as a mesh thats 1meter it sways off 30 meters ot the left.. but if the wire isl like 100 meters it sways very little...

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

    Getting really weird moving shadows when using hardware ray traced shadows, the evaluate world position offset doesn't seem to work on the static mesh or foliage instance.. very weird

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

    intro sounds a lot like goose bumps hahaha

  • @DrGameTazo
    @DrGameTazo 4 года назад

    It appears to me the property : wind speed of wind node is not a constant .it keep increasing?? otherwise it cant be animation...

  • @JoesphCrack
    @JoesphCrack 4 года назад +1

    Love whatever you'll give me but I wouldn't mind a more thorough explanation on something's. I know you're keeping this channel pretty focused on shader math and not touching assets but definitely would enjoy a few topics. Pivot painter, more vertex displacement examples, some interaction with blueprints (even simple character/ object interaction), post processes materials, you could discuss things that deal with old school techniques ( ie faking cube maps using fresnel and reflection vectors), using custom hlsl node to do meta balls or anything raymarching. really anything. I look forward to these each week definitely a truly enjoyable channel.

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

    Great tutorial, I managed to create some great looking wind, for some reason though it doesn't work on foliage instances in UE5.2, any ideas?

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

      Ah, solved thanks to commenters below!! Basically the object radius node prevents it from working as foliage, so replacing the node with a scaler value (around 81 in my case for wheat) multiplied by the 'z' output of an 'object scale' node.

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

    Hi can you make a video about rotatin and perhaps translating leafs on the ground, like leafs on the floor been affected by the wind like a spring season?

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

      These two videos may be what you're looking for: ruclips.net/video/q62CdbKNdJQ/видео.html, ruclips.net/video/aLCgoI0oYUo/видео.html

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

      @@BenCloward Thanks!!

  • @Crappynight
    @Crappynight 3 года назад

    Hello Ben! Great tutorial, i just have a problem when painting foliage with a foliage tool. Sway works perfectly when it's a static mesh but it doesn't move at all when i use foliage tool, is there a way to fix it?

    • @Crappynight
      @Crappynight 3 года назад +1

      Nevermind, I found answer in the comments below!

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

    为什么刷出来的植被不会动,摆出来的才会动,是因为绝对世界位置吗?

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

      Yes. You'll need a different wind solution for vegetation that's applied with the brush tool.

  • @antoinedevldn
    @antoinedevldn 4 года назад +1

    Awesome :D

  • @remon563
    @remon563 3 года назад

    Hi Ben! do you have a video on the tree trunk shader ?
    ps. your channel is a gem for anyone interested in game development. Learning a ton

    • @BenCloward
      @BenCloward  3 года назад +1

      Thank you! I haven't made any videos about tree trunks specifically. I think I just left the trunks using the material that they came with. If you're looking to make the trunk sway, you should be able to just use the sway from the leaves but leave our the detailed movement.

  • @MikhailZhegloff
    @MikhailZhegloff 4 года назад +1

    Very usefull lesson! but it`s way of swy work only for static meshes and didn`t work for meshes spawn by foliage (

    • @BenCloward
      @BenCloward  4 года назад

      Ok, thanks for letting me know. I haven't used the foliage tool yet. I think generally you'll want to hand-place larger trees anyway - and those would be using this sway method. Then you could use the foliage tool for placing bushes, grass, and smaller things like vines.

    • @MikhailZhegloff
      @MikhailZhegloff 4 года назад +1

      @@BenCloward procedural foliage spawner was developed by Epic mainly how quick tool to spread a lot of trees, by simulating seeds and growing process, so for big maps, place every tree by hands its a old school way) maybe you'll check how this sway shader can be modified for foliage tool ) thx a lot!)

    • @deltaau8022
      @deltaau8022 4 года назад +3

      I was having the same issue as well - I believe this is due to the object radius node towards the end - if you can set it manually then it has solved the problems for me.

    • @static2601
      @static2601 4 года назад +2

      Setting the value manually as Delta au said worked but the sway of the tree seems to be determined by the tree size. I fixed this by multiplying the value by ObjectScale on the z axis and its much more uniform.

    • @MikhailZhegloff
      @MikhailZhegloff 4 года назад

      @@static2601 multiplying what value mate? ) can u show more correctly plz)

  • @SenEmChannel
    @SenEmChannel 3 года назад

    Im Just confused. Rotation axis of the leaf should always match to wind direction. But in the video you make cross product between wind direction and Z axis. Im very dump at match. So....🙄. If anyone figure it out. Please let me know🥺

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

      This would be easier if I could draw you a picture to explain it. The z axis is pointing straight up. If you cross that with the wind direction, you get an axis that is perpendicular to both of them. So if you then rotate around that axis, you will be rotating in the wind direction. If you were to rotate around the wind direction you would get a side to side rotation relative to the wind - which is 90 degrees off from what you want.

    • @SenEmChannel
      @SenEmChannel 3 года назад +1

      @@BenCloward ahhh. I get it. Leaf will rotate around the axis, not follow along the axis . 😅. Now i know. Well, It would be easy to visualize if leaf just gone to the wind direction. My brain hurt

    • @turalmemmedov3648
      @turalmemmedov3648 3 года назад

      @@BenCloward OMG. I think now I know how to animate my Palm tree leaves as I want. :D Why I didnt read this coment before? Thank you again.

  • @djmips
    @djmips 4 года назад

    8:50 - 1.5 radians should be only ~ 90 degrees not 180, why did the leaves rotate 180? (I'm at halfway point of video)

    • @BenCloward
      @BenCloward  4 года назад

      Yep, that's my mistake. 1.57 radians is 90 degrees. I don't know why it rotated all the way. I'll need to go back and look at it. Good catch!

    • @ShinanoYokosuka
      @ShinanoYokosuka 3 года назад

      @@BenCloward perhaps in Unreal, from 0 to 1 equal 0 to 360 degree. So 1.5 is 360(+180) degree?

  • @한승원-x9h
    @한승원-x9h 3 года назад

    인정한다. 킹갓 혜자아저씨

  • @dubtube6691
    @dubtube6691 4 года назад +1

    I wish one could do the same in Maya

    • @artwizardsam3238
      @artwizardsam3238 3 года назад

      That's what I'm wondering! Why can't we just animate the planes in Maya like the trunk? Just for optimizing I assume?