Thursday 10 March 2011

Changing Material


My Objective was to create a material which transforms into another material. I looked into the various nodes found in the UDK material editor. I managed to achieve this effect by using a Linear interpolation node (LERP) and a flipbook texture sample.


This is a link to a video tutorial on how to create a flipbook texture for UDK. A Flipbook is a kind of texture. It will cycle through a set of images to create a basic animation.

Here is the Udn website. This is were I learned about the LERP node. A LERP decides which texture to render, the Alpha value decides which texture to render. The Black part of the alpha value will show value A, the White part of the alpha value will show value B and grey parts will show a mix of the two.
http://udn.epicgames.com/Three/MaterialsCompendium.html


Here is a Flipbook texture I created. It is made of squares ranging from pure white to pure black. The Flipbook texture will cycle throuygh these values to create a gradual change from white to black. This texture will be an alpha value for a LERP node.


Here is the material. The Flipbook texture acts as a alpha value for the LERP node, while two seperate textures are fed into the A & B values of the LERP node. As the flipbook texture cycles through its animation the A texture will change into the B texture.
Here is the material at an early stage of animation.


Here is the material at a later stage of animation. It's nearly changed into the second material. It is also important to note that the flipbook's properties can be changed from Looping-true to looping-False, so rather than a cycle I can have the material change and then stay that way.

No comments:

Post a Comment