Back to Browse

Make Per Instance Gradients - Unreal Engine 5 Tutorial

869 views
Premiered Jul 28, 2024
4:43

In this video, I show how to create a 0-1 gradient based on an object’s bounding box inside a material using custom HLSL in Unreal Engine 5. The system uses PrimitiveShaderParameters, works per instance, and gives you full control over directional gradients at the material level. This approach is great for creating masks for foliage, trees, procedural blending, WPO effects, or any setup where you need instance-aware control over mesh space gradients. 👍 Like & subscribe for more UE5 niagara and shader tips! 💬 Let me know how you'd apply this in your project! Links & Commands: https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/FPrimitiveUniformShaderParameter-?application_version=5.1 GetPrimitiveData(Parameters).InstanceLocalBoundsCenter.xyz GetPrimitiveData(Parameters).InstanceLocalBoundsExtent.xyz 0:00 - start 0:10 - the problem 0:32 - unreal documentation 1:03 - custom hlsl, get instace values 2:28 - calculating gradient 3:30 - working shader and wpo issue 4:10 - fixing wpo issue 4:30 - end of video #unrealengine #gamedev #unrealengine5 #tutorial

Download

0 formats

No download links available.

Make Per Instance Gradients - Unreal Engine 5 Tutorial | NatokHD