Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Unreal Shader : Vegetation
Rating: 4.6 out of 5(14 ratings)
96 students

Unreal Shader : Vegetation

Learn how to create a dedicated vegetation shader for UE5
Created byMichael Gerard
Last updated 1/2024
English
English [Auto],

What you'll learn

  • Two main shaders - The first one for Bark/Foliage assets and the second one for ground foliage
  • Attribute Parameters - Color, normal, roughness, specular, ao intensities
  • Subsurface Scattering - With custom color & intensity controls
  • Billboard logic - Speedtree Only
  • Two different winds - a wavy one for non-speedtree assets and the native Speedtree wind - .st9 format not supported
  • RVT Blending - make the perfect transition between the terrain and the foliage

Course content

1 section11 lectures2h 31m total length
  • Explanations & Resources10:00

    Learn to build two vegetation shaders in Unreal, one for bark and foliage and one for ground vegetation, with SP3 compatible wind and billboard support for Megascans workflows.

  • Base Color Attribute28:47

    Create a reusable base color control workflow by building a material function for albedo controls that desaturates, tints, and adjusts saturation, brightness, and contrast, exposed via a material instance.

  • Opacity Mask3:37

    Isolate the alpha channel from the albedo using a component mask, connect it to the opacity mask, and switch the master material to masked with two-sided rendering for vegetation.

  • Normal Intensity6:15

    Learn to build a vegetation normal intensity function in Unreal shader, isolating red and green channels to adjust normal maps with a scalar parameter.

  • Fresnel Specular9:51

    Implement a fresnel specular in unreal vegetation shading by deriving specular from the albedo red channel and packing specular, roughness, and normal into an rgba texture.

  • Roughness Attribute5:42

    Set a default roughness value (0.5) for vegetation to achieve shine without a roughness texture, using a blue-channel approach and a multiplier to control shininess.

  • Emissive Parameter2:20

    Multiply the albedo final by the emissive intensity to drive the vegetation's emissive parameter, tweak color with the set attribute, and preview shiny areas, preparing for the subsurface stage.

  • Subsurface Scattering17:45

    Explore subsurface scattering for vegetation in Unreal, choosing between a texture or base color, control intensity, and configure a customizable subsurface color with tint, saturation, brightness, and contrast.

  • Bark Logic28:45

    Explore bark logic in Unreal shader creation, implementing uniform and non-uniform tiling from texture coordinates, with controls for roughness and ambient occlusion via grayscale textures.

  • Billboard (Speedtree files only)9:50

    Create a billboard shader function for speedtree vegetation that selects normals, opacity mask, and custom UVs via a static switch parameter, then organize and integrate into foliage.

  • RVT Blending (perfect transition with the terrain)28:15

    Master RVT blending to achieve perfect terrain transitions for vegetation in Unreal Engine by building a runtime texture workflow, gradient controls, and a configurable master material function.

Requirements

  • Owning a computer with Windows 10 (64Bits) / Not tested on Windows 11 or Mac
  • Winrar or 7zip to decompress files
  • Unreal Engine 5 Basics (Camera movements, create Materials, Import assets...)

Description

During this course I will show you, step by step, how to create a vegetation shader from scratch.

More than any other model type the most important thing for vegetation is the shader. That's why we will see how to get the most out of every attribute used.


What I will learn?

We will start with the base color and a custom function allowing saturation, brightness, contrast and tint control.

To get the best cut from each model, we will see how to use the opacity mask, also known as "Alpha".

Because it's the one that brings out all the details, we will add the normal map and a parameter to control its intensity.

As important as the normal one, the Specular is the one that will bounce the light on your models. We will see how to combine it with fresnel to concentrate the bounce in the light direction.

It also controls roughness, which determines whether your model is dry or very wet.

For dark environments, a parameter to control the emissive is always useful.

Beyond all the other attributes, subsurface is what will make your vegetation more realistic by allowing light to pass through your models. We will see how to implement it, with the ability to control its color and intensity independently.

Once the foliage options are in place, we will see how to add the required trunk features, which will automatically deactivate unnecessary options on this model type, such as subsurface.

For Speedtree only, we will see how to get the best out of billboards by implementing a custom function that can be activated with a simple checkbox.

Because not everyone uses Speedtree, we will see how to create an advanced wind for non-Speedtree assets. Of course, Speedtree wind will also be implemented, but only for .st format.

And finally, because it's an option that can change everything, we will see how to make the perfect transition between the terrain and the foliage thanks to Runtime Virtual Texture and a Blending function.


Important note :

This course was created in version 5.2 and it is STRONGLY RECOMMENDED to use THE SAME version! If you choose to use another version, be aware that you may encounter possible errors not covered in this course.


About copyrights:

All you can find in this course are for personal usage only. You cannot share it, sell it or make it available for free on any platform.

Who this course is for:

  • Anyone who wants to learn, improve or fix their skills in environment creation