Tuesday, 12 March 2013

Rocks in-engine

Having been happy with the rocks in 3DS Max, I brought them into UDK and was very disappointed with the result. The textures seemed blurrier than I expected (despite the 1024 resolution) and the lighting felt flat and false:

I decided to switch to an approach which treated only the large details of each rock asset as unique. the smaller details of the rock (the grain, lichen, cracks etc) would be added with a tiling texture (whilst hoping nobody notices the seams!)

In addition to allowing me to downscale my asset's texture to 512 (although I now needed a couple more textures, but these would be shared across all my rock assets), it allowed much sharper detail, and I could make each rock unique using the object's position and even scale the detail with the scale of the rock.

I also threw in vertex painting of moss to allow me to make the rocks near the waterfall a bit mossy.

This was looking much sharper and more interesting now, and worked well in modularity, however I still felt the lighting was extremely flat and wasn't showing off the normals very well (note: the picture above already has the lighting fix below). Essentially, the rock was either lit or not lit. The lit section did not appear better-lit if directly facing the light, and the unlit portion (most of the rock) was lit evenly from the top and sides. Since my environment is in a valley, light from the sides is incorrect, and is boring anyway. I wanted a stronger bias to give a sense of topdown light.

I used custom lighting to allow me to give more light variation in the lit area, and a topdown light bias in the indirectly-lit areas.

I threw a few of them together to see what I could get with just this one rock asset. A good result, though I expect I'll need one or two more rock pieces for cliffs at least. And the moss is a bit nuts at the minute. Easily tweaked later!