Announcement

Collapse
No announcement yet.

Varying material color on creation.

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

    Varying material color on creation.

    There's static mesh of a flower called "SM_GEN_Foliage5_GroundCover_Flower01" Everytime I place this flower in the level, the color seems to change in random. But it doesn't change to unreasonable colors such as black or green. It only changes to typical flower colors.

    I tried to reverse engineer how this is done but can't seem to figure it out and looking for some help.

    What I intent to achieve in the end is to apply this to crowd system. I have crowd system working with my own skeletal mesh (10 of them) but still too many of them look the same. And instead of creating 30 or 40 skeletal mesh to produce the variety, I wish to vary the color of the materials on spawn to fake variety.

    Any help would be appreciated.

    #2
    If you examine the material used for it you will find that they utilized the Object World Position node which gives you the center point of the object having the material applied on. This can be used to give visual variety to the material based on its object location in world space.

    After some simple calculations with that node, a 2d vector is generated to offset a color noise texture and multiplied by the original diffuse texture to complete the effect. Find the Object World Position node and see how they done it.

    Comment


      #3
      Wow, I thought this one was burried deep. Thanks for that answer but I did figure out how the flower material works. But still unable to do what I was hoping to do on the crowd system. If I apply the flower material on the crowd, it just flickers as they move because they're based on world coordinate. And wasn't able to find another variable that would just randomly choose a color.

      Comment


        #4
        I think you can use a material instance with some parameters to slightly change the appearance. Once you spawn in kismet, set the material instance parameters to some random values.

        Comment

        Working...
        X