[FREE] Hair Material

[Mini Tutorial] How to setup “LightVector” with Material Parameter Collection “MPC_SunDirection”

  • Create a New Parameter Collection

.unrealengine.com/latest/images/Engine/Rendering/Materials/ParameterCollections/MPC_Create_New_Collection.jpg

  • Rename to MPC_SunDirection

  • Add a new Vector Parameter

  • Change Parameter Name to “LightDirection”

  • Create a New Blueprint Actor, call it “LightVectorControl”

  • Edit the blueprint

  • Go to Construction Script Tab

  • Create two new variables

1- “Refresh” type Boolean and Editable
2- “SunLight” type Directional Light and Editable

.unrealengine.com/latest/images/Engine/Blueprints/UserGuide/Variables/MyBlueprintPane_createVar.jpg

Now drag and drop “Refresh” and “SunLight” variables to center area and GET it

Replicate this screen

Compile and close blueprint

Drag and drop the blueprint to your scene

Select your blueprint

In the “Details” tab set the Sun Light combo to your Sun Light

If you change your Sun rotation remember click on Refresh button of your blueprint to refresh the “LightVector” on your material

And thats all folks!

I hope it helps :slight_smile: