Announcement

Collapse
No announcement yet.

Flaming Rainbow Material

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

    Flaming Rainbow Material

    Quick video demo I put together for a material I whipped up. Will provide documentation if there's enough interest.

    http://goo.gl/jNsua

    #2
    Wow nice. I wouldn't mind knowing how ye did that =)

    Comment


      #3
      Tutorial/Documentation/How it's Made is online:
      http://www.oztalay.com/matt/tutorial...-material-udk/

      Comment


        #4
        riDQlous

        everything should have documentation, especially if it can be tweaked into another material or idea

        Comment


          #5
          I took this thread: http://www.polycount.com/forum/showt...p?p=1369859#21

          And did this with it:


          Documentation/Thought Process:
          http://www.oztalay.com/matt/tutorial...-advanced-udk/

          Just added more entries to the gradient array. Here's the HLSL I used:
          Code:
          //code authored by d1ver and Vailias on polycount
          float3 output; //output color
          
          const uint NUMCOLORS = 8; //number of colors for programatic gradient
          
          float4 gradient[NUMCOLORS]; //here's the actual gradient keypoints
          gradient[0] = color1;
          gradient[1] = color2;
          gradient[2] = color3;
          gradient[3] = color4;
          gradient[4] = color5;
          gradient[5] = color6;
          gradient[6] = color7;
          gradient[7] = color8;
          
          /* This method has a flaw, in that the colors listed here are essentially required to be listed in ascending order of alpha value, else the blending will not be smooth between adjacent colors.*/
          
          float4 blend1 = gradient[0];
          float4 blend2 = gradient[0];
          float3 weight;
          float singleWeight = 0;
          
          for (int i = 0 ; i<NUMCOLORS-1; i++ )
          { 
           if (gradient[i].a <= ControlTexChannel) //if the position of our gradient key is equal to the control value
            {
          
              blend1 = gradient[i];
          
              if (i == NUMCOLORS-1)
             {
              blend2 = gradient[i];
              }
              else
              {
              blend2 = gradient[i+1];
              }
             }
          }
          
          singleWeight = (ControlTexChannel- blend1.a)/(blend2.a - blend1.a);
          weight = float3(singleWeight,singleWeight,singleWeight);
          
          output = lerp( blend1.rgb, blend2.rgb, weight);
          
          //output = color3.rgb;
          return output;

          Comment


            #6
            Hi Matt, awesome effect.
            I was actually looking to do this for a fire effect i want to apply to a fireplace model.
            Im guessing that if i just change the rainbow texture into a fire texture i will be able to get some cool fire animation right?

            Is there any tutorial out there to achieve this effect?
            You should make a video tutorial for that effect, i think a lot of people would find it more usefull than the written one you got.

            Thanks in advance

            Comment

            Working...
            X