UE4 Tutorial 101 - Control Materials in Blueprints

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ค. 2024
  • ► Read here for downloads and topics timings.
    Download the LightBulb model: files.rvillani.com/unreal/LightBulb.zip
    Topics:
    00:00 - Intro
    00:51 - Creating the bulb glass material
    04:50 - Testing material parameters for lit bulb
    05:21 - How to have more than one material on same mesh
    07:33 - Making the screw material
    10:31 - Creating the lightbulb blueprint
    12:59 - Adding sphere collision to the light
    13:53 - Recognizing when the player gets near the light
    15:55 - Modifying material parameters in Blueprint
    22:43 - Turning the light off when player gets far from it
    24:14 - Controlling several instances of the same material
    31:22 - Using M to randomly change materials parameters
    34:34 - The End
    rvillani.com
    Music:
    Unfoldment, Revealment, Evolution, Exposition, Integration by Chris Zabriskie is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
    Source: chriszabriskie.com/reappear/
    Artist: chriszabriskie.com/
  • แนวปฏิบัติและการใช้ชีวิต

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

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

    Finally found the simple answer I needed. Thank you!

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

    This video did not have what I was looking for but I learned from it and it was an absolutely excellent tutorial. Top notch keep it up man

    • @RVillani
      @RVillani  2 ปีที่แล้ว

      Thank you!
      What were you looking for?

    • @KaiMFS
      @KaiMFS 2 ปีที่แล้ว

      @@RVillani First comment I thought was for a different video. I'm looking to tile an instance mesh in a different color with each iteration, switching between three colors. I have my tiles set, a friend helped me figure out how to apply a material to it, now I'm working on the mechanism to get it to switch between the three colors.

    • @RVillani
      @RVillani  2 ปีที่แล้ว

      I remember there was a node for it in the materials. Something like a unique instanced mesh number that's different for each of them. But it's uncontrollable, it's random.
      Have you looked into primitive parameters? Maybe you can set it per mesh? Though I tried that recently and couldn't for some reason. Then I ended up using Niagara, with each particle being my mesh and having an array parameter that controls the color for each of them.

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

      @@RVillani That's kind of where I'm at right now.. so its a hexagon grid and I have 2 for loops going, Y(col) then X(row). After the X loop I apply the material to the instance. I'm currently turning the X variable into an array and trying to run that array through a loop that counts three digits. I'm trying to get each of those 3 digits to correspond to each of the different material instances I want to use but it doesn't seem to be working the way I want. I'm still new to Unreal 4 n Blueprint so I'm sure it's some fundamental lack of knowledge about the tools and what's available. Thanks for the tip I'll check out the unique instanced mesh function.

  • @pingupongu843
    @pingupongu843 4 ปีที่แล้ว

    awesome video! thank you so much!

  • @megtwin
    @megtwin 2 ปีที่แล้ว

    Thanks so much for making this, it helped in changing my facial expressions on my character! :)

    • @RVillani
      @RVillani  2 ปีที่แล้ว

      Cool! Like changing a texture?

    • @megtwin
      @megtwin 2 ปีที่แล้ว

      @@RVillani Yes my texture consists of several eye positions and I choose the right row and column through scalar parameters. Here's a short video: th-cam.com/video/rMNv6WXb3rk/w-d-xo.html

  • @vjnaoconsta7036
    @vjnaoconsta7036 3 ปีที่แล้ว

    Precisei parar o vídeo no meio para elogiar o teu trabalho. Muito bem explicado e cheio de dicas super relevantes

    • @RVillani
      @RVillani  3 ปีที่แล้ว

      Poxa, muito obrigado mesmo! ^^

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

    Excellent! Well explained. The Blade Runner synths are nice but kinda distracting. You probably know that by now though haha

  • @ricardogoncalves7043
    @ricardogoncalves7043 2 ปีที่แล้ว

    Você é bom ein maninho!!! Valeu !!!

  • @Bob3D2000
    @Bob3D2000 6 ปีที่แล้ว

    Nice tutorial. I like the way you explain things.

    • @RVillani
      @RVillani  6 ปีที่แล้ว

      Thanks, Bob!

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

    Interessante, gostei

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

    Great job! Explained very well and at good speed.

  • @bellVFX
    @bellVFX 7 ปีที่แล้ว

    Esse Rodrigo é muito foda!

  • @jozinzbazin7991
    @jozinzbazin7991 3 ปีที่แล้ว

    good tut, but unfortunately cannot set this for materials in cascade particles inside of blueprint, maybe by any chahce do u know how to solve this?

  • @jasontripesnom1974
    @jasontripesnom1974 4 ปีที่แล้ว

    Great tutorial. Noob question - how can you add switch on/off for the bulb? Thanks

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

      Thanks!
      Maaaan, that's a long story. I can think of many ways to do the switch, but each has its pros and cons. I strongly suggest you go through the Blueprint introduction tutorials in Unreal's channel. IIRC there's a video that makes a switching bulb.
      In any case, to build on top of what's already in the video, you could use a boolean to register when you're close/far to the bulb and every time the user pressed some key you'd check if you're close to it and, if yes, switch it on/off. But in this video case, the input would have to be set on the bulb itself, which is bad design. Inputs should be on the character, but then there are other implications. That's why I _really_ suggest you search for tutorials on the matter.

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

      @@RVillani Thanks for the reply man, i really appreciate it & thanks for the tip. God Bless

  • @funzies2577
    @funzies2577 7 ปีที่แล้ว

    but how do you make it slowly transition to the value instead of it being instant?

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

      Using math, a timeline node, sequencer, lerp... there are many ways, but mostly you'll do it in blueprint.

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

    nice and well done tutorial, thx really help a lot

  • @ZorgyTV
    @ZorgyTV 4 ปีที่แล้ว

    Thank you for tutorial. How can i change common material parameter with blueprint? I mean that blueprint without adding static mesh - just material parameter from material instance. I want to switch on the light in material (increase the parameter) depend from sun position (or other scalar parameter from other blueprint)

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

      If you want to change a material parameter, it is affecting a mesh or something. You get a reference to that, call Create Material Instance Dynamic on it and change your parameters.
      If you want a single change to affect several materials on several objects, then it's easier if you make that parameter through a Material Parameter Collection. Those are super easy to change on Blueprints and they affect materials globally. docs.unrealengine.com/en-US/Engine/Rendering/Materials/ParameterCollections/index.html

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

      You can also create a Material Instance Dynamic from a material directly. There's a node for it, but it doesn't apply the new dynamic material to anything. It's just created on memory. Then you need to set it to a mesh(es). So if you want to affect a mesh specifically, you need a reference to it.

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

      ​@@RVillani Thank you very much! I didn't know about the "collection of material parameters", I will find out for sure!

  • @alexry6025
    @alexry6025 ปีที่แล้ว

    19:06 is my favorite part, that's how I tackle life😂

    • @RVillani
      @RVillani  ปีที่แล้ว

      Hahaha ain't that how it should be? 😄

  • @azzamacoffi3676
    @azzamacoffi3676 4 ปีที่แล้ว

    Very good tutorial, thx man !

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

    Thank you, this helped a lot.

    • @RVillani
      @RVillani  6 ปีที่แล้ว

      You're welcome :D

  • @gauravkulshrestha1370
    @gauravkulshrestha1370 4 ปีที่แล้ว

    texture switch random per instance any help

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

    Hey Rodrigo! thank you so much for this tutorial, i was searching for a method to animate the transparency of a material that i want to fade away at ccertain time in my sequencer. Im making a motion graphics video. But i can't find a solution for what i want to do. Could you explain to me how i can do this? I'm very new to blueprints.

    • @RVillani
      @RVillani  6 ปีที่แล้ว

      In sequencer I know you can animate material properties in Widgets. I didn't test it with meshes, though. In widgets you add a track for the image that contains your material and, when adding tracks for the image, you have the material properties to select and control there.

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

      Thank you so much Rodrigo! I already solved my problem with a blenden material and animate an attribute from my blueprint. =)

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

    cool

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

    Love the background music... What is it? Great tutorial too!

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

      Thanks!
      The music is Unfoldment, Revealment, Evolution, Exposition, Integration by Chris Zabriskie
      It's in the description

    • @MichaelGaskin
      @MichaelGaskin 6 ปีที่แล้ว

      Ack! Sorry I missed that... Right in front of me!

    • @porosus2469
      @porosus2469 3 ปีที่แล้ว

      @@RVillani Sounds exactly like BladeRuner music

  • @poojapanesar8840
    @poojapanesar8840 3 ปีที่แล้ว

    how to animate uv coordinator of material on spline overlap like" train on time " game

    • @RVillani
      @RVillani  3 ปีที่แล้ว

      I don't know if understand it. Do you have any visual examples?

    • @poojapanesar8840
      @poojapanesar8840 3 ปีที่แล้ว

      @@RVillani. i want to change the color of spline like this. how to animate uv coordinator of material on component overlap th-cam.com/video/hea6g1Gy2PI/w-d-xo.html

  • @marcelocosta7893
    @marcelocosta7893 5 ปีที่แล้ว

    boa video aula, só nao entendi o porque do titulo em portugues e audio em ingles

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

    thanks. sorry but bmusic is too loud

  • @mhnoni
    @mhnoni 7 ปีที่แล้ว +4

    too much information in one tutorial , thanks a lot mate . i still didn't get why the bulb light fade away slowly ? @ min 24:00

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

      Is too much information a good thing? :)
      About the bulb, neither do I! hahahaha I think it simulates the retina, when something too bright burns it for some time. Or maybe it's the screen space reflection being updated more slowly.. I don't know, but I liked it! :D

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

      Yes too much information is a good thing :) , and i liked the effect too :)

  • @Winnders
    @Winnders ปีที่แล้ว

    I love your accent

    • @RVillani
      @RVillani  ปีที่แล้ว

      Haha thanks!

  • @handsomezone6290
    @handsomezone6290 6 ปีที่แล้ว

    15:55 "And now for the part you've all been waiting for" fucking just start there then. At least there's a table of contents in the description

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

      Fucking look at the video duration before watching it if you want those "do this and that" kind of tutorials. This is more of a "you do this BECAUSE of that" tutorial, so you don't just learn to push buttons, but understand why you are doing it. Or at least read the description if you are in a hurry, moron.

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

      It's fine if you want have 30 minute introduction into blueprint scripting, just don't name your video after one small section that takes 16 minutes to get to. Chances are, if im googling "How to control material properties in blueprint" I already know how to create materials and how to activate the script im trying to use. I didnt search "How to make materials in unreal" and the video is not called "Introduction to materials and blueprints". The title of your video is an indication as to the topic you are talking about. And you can say "I called it UE4 101" but the subtitle still lends itself to this being a chapter in a 101 video series, as is popular to do on youtube. I read the description and got what I needed out of this tutorial, but the title was misleading and it took longer that it should have to get the same information

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

      But that's exactly why I leave the timings in the description. You can skip right to where you're interested. After all, from the video duration it's kinda clear that it's not only about creating a few nodes.

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

    Rodrigo, como eu faço pra chamar um UMG UI por trigger box? Tipo assim, o player se aproxima de algo e nesse está um trigger box. Quando esse box é acionado, aparece uma imagem, um actor ou qualquer coisa assim. E quando ele aparece, meu mouse também é acionado pra aparecer porque eu deverei clicar nesse actor que apareceu pra alterar o material ou acender uma luz etc... E quando eu saio do trigger box o UMG UI desaparece. Bem, é isso que gostaria de aprender .
    Como faço tudo isso ? 🤣🤣🤣🤣
    De qualquer forma, agradeço seus tutoriais. Mais um inscrito aí. Valeu

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

      Quando acionar a trigger box vc chama CreateWidget. Aí usa AddToViewport no widget pra colocar ele na tela. Use o node SetInputModeUIOnly pra controlar a interface e mostrar o mouse.
      Depois de sair da trigger box, chame RemoveFromParent no widget pra remover ele da tela e use SetInputModeGameAndUI pra voltar a controlar o personagem

    • @ricardogoncalves7043
      @ricardogoncalves7043 2 ปีที่แล้ว

      @@RVillani , cara!, simples assim? Muito obrigado mesmo

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

      Eu resumi alguns detalhes que imagino q vc saiba ou vai precisar de tutorial, especialmente a parte de saber quando o trigger foi acionado. Mas esses detalhes são comuns em tutoriais de gameplay com blueprints, caso vc precise :) Nada q seja segredo de estado rsrs

    • @ricardogoncalves7043
      @ricardogoncalves7043 2 ปีที่แล้ว

      @@RVillani , cara!, fantástico a sua disposição pra sanar a minha dúvida. Agradeço mesmo.
      Então, eu trabalho com apresentações 3d de arquitetura. Eu renderizava no Corona Renderer. Comecei a estudar o unreal porque vi o potencial do paranauê. Mas ainda tenho muita dificuldade de entender essa parte de widget.
      Você tem algum curso que você ministra?

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

      @@ricardogoncalves7043 Ainda não, Ricardo. Mas tá nas minhas metas de vida fazer um haha.
      Eu tbm mexia com render anos atrás. Quando conheci o Unity e sombras em tempo real, comecei a abandonar render em favor de coisas real time. Aí, longa história depois, hj eu trabalho com Unreal.

  • @sarimsak
    @sarimsak 6 ปีที่แล้ว +14

    Remove that music!!!

    • @RVillani
      @RVillani  6 ปีที่แล้ว +4

      It's too late for that!!!

    • @RickBlacker
      @RickBlacker 5 ปีที่แล้ว

      Agreed, so distracting. Makes it hard to hear his voice.

    • @RVillani
      @RVillani  4 ปีที่แล้ว

      @@RickBlacker Agreed

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

    your opening music is WAY TO LOUD!

    • @RVillani
      @RVillani  5 ปีที่แล้ว

      TOO

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

      @@RVillani OK, way too loud. Are you gonna fix it?

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

      @@Jake3D No, for several reasons:
      1. Too much work
      2. The intro is only 0.4% of the whole video
      3. My voice level is the same as the song (I know, I edited it)
      4. You can lower the volume
      5. My earphone is really loud at minimum volume and still I can listen to the intro without any problems
      6. You can skip it
      7. It doesn't affect the rest of the video in a practical way.
      8. I am not being paid to spend time fixing it when I could, instead, go back to work on my Matrix VR project.
      Have a nice day!

  • @playexstreme
    @playexstreme 2 ปีที่แล้ว

    So many ads...

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

      Thank you for letting me know!
      The video is old and TH-cam had enabled by default all the ads settings! I've disabled most of them now. There should only be adds before and/or after the video. Not during it.

    • @playexstreme
      @playexstreme 2 ปีที่แล้ว

      @@RVillani Thank you - I wasn't even able to scroll through your video before as it would play an ad each time. Thank you for fixing it and also the reply :)

    • @playexstreme
      @playexstreme 2 ปีที่แล้ว

      @@RVillani Thank you for fixing it :) I couldn't even scrubb through the video to find different parts without the ads being triggered. Great work!

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

      ​@@playexstreme sure, no problem. You had already answered me 2 weeks ago, btw haha

  • @nightwalkerj
    @nightwalkerj 2 ปีที่แล้ว

    God you waste a lot of time before getting to the point.

    • @RVillani
      @RVillani  2 ปีที่แล้ว

      Usually it's because I explain the theory of how things work, so that you can apply it in a different way in your own projects. Unless it wasn't haha