29.3.11

Decals

I made some damage decals out of textures from cgtextures.com.

In game screenshot.

It's a bit more complicated than just throwing the texture in straight from the website.

The first, fairly basic step was to resize it to a power of two....size.

Then, I painted a black and white heightmap to plug into a bumpoffset node.
  
I also made a normal map, basically using the same techniques from here.
The other textures are specular and alpha. The alpha was easy, as it was provided by cgtextures. The spec was just made by manipulating the colour texture.



The height map, spec map and alpha map all went into one texture as the red, green and blue channels.
I could have put two of them into the alpha channels of the colour and normal maps, but then I'd have one map left over that didn't need a full rgb texture, so this way, if they're imported as "Compression No Alpha", there are no wasted channels.

So, because I was making a bunch of these, I made one master material to use (like this guy), so I could make a bunch of material instances, which are quicker because you don't have to set up the nodes everytime, or sit waiting for it to compile all the time.

I should probably point out that it's a DecalMaterial rather than a plain Material, because I forgot the first time and had to remake the material, because apparently there isn't a way to convert them.


Basically, because I converted the textures in the master material to texture parameters, when I make an instance of that material, I can easily add textures in the instance editor.

So anyway, I made a bunch of them, and some similar ones that weren't as complicated.


Decals are cool.


This is another one done in basically the same way. The parallax effect from the bumpoffset node isn't *super* apparent, but it does add a nice feeling of depth, and combined with the normal map means it catches the light quite nicely.

So anyway, there were a few of those.


The other thing I did today was to make a big fan.
The idea is that there's a big fan over the centrepiece of the scene, with a light going through it casting a cool shadow thats moving and so on.



So I made a crappy model and I baked a crappy normal map, and I made a crappy texture. Who cares, you won't be lookin at it.
See?

The shadow changes as the fan rotates, which is cool and badass and awesome.
The fan blades are a seperate model from the fan..housing? So anyway you need to convert the static meshes to movers (or the blades at least) and change the physics settings (in the f4 menu) to rotating instead of interpolating, and change the yaw under rotation rate to something interesting.
Then add a DominantSpotlight, play with its settings, and select the whole thing and create a prefab from it so you don't have to faff about later on when you want to import it into the actual map.