Announcement

Collapse
No announcement yet.

Dynamically change materials.

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

    Dynamically change materials.

    Hi everyone,
    I'm in the mids of an interactive arch viz project where the clint gets to customise his house at various ends.

    At the moment I have to add a feature to change materials of the
    walls(static mesh).

    The user will be given around 15 choices of colors to choose from, when applied the wall material will change to the one assigned.

    The controlling is done through flash(scaleform).
    The flash UI is basic, just a bunch of frames for every color.



    I need help on how to get interaction with scaleform and the materials.
    ..like at a certain flash frame(say "frameLabel_brown"), the wall material will change to the brown material and so on.

    #2
    I would create a material instant constant for each color and have your scaleform call a function to change your mesh material to one of the new color. You may need a class with color changing functions for each mesh you do this with though.

    Another option may be to set up your material so that you can change colors by just changing a parameter. This may be easier.

    Comment


      #3
      Another option may be to set up your material so that you can change colors by just changing a parameter. This may be easier.
      Yes I fell this may be it. But I need help implementing it, especially how to control it via scaleform.

      Comment


        #4
        OKay I almost got it now with the help of scalar param & matinée, but only between two materials.

        Here is the the mat pic for two texture change:-

        There are two texture samples the pale yellow & wood texture.

        Scalar Param(walCol1_2 - which is animated in matinee) is used to control the change from the yellow texture to the wooden one.


        I tried the same by adding a third texture and got some weired results... there is merging between the yellow texture the the third texture.
        I need some help setting up the third texture, so as it can be controlled by the its scalar param.

        Comment


          #5
          Ever get the 3ed one in? I'm in need of something similar but with more than 20 changes..

          Comment

          Working...
          X