Dynamic Gradients in Unreal

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

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

  • @matusskalican5951
    @matusskalican5951 11 месяцев назад +5

    I love you man, This is the only video on the whole internet that explains hwo to actually do gradients

  • @ZacDonald
    @ZacDonald 2 года назад +5

    One of my favorite uses for world position gradients is adding color banding to rock cliffs, can really help make separate textures for different rock assets blend together.

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

    I remember us having the same foliage height-based issue some time ago on this very channel , glad to see a workaround.

  • @Ailiennel
    @Ailiennel 10 месяцев назад +1

    This is what I really needed. Thanks man!

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

    Pro Tip:
    For skeletal meshes you can use a [Pre-Skinned Position] node to take a gradients from skeletal mesh and [Pre-Skinned Local Bounds] to scale thouse gradient to proper values.
    Its more cheaper then generating extra UV for skeletal mesh. Because UE is optimised to store UVs by pairs (mainly because of auto light maps). So using single UV is the same as two UV, and using three UV is equal for performance as four.

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

      Oh, I didn’t know that about uvs being stored in pairs, that’s interesting. Preskinned is good for a gradient, I probably should have mentioned it - good tip!

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

    Nice video man, i always wanted to learn this kind of stuff, i love your tutorials!

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

    thanks again tharle! :D top level content as always!

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

    Great!!! I am waiting for it!!! You are a master! :)

  • @Fingle
    @Fingle 4 месяца назад +1

    you are a hero

  • @Adam-vg5yz
    @Adam-vg5yz 2 года назад +1

    There's 3d modelling and UV tooling built into UE5 now, so if doing the last method might be worth giving those a look

  • @visualfinesse7445
    @visualfinesse7445 5 месяцев назад +2

    I was really hoping you would show us how you did the triple -color gradient. I've been working on this for a while now and can't figure it out.

    • @tharlevfx
      @tharlevfx  5 месяцев назад +2

      @@visualfinesse7445 you basically just do the same thing twice! So gradient between colours a and b, and then again between the output of the first lerp and colour c

  • @gherson13
    @gherson13 2 месяца назад +1

    Hello, really nice tutorial, do you know how to make this with three colors instead of 2? the same as the one that you have, red-pink-blue?

    • @tharlevfx
      @tharlevfx  2 месяца назад +1

      @@gherson13 I believe there’s a material function for lerping 3 colours in the engine you could look at. But basically you just do the same process twice - lerp between red and pink with one gradient then the result of that and blue with another gradient

    • @gherson13
      @gherson13 2 месяца назад

      @@tharlevfx amazing thank you

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

    Thank you! Exactly what I was looking for!
    edit: Using the newest version of UE5.1, the vertex interpolator does not seem to work, all of my foliage assets are using the gradient not per instance but per the whole group.

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

      Found the same issue. I don't believe you can use the VertexInterpolator in this way if your mesh uses Nanite.

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

      @@Fafmagic Disabling nanite on the assets might help

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

      Anyone found a workaround using the vertex interpolator node, does not seem to work in Unreal 5.3. Even when disabling nanite

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

    I would also add vertex colors as an option.

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

      Yeah vertex colours are super powerful too but I’m not sure they’re dynamic in the same way. Very useful though!

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

    Thank you very much

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

    thank you very much for the info ... saved my life XD

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

    They Tom, would you have any tips on where to start as far as a vehicle customization system for liveries/paintjobs? I have looked and there is very little information from what I've seen so far, I would like to explore how one might be able to 'paint' a vehicle with preset shapes for example and then store that image somehow. Welcome back by the way!

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

      Can you email me with some images of what you mean? I’ll have a look!

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

      @@tharlevfx Done!

  • @Danko1201
    @Danko1201 8 месяцев назад

    usefull video thanks for that

  • @gillgonzalez8479
    @gillgonzalez8479 4 месяца назад +1

    I cant get this to work. Im using PCG nanite trees with the vertex interpolator and its still treating it ike a height based gradient.

    • @tharlevfx
      @tharlevfx  4 месяца назад

      @@gillgonzalez8479 sounds like a lot of moving parts that could cause this to break unfortunately. Generated foliage and nanite could both upset the object pivot data needed for the gradient

    • @gillgonzalez8479
      @gillgonzalez8479 4 месяца назад

      Hey thanks for the lightning quick reply. Do you know of any work arounds by that i could try?

    • @tharlevfx
      @tharlevfx  4 месяца назад

      @@gillgonzalez8479 I've not really used PCG and nanite as you're describing but if you're generating the trees then you should also be able to generate vertex colour or uv's that have a gradient similar to what is being made in the video.

  • @anniki7573
    @anniki7573 11 месяцев назад +1

    I made the gradient horizontal, but when I rotate the object the gradient changes, how can I make the gradient completely relative?

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

      You can take the object rotation into the material and do some calculations with that, but if you want it completely relative, just use uvs / textures / vertex colours on the model instead of a procedural gradient

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

    Hi there and thank you for awesome content as always )) I have a question. Could you make a video about dynamic dirt masking for characters? For example, if character fell down on his back, his back gets dirty and so on. I cant find any tip or tutorial for that. Thank you again.

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

    Any way of lerping more than 3 colors in a gradient without using a gradient map? E.g. 10, 20 or 30 gradient color points?

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

      Not without some crazy complex math. If you want that level of control you can use an engine curve asset and import it into the material

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

      Is it possible to expose the color curve asset key/gradient stop values in parameters to set the values dynamically through blueprints?​@tharlevfx

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

    Hey man do you think you will make videos about the new Strata Materials when they're out?

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

    Thanks for this! How would we go about adding some irregularities to the gradient mask? Im using the world position technique you go through and Id like to make it so that the gradient isn't so straight. I've tried multiplying a noise texture but not getting what I'm looking for. Im assuming its difficult with WP.

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

      Adding a texture gradient to your gradient is how I would add some irregularities.

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

    This comment is a year late but, I can't seem to get this to work with Landscape grass. Object position seems to return an arbitrary value so subtracting it from the world position doesn't provide an equal gradient across different "Chunks" of landscape. Any ideas?

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

      Instanced static meshes like grass will give you the position of the group, rather than per object - if you check out my video on the vertex interpolator, you should be able to use that to get per instance position, instead of the whole group

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

      @@tharlevfx I actually did try using the vertex interpolator, I'm in unreal engine 5.3.2, unfortunately that didn't work I was getting different colors in different squared off areas where the grass was generated as a group. Interestingly the color was indeed correlated to the height of the object group. Nonetheless, It does work with foliage, and I just used a UV height gradient for the grass since it's not a complex mesh.

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

      @@BeginnerDev oh, landscape grass - yeah I think that might give the value for the landscape tile it’s on.

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

      @@tharlevfx Yeah it does indeed seem to do this. thankfully for grass using the UVs is sufficient! Also I want to thank you for all the information you've put out and for your quick replies!

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

    Nice Work 🙂 Keep it Up! 💪
    Is it possible to use World Position Offset in a Post Process Material?
    My Goal is Curved World Post Process World Position Offset Effect.

  • @felixstief7830
    @felixstief7830 5 месяцев назад +1

    dosent work on my foliage for some reason, it takes the whole foliage as one obj

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

      @@felixstief7830 foliage is an instanced mesh so it will do as you say. If you check out my video on the vertex interpolator you can get the instant position with that and then do your gradient calculation

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

    is there any way to make diagonal mask?

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

      Depends exactly what you want - you could rotate the mask around a known point and get a diagonal that way, or add two masks in different directions to get something diagonal

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

    It's honestly weird you can't just request the local vertex position. Thanks for the subtraction tip!

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

    can we somehow generate a gradient running from UV island's borders in ue5?
    looking for an effect like in painter's modifiers
    for a non map solution for creating SSS for plants without a map

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

      Do you mean like a flood fill gradient per uv island? I’m not sure that’s possible I’m afraid - you would need to use either uv space, world space or local space and author things correctly for that

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

      @@tharlevfx thanks, yes. Makes sense! That was a very fast reply :D

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

    After all those years I've been a subscriber and I just realized you write color wrong.
    Can't believe you stabbed me in the back like that 🔪

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

      Haha, did the English accent not give it away?!

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

      @@tharlevfx True, but I thought in code the world agreed to use US spellings :3
      Anyway, as long as you still use meters, I think there is hope for a friendship :P

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

      @@yonjuunininjin I think that might be a lie Americans tell themselves :)

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

    I Can use This feature In my games

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

      Yeah of course!

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

      @@tharlevfx thank you so much