Announcement

Collapse
No announcement yet.

Change box material

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

    Change box material

    I have 100 boxes ( mesh) are divided into 3 types - magic , magic1 , magic2 . How to do that from a csv file , or blueprint structure changed colo (marterial) boxes , depending on the position in the data table ?

    Ps. Sorry for my english..

    #2
    google for "dynamic material instance tutorial unreal" this will give you more links

    https://docs.unrealengine.com/latest...ces/index.html

    https://www.youtube.com/watch?v=srUSDU1u0og

    Then you make one array that holds material instances, and apply them to cubes.
    Also if you ever want to change those materials on cubes (like its color parameter or something) you must store references to created materials.

    Best way for it all is if you created blueprint "BP_Cube". Then in that blueprint you make function that sets it material, for eg. "Set_Material_To".
    You give instanced material reference. Then cube blueprint creates dynamic instanced material out of it, and remembers reference to it locally (inside cube blueprint).
    Now you create another function like "change_material_parameter". When you call it cube will change dynamic instance material parameters.
    Bit complicated, so better watch those tutorials first.

    You also can use "material parameter colelctions" (google it) for changing some values of all materials you created. This goes very well with instanced and dynamic materials. You use above (blueprint way) method to change individual materials, then you use collections to change some values for them all (for eg you want them all to be darker or lighter without calling each blueprint and telling it to change material).

    Comment

    Working...
    X