Sunday, August 22, 2010

A Room Without A View: Week 1

One week in and the room is proceeding well. The main architecture of the room (walls, roof, cupboards etc.) are complete, and textured, though not with the correct colours yet. I have found the work immensely satisfying and may have found a new hobby/career option, and have learnt many things, most importantly to never put fireplaces in your levels.

Allow me to elaborate.

Monday: Only had an hour to spare between work and a social engagement, so I spent the time taking some reference photos of the room and balancing precariously on a chair with a tape measure trying to make my arms grow another fifteen cm so I could reach the roof.

Managed to get all the measurements I needed based on the age old method of "measure a bunch of short things and add them together", as it turns out the tape measure I thought was absolutely massive when I was ten is in fact, only 2m long. Now I feel old. But also tall.

Tuesday: Took a couple of final fiddly measurements such as "width of cupboard door" and "depth of the lower fireplace shelf at the centre compared the the diagonal line of the edge" (deep breath), and then using my rudimentary Adobe Illustrator skills contstructed an architectural plan of the room showing the scale and measurements of the walls, which served as a reference and also something to make architects fall on the floor and laugh their heads off.

Then started building the room in Hammer, the level editor for the source engine.

Firstly, the Hammer editor is AMAZINGLY intuitive and enabled stupid people (ie. me) to build quite complex objects with ease.

Secondly, Never try and build a room facing north starting from the west wall when you're currently facing south, or expect to get confused by compass directions every few minutes.

Completed the walls, roof and floor, then called it a night.

Wednesday: Started with the wardrobe as the single largest feature of the room, but also the boxiest. Made one of each of the wardrobe and cupboard doors, then copied them accross. Copy and paste is your friend.

The bedroom door posed a quandry, I could quite easily do a thin pretend door and leave it at that but given I eventually wanted the door to open I had to take into account the length of the frame on the OTHER side of the wall. Hammer helpfully has a 'carve' function which allows you place an object through another, and use that to cut a hole through it. So by placing the door frame into the wall and then carving, I was left with a perfectly door shaped hole. Win.
Thursday: Thursday was fireplace day.

I have what I always assumed to be a relatively plain and unassuming old fireplace in my room, which has long been sealed. As it turns out there are lots of little slats and supports all over the thing that I had previously taken for granted. To make it a bit more difficult, most of them have rounded edges. 3d technology has come along way since the days of, say, Quake, but the general rule still applies that curved edges and video games don't mix. The solution is to do lots of little straight edges, and enough of them that it effectively looks curved.

The upshot of which is that the fireplace took me longer than every other part of the room combined, but fortunately it did look the spitting image of my actual fireplace when done. A currently unsolved problem is the mirror just above the mantlepiece. Reflections are a bit of an issue in the source engine (particularly as the main character is never actually seen in Half-Life 2), but there are solutions. I just need to find them.

The main architecture complete, I threw in some placeholder textures ( the 'skin' that objects in the world wear), added a simple light, and loaded up the level in the actual game to see how it looked.

The first thing I noticed is that lighting makes your level look infinitely better.

The second thing I noticed is that the editor is actually more powerful than the game, and so all my carefully curved edges had been transformed into diagonal or straight lines. Still looked good but rather frustrating nonetheless.

But the room was done! Walls, fireplace, cupboards and doors, the framework was complete. I leaned back, breathed a sigh of relief, looked up and realised I had forgotten the roof.

Bugger.

Friday: Taking a break from the roof, I decided to solve another question I had been wondering. Half-Life 2 has a number of built in textures, but of course if I'm building MY room, I should probably make sure it's the same colour as MY room. So I needed a way to create my own textures.

This is slightly hindered by the fact that my drawing skill is almost exclusively limited to cartoon fish, which falls slightly short of the ability to create a bump mapped texture with virtual depth and inbuilt material properties.

To the internet I would go. A quick search later and I had downloaded a program a helpful modder had made that allowed images to be converted to source engine textures with relative ease. Using an image of a white plaster ceiling that I... "borrowed" from the internet until I had time to photograph my own roof, I ran the program, added a view properties to tell the game it was plaster and would react as such when shot or walked on (neither likely in this scenario but you never know) and restarted Hammer.

Sure enough my new "whiteceiling.vtf" file appeared, and I was able to replace the roof texture with this new one. Still looked nothing like my actual roof, but important milestones, people.
Saturday: Having successfully procastinated design work with learning work on Friday, I returned on Saturday to the roof. My roof has 4 cross breams running accross with whatever you call the roof equivelant of a skirting board running around all edges, which includes both the edge of the roof and the cross beams. Now this is the kind of thing you'd normally reserve for a texture but I wanted to go a bit all out on the room to know my limits, so I decided to build them using geometry instead.

The loyal tape measure was brought out once more and some quick measurements were taken of the beams and the skirting boards. From there it was a relatively simple affair of building the beams, building one set of skirting boards and then copying it 33 times to the other edges on the roof, doing a little trimming here and there to ensure that the edges blended appropriately. I also took this opportunity to trim the door frame as the top is two slanted diagonals rather than a single straight line.

On Sunday, after creating my world, I rested, and played video games instead.

No comments:

Post a Comment