Announcement

Collapse
No announcement yet.

Another problem following tutorial Variable Get vs Set (character color change)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Another problem following tutorial Variable Get vs Set (character color change)

    Hi I'm following this tutorial:
    https://wiki.unrealengine.com/Videos...eo=NM1ET4uQOnc

    I have this setup:
    Click image for larger version

Name:	JXOHB.jpg
Views:	1
Size:	241.4 KB
ID:	1149292

    After compile the character loses its material:
    Click image for larger version

Name:	NWplD.jpg
Views:	1
Size:	31.9 KB
ID:	1149293

    Workaround found in youtube comments.
    Use create dynamic material instance (mesh)
    Click image for larger version

Name:	mnOeS.jpg
Views:	1
Size:	105.7 KB
ID:	1149294

    Don't forget to drag drop material on the character so the blueprint can find the material object.
    After you made the drag and drop material you need to compile the construction script again.
    Click image for larger version

Name:	rArvo.jpg
Views:	1
Size:	46.4 KB
ID:	1149295


    Cheers

    #2
    I didnt saw the tutorial im using an capped 3g connection so i not soure what you trying to achieve. also the tutorial might be outdated Ue4 is evolving very Fast

    Im not sure but construction script may override all the things you make in it,
    So you probably getting the guy color white/grey cause you are geting and setting the material before it being set like in the defaults tab.

    If you only want to change the material you can do it without that in the normal blueprint logic using just set when your condition is fullfilled referencing to the material.

    but if you want to instance few materials to have them "preloaded" in the construction script you should create an array of materials adding each material to the array with
    different index an then you can call and set them easly them easly.
    English/Spanish/Polish Speaker May i help?

    Comment


      #3
      Originally posted by terror grunt View Post
      Im not sure but construction script may override all the things you make in it,
      So you probably getting the guy color white/grey cause you are geting and setting the material before it being set like in the defaults tab.
      I don't know. All the change I did was swap out the "create dynamic material instance" to "create dynamic material instance (mesh)" so the first could have some issues? Don't know.
      Note I'm very new to this so I don't know much other than what I know in the basic tutorials.

      Comment


        #4
        Iv been messing around with this for a moment and apparenty theres a probles changing materials on dynamic meshes or at least the default 3rd person mesh.

        I did it on a stacionary mesh in the level blueprint and in and in a actor blueprint with a simple static mesh inside works with no problem

        This is what i did and it works partially. First create 3 simple materials Blue;Red;Green and then instance each one in the character bp and set it to a variable


        Then i just want to change them with a key


        And its apparently works but the red material fail to load.( the green one also been faling to load before but iv been changing the order of the colors and in some point it started to load)
        So when i want to change to the 3rd its start to look exacty like when the engine load an material i never used in currently loaded level.

        PD: Im using 4.7.3 so its maybe already fixed you can try what i did if you have newer version.
        English/Spanish/Polish Speaker May i help?

        Comment


          #5
          I realized that you need at least put the material once manually on the mesh to compile the shaders. then works propertly.
          English/Spanish/Polish Speaker May i help?

          Comment

          Working...
          X