UE5 Blueprint Tutorial - How to Create Dynamic Material Instances

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2024

ความคิดเห็น • 58

  • @azrad
    @azrad 10 หลายเดือนก่อน +7

    As a person who also like hotkeys, you can press S, V instead of 1 or 3 and later converting to parameters. :)

    • @UnrealDevHub
      @UnrealDevHub  10 หลายเดือนก่อน +3

      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:
      th-cam.com/video/7S8FdUPpxUw/w-d-xo.html&ab_channel=UnrealDevHub

    • @TheArtistEllie
      @TheArtistEllie 6 หลายเดือนก่อน

      And F click for foreach node - that's a good one.

    • @snook-official
      @snook-official 4 หลายเดือนก่อน

      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!

  • @seanoskea7411
    @seanoskea7411 ปีที่แล้ว +9

    From one underviewed content creator to another, good job. Just what I try to do, no nonsense, short, clear, useful.

    • @UnrealDevHub
      @UnrealDevHub  ปีที่แล้ว +2

      Thank you, much appreciated! I started my journey in Unreal back in 2016 through resources on TH-cam, so just trying to return the favor now that I've been working in the gaming industry for a while.

    • @seanoskea7411
      @seanoskea7411 ปีที่แล้ว +1

      @@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.

  • @motionforgecg
    @motionforgecg 2 หลายเดือนก่อน +1

    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!

  • @designersoup
    @designersoup 3 หลายเดือนก่อน +1

    Great tutorial, thanks so much. Another job ticked off my massive to do list and a big step towards optimising my game

  • @snazzysnek
    @snazzysnek 3 หลายเดือนก่อน +1

    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  3 หลายเดือนก่อน

      Glad I could help!

  • @Doubleaa500
    @Doubleaa500 หลายเดือนก่อน +1

    How will I be able to do multiple indexes so I can just switch through each index on the fly with a button press?

  • @RictorScale
    @RictorScale 3 หลายเดือนก่อน +1

    thanks bro, found this node randomly and looked interesting. Perfect video

  • @95Genesis95
    @95Genesis95 หลายเดือนก่อน +1

    Hello, could you help me?
    I’ve created a color wheel widget that allows me to change the color of an actor in-game. I want to combine this with spawning actors, so I followed your video and applied it to the color wheel system. It works, but the problem is that after spawning the first object with the selected color, the following objects retain the same color as the first one, regardless of the new color I select. I think the issue is related to the spawning blueprint.
    Here’s what I’m doing in the EditObject Widget blueprint:
    On clicked → Get all widgets of class (Widget Class = ColorWheel)
    Get → NewColorWheel (variable located in ColorWheel)
    Set ColorInTextBox (variable in the current widget)
    SpawnActor (I’ve connected ColorInTextBox to ColorValue)
    This allows me to change the color of the first spawned object, but when I try to spawn another, the new one keeps the color of the first object.

  • @alisonyellen6100
    @alisonyellen6100 ปีที่แล้ว +3

    Super helpful! Thank you.

    • @UnrealDevHub
      @UnrealDevHub  ปีที่แล้ว +1

      Glad you enjoyed the tutorial.

  • @graemepalmer2306
    @graemepalmer2306 ปีที่แล้ว +2

    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!

  • @goldenorbstudios
    @goldenorbstudios 4 หลายเดือนก่อน +2

    Awesome this saved me so much time!

    • @UnrealDevHub
      @UnrealDevHub  3 หลายเดือนก่อน +1

      Happy to hear that!

  • @sammyrothman7664
    @sammyrothman7664 10 หลายเดือนก่อน +1

    This was a great tutorial. Thanks for the help!

  • @Dhieen
    @Dhieen 7 หลายเดือนก่อน +3

    Nice, how do you see the result outside of the play mode? in the editor

    • @snook-official
      @snook-official 4 หลายเดือนก่อน

      Damn, that's what I'd like to know but no reply from youtuber.

    • @codeslacker77
      @codeslacker77 18 วันที่ผ่านมา

      Place the node in Construction Script instead and you can modify the values live in editor mode.

  • @EleventhEwe67
    @EleventhEwe67 11 หลายเดือนก่อน +1

    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  11 หลายเดือนก่อน

      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.
      th-cam.com/video/wUfGPIB01yU/w-d-xo.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 11 หลายเดือนก่อน

      @@UnrealDevHub that's awesome! I'll check it out, thanks!

    • @EleventhEwe67
      @EleventhEwe67 11 หลายเดือนก่อน

      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  11 หลายเดือนก่อน +1

      @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 11 หลายเดือนก่อน +1

      @@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!

  • @ChristopherFranko
    @ChristopherFranko 9 หลายเดือนก่อน +1

    cool video, you can use nvidia broadcast to eliminate all the sticky mouth sounds when recording.

    • @ChristopherFranko
      @ChristopherFranko 9 หลายเดือนก่อน

      also there is alot of vocal fry

    • @UnrealDevHub
      @UnrealDevHub  9 หลายเดือนก่อน

      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 9 หลายเดือนก่อน

      my brother :)@@UnrealDevHub

  • @them3ta_93
    @them3ta_93 8 หลายเดือนก่อน +1

    you saved me, thanks

    • @UnrealDevHub
      @UnrealDevHub  8 หลายเดือนก่อน +1

      Happy the video was helpful.

  • @KaVQ666
    @KaVQ666 8 หลายเดือนก่อน +2

    Thanks a lot!!

    • @UnrealDevHub
      @UnrealDevHub  8 หลายเดือนก่อน +1

      You're welcome!

  • @suke0408
    @suke0408 5 หลายเดือนก่อน +1

    Great tutorial:)
    Is this only for game mode? I want to edit and see each parameter in Editor mode.

    • @UnrealDevHub
      @UnrealDevHub  5 หลายเดือนก่อน +1

      You can just move this logic to the construction script and you’d see this change in viewport without hitting play!

    • @suke0408
      @suke0408 5 หลายเดือนก่อน

      @@UnrealDevHub
      ahh, I see
      Thank you, I’ll try that!

  • @spec7a
    @spec7a 6 หลายเดือนก่อน +1

    What do you do at 2:38 to enable Event BeginPlay?
    It's disabled for me too and I don't know why.😢😅

    • @spec7a
      @spec7a 6 หลายเดือนก่อน

      I solved it.
      I just had to connect the event to something.😅
      I still wonder what you did.

  • @nigusumekonnen9478
    @nigusumekonnen9478 11 หลายเดือนก่อน +1

    is it possible to control one of the parameters with a skeletal mesh bone? if there is a solution, please guide me .

  • @zeon3d755
    @zeon3d755 5 หลายเดือนก่อน +1

    Can you show how to use CanvasRenderTarget2D to write on them?

    • @UnrealDevHub
      @UnrealDevHub  5 หลายเดือนก่อน

      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 5 หลายเดือนก่อน

      @@UnrealDevHub no to place dynamic text

  • @Name88282
    @Name88282 7 หลายเดือนก่อน +2

    how do i make it viewable in the editor

    • @chrisalex82
      @chrisalex82 หลายเดือนก่อน +1

      the variables ? just click on the little eye next to the variable name

  • @asim.6877
    @asim.6877 4 หลายเดือนก่อน +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  4 หลายเดือนก่อน +1

      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 4 หลายเดือนก่อน +1

    why is it so hard to get this to work with a decal

    • @UnrealDevHub
      @UnrealDevHub  4 หลายเดือนก่อน

      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 4 หลายเดือนก่อน +1

      @@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

  • @SlashTheFlash
    @SlashTheFlash 10 หลายเดือนก่อน +1

    Thanks alot!!!!

    • @UnrealDevHub
      @UnrealDevHub  10 หลายเดือนก่อน +1

      Glad you liked the video!

  • @rifat.ahammed
    @rifat.ahammed 11 หลายเดือนก่อน +1

    Thanks

    • @UnrealDevHub
      @UnrealDevHub  11 หลายเดือนก่อน

      Thanks for watching!