Тёмный

UE5 Blueprint Tutorial - How to Create Dynamic Material Instances 

Unreal Dev Hub
Подписаться 1,7 тыс.
Просмотров 21 тыс.
50% 1

Create Dynamic Material Instances in Blueprint! This video explains how to use Blueprint to change material qualities of Materials during runtime.
______________________________________________________________________________________________
Want to support my channel and help me continue to create educational content for the gaming community?!
Join my Patreon! --- / unrealdevhub
______________________________________________________________________________________________
You can learn how to build games in UE5!!! Subscribe to Unreal Dev Hub for more UE5 Tutorials!
As always, leave a comment and let me know if you found this video helpful, and what you want to learn about next!

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 55   
@seanoskea7411
@seanoskea7411 Год назад
From one underviewed content creator to another, good job. Just what I try to do, no nonsense, short, clear, useful.
@UnrealDevHub
@UnrealDevHub Год назад
Thank you, much appreciated! I started my journey in Unreal back in 2016 through resources on RU-vid, so just trying to return the favor now that I've been working in the gaming industry for a while.
@seanoskea7411
@seanoskea7411 Год назад
@@UnrealDevHub Yeah, I make mine as supplements for my students and I'm not monetized. I don't expect to be the next Faucher or WINBUSH but when you spend all day making a 10 min video as good as you can get it, it would be nice to crack triple digits after a few months. Oh well.
@azrad
@azrad 9 месяцев назад
As a person who also like hotkeys, you can press S, V instead of 1 or 3 and later converting to parameters. :)
@UnrealDevHub
@UnrealDevHub 9 месяцев назад
Great call! I made an updated video (with some additional/different functionality) where I mention the hotkeys. Great callout - the 1 and 3 keys are my favorite hotkeys in the material editor, and B for Branch has to be my most used in the Blueprint Graph. A newer video I've posted tapping into some other functionality related to Dynamic Material Instances: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7S8FdUPpxUw.html&ab_channel=UnrealDevHub
@TheArtistEllie
@TheArtistEllie 4 месяца назад
And F click for foreach node - that's a good one.
@snookofficial7211
@snookofficial7211 3 месяца назад
Another one that I don't see people using, is if you right click on the metalic or roughness pins, and select 'promote to a parameter' it will set up a named scaler parameter for you already wired in. This also works on most input pins, though sometimes it'll give you a vector 3 parameter when all you want is a scalar but it still saves time though!
@snazzysnek
@snazzysnek 2 месяца назад
I owe my uni assignment for Tech art to you good sir, Without it I wouldn't have known how to run each of my material instances in a for loop for applying rain to my character (it only worked one instance at a time) You, are incredible! cheers!
@UnrealDevHub
@UnrealDevHub 2 месяца назад
Glad I could help!
@RictorScale
@RictorScale 2 месяца назад
thanks bro, found this node randomly and looked interesting. Perfect video
@designersoup
@designersoup 2 месяца назад
Great tutorial, thanks so much. Another job ticked off my massive to do list and a big step towards optimising my game
@goldenorbstudios
@goldenorbstudios 2 месяца назад
Awesome this saved me so much time!
@UnrealDevHub
@UnrealDevHub 2 месяца назад
Happy to hear that!
@graemepalmer2306
@graemepalmer2306 Год назад
Exactly what I needed, thanks!
@UnrealDevHub
@UnrealDevHub Год назад
Happy to hear that. If there are any other subjects or examples you’re interested in learning more about, let me know!
@motionforgecg
@motionforgecg 25 дней назад
Thanks, this was really useful - I couldnt get an array working - but this covered it! :) One thing, I don't if it was the model I was using, but the dynamic materials were a bit buggy. I had about 5 mats on a mesh, and only one was working at first, but then I swapped each one out with the first material (that was working) and then I put back the initial material and it worked. Seems like it may have been a caching issue - and by replacing the material it forced a refresh - although a bit of a guess!
@sammyrothman7664
@sammyrothman7664 8 месяцев назад
This was a great tutorial. Thanks for the help!
@alisonyellen6100
@alisonyellen6100 Год назад
Super helpful! Thank you.
@UnrealDevHub
@UnrealDevHub Год назад
Glad you enjoyed the tutorial.
@suke0408
@suke0408 4 месяца назад
Great tutorial:) Is this only for game mode? I want to edit and see each parameter in Editor mode.
@UnrealDevHub
@UnrealDevHub 4 месяца назад
You can just move this logic to the construction script and you’d see this change in viewport without hitting play!
@suke0408
@suke0408 4 месяца назад
@@UnrealDevHub ahh, I see Thank you, I’ll try that!
@KaVQ666
@KaVQ666 7 месяцев назад
Thanks a lot!!
@UnrealDevHub
@UnrealDevHub 7 месяцев назад
You're welcome!
@Dhieen
@Dhieen 6 месяцев назад
Nice, how do you see the result outside of the play mode? in the editor
@snookofficial7211
@snookofficial7211 3 месяца назад
Damn, that's what I'd like to know but no reply from youtuber.
@EleventhEwe67
@EleventhEwe67 9 месяцев назад
Hello, great video. How can you change a material of an object and save it for the next map? Once I change levels the object's material is reseted to the default one.
@UnrealDevHub
@UnrealDevHub 9 месяцев назад
So what you want is a Material Instance. This will use all of the Parameters you've created in the material in a way that you can permanently set the values of materials that use all of the same logic as your parent material. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wUfGPIB01yU.html&ab_channel=UnrealDevHub In this ^ video I cover this process of creating a Material Instance at 4:25. You just right click your material, select the first option (Create Material Instance) and then in that material instance you can adjust the material parameters in a way that is permanent. Then apply that material to your mesh.
@EleventhEwe67
@EleventhEwe67 9 месяцев назад
@@UnrealDevHub that's awesome! I'll check it out, thanks!
@EleventhEwe67
@EleventhEwe67 9 месяцев назад
So the thing is, I'm making a ball game. I already have a save and load system and I have a store in which the player can buy and change the ball skin. I don't know what I'm doing wrong, but I've tried to save the new material for the next map and load it, but it still shows the default one. In the debugs it shows that its using the new material, but the new material isn't loaded into the next phase/map. Do you know how can I do this?@@UnrealDevHub
@UnrealDevHub
@UnrealDevHub 9 месяцев назад
@EleventhEwe67 Hmmm. So it sounds like you're saying you have the material stored somewhere after you've purchased it in the in-game UI. - Do you have your actor SetMaterial with your new purchased material (skin) on BeginPlay? It might be saved somewhere, such as in a variable MyPurchasedMaterial, but even after you've saved it, you'd want to set MyPurchasedMaterial to MyBall (ball mesh component) on BeginPlay when you spawn the MyBall actor. When you spawn the actor in each new level, it is creating a new version of the Actor (pawn) with its default values. When you spawn your actor, make sure that you set the new material - totally speculation, but from what your describing, that could be a solve.
@EleventhEwe67
@EleventhEwe67 9 месяцев назад
@@UnrealDevHub You nailed it! I was able to save the material and load it, I just redid the code in the beginplay of each phase and it worked. Thanks!
@them3ta_93
@them3ta_93 6 месяцев назад
you saved me, thanks
@UnrealDevHub
@UnrealDevHub 6 месяцев назад
Happy the video was helpful.
@zeon3d755
@zeon3d755 4 месяца назад
Can you show how to use CanvasRenderTarget2D to write on them?
@UnrealDevHub
@UnrealDevHub 4 месяца назад
When you say "write on them" do you mean how to use the mouse to draw on a texture that would be displayed in the world? @zeon3d755
@zeon3d755
@zeon3d755 4 месяца назад
@@UnrealDevHub no to place dynamic text
@SlashTheFlash
@SlashTheFlash 8 месяцев назад
Thanks alot!!!!
@UnrealDevHub
@UnrealDevHub 8 месяцев назад
Glad you liked the video!
@ChristopherFranko
@ChristopherFranko 8 месяцев назад
cool video, you can use nvidia broadcast to eliminate all the sticky mouth sounds when recording.
@ChristopherFranko
@ChristopherFranko 8 месяцев назад
also there is alot of vocal fry
@UnrealDevHub
@UnrealDevHub 8 месяцев назад
Ironically this is the first tutorial I ever made - I got a new mic shortly after and that’s not an issue with all of my recent videos 😂
@ChristopherFranko
@ChristopherFranko 8 месяцев назад
my brother :)@@UnrealDevHub
@Name88282
@Name88282 6 месяцев назад
how do i make it viewable in the editor
@chrisalex82
@chrisalex82 11 дней назад
the variables ? just click on the little eye next to the variable name
@nigusumekonnen9478
@nigusumekonnen9478 9 месяцев назад
is it possible to control one of the parameters with a skeletal mesh bone? if there is a solution, please guide me .
@pbm000
@pbm000 5 месяцев назад
What do you do at 2:38 to enable Event BeginPlay? It's disabled for me too and I don't know why.😢😅
@pbm000
@pbm000 5 месяцев назад
I solved it. I just had to connect the event to something.😅 I still wonder what you did.
@rifat.ahammed
@rifat.ahammed 9 месяцев назад
Thanks
@UnrealDevHub
@UnrealDevHub 9 месяцев назад
Thanks for watching!
@asim.6877
@asim.6877 3 месяца назад
I appreciate the tutorial but sprinting through blueprints without explaining the steps make it impossible to follow. This is not a beginners tutorial at all.
@UnrealDevHub
@UnrealDevHub 3 месяца назад
I haven’t actually gotten that feedback on this particular video before. Take a look at my “beginner series” on my channel - it might be a little more “wordy” and easier to follow along if you’re new to UE5!
@robotjellyfish3209
@robotjellyfish3209 3 месяца назад
why is it so hard to get this to work with a decal
@UnrealDevHub
@UnrealDevHub 3 месяца назад
In theory it should be the same - make sure that your material parameters are named correctly in your construction / BeginPlay script. Also make sure that you've made them Material Parameters by right clicking and selecting the option in the material graph. It should behave identically for all types of materials - opaque, translucent, masked, decal, etc!
@robotjellyfish3209
@robotjellyfish3209 3 месяца назад
@@UnrealDevHub thanks for replying, appreciate it. i will take a closer look. i did this once but i found its so finiky to get working.cheers
Далее
Unreal Engine Materials in 6 Levels of Complexity
44:12
Animating Materials in Unreal Engine 5
10:47
Просмотров 47 тыс.
Material Changer Sphere Blueprint | Unreal Engine [4K]
14:36
The Switch Node | 5-Minute Materials [UE5]
13:00
Просмотров 16 тыс.
Need to Know Nodes in Unreal 5 Blueprints
48:59
Просмотров 84 тыс.