Chapter 9. The Devil Is In The Details!—Making the Most of Materials

This chapter's recipes cover some of the Material Editor's deepest, darkest secrets. Most of the solutions pave the way for further exploration; exposure to a new tool often means that other functionality is also exposed. The recipes presented here are not tailored exclusively for a game level (for simplicity's sake), but their use in game construction is explained too.

In this chapter, we'll discuss activities such as:

  • Animating a Material Instance Constant in Kismet
  • Forcing a mesh to always face the camera
  • A cloth-like effect using WorldPositionOffset
  • Creating murky liquid
  • Creating a scanning effect
  • Quick glass
  • Creating transitions between materials
  • Static Cubemap creation and real-time reflection
  • Wet surface reflections with dynamic actors
  • Making a holographic effect using Bump Offset
  • InteractiveFoliageActors
  • Getting varied hit impacts off models using a PhysicalMaterial

Introduction

The Material Editor is easy to get a hang of in terms of provisioning the Diffuse, Normal, Specular, Opacity, and Emissive features of a model asset, but UDK's editor offers far more functionality than just loading up and controlling imported textures. In particular, a range of nodes access the scene itself. You can call on the scene lighting, distance of pixels from the camera, the reflection for a given surface normal, and you can even drive Materials in the scene through Scalar parameters in your code. In many of the recipes so far we have already discussed the everyday operators that you can use in the Material Editor, from Fresnel Falloff to FlipBooks. Here, we're going to focus mainly on the more difficult, but equally useful scene driven operators (and a few others that we haven't touched on so far).

From UDK versions after September 2011, a new ease of use feature has been added to the Material Editor. Material Functions are encapsulated fragments of commonly used operations (like the HeightLerp function which mixes two textures based on a heightmap and would be really helpful when texturing landscapes) or custom operations created by users. To get started using this new feature, in any Material, look to the right-hand side panel where the Material Function Library now sits below the Material Expressions list. You can also right-click and browse the Functions and FunctionUtility categories of nodes in the Material Editor. A description of their usage is available at http://udn.epicgames.com/Three/MaterialFunctions.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.122.46