Sunday, August 29, 2010

A Room Without A View: Week 2

Last week was a relatively light week in terms of construction. As I near the end of the current phase of building I'm eager to begin the next training course as soon as possible so I can continue into creating the props for the room with as little downtime as possible. So most of my time was focussed on painting the walls.

Allow me to elaborate.

As previously mentioned, in order for my room to look like my room I would need to find textures that match the wall paper, carpter, and the wood beams. Half Life 2's textures are on the whole an excellent and professional looking lot, but do conform to the theme of HL2, which could charitably be described as "a renovator's dream!". So nothing especially matched. About the only thing that looked closed was the fireplace, and that was only because I found a "wood" texture. But if it were to be an accurate rendition of my room, improvements would have to be found.

A couple of online tutorials later and I was all set. Downloading a communuity made program called VTFEdit (there are some very nice smarter than me modders out there that believe in sharing the tools they've created, which makes my job so much easier) which could convert any image into a texture for HL2, I set about photographing the various walls of my room.

This wasn't quite the simple chore I had imagined, and in the end I had to do quite a bit of careful light placement to ensure I found a balance between shadow and glare, and even then I generally I could only salvage a small square out of the photo, tile it to make it repeatable, and then paste that in. Fortunately this actually works very well as all of the things I was photographing were "repeatable", ie. flat slabs of blue or white. Still, if I'm going to do this professionally it's going to require a good camera and some studio like conditions.

But that's a thought for the future, as to start with I'll be working exclusively in the engine and the textures included therein.

The change was a small one, but it results in a dramatic difference to my eyes, as it is actually starting to look like my room.

I did do a small amount of construction this week, as I decided I was not at the level to be able to create the skirting boards and wall design as a texture, and built them using brushes instead.

All that's left to do building wise now is texture the doors and cupboards, and make them both open, and then it'll be time to start placing props...

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.


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.

Sunday, August 15, 2010

A Room Without A View: Introduction

I have decided to build myself a bedroom.

Allow me to elaborate.

For the past few months I have been working - slowly but mostly surely through a dvd course on level design in the Source Engine (the engine used to create games such as Half-Life 2, Team Fortress 2, and many other games with 2 in the title). I am nearing completion of the course (whereupon I will start one of the 6 OTHER DVDs in my drawer), and am looking for a small project to test it out. I could create a multiplayer map, and indeed I have a couple of plans to do this. I could create a single player map, and this is our eventual goal. But first I'm looking for a project, small in scope but allowing for expansion and improvement as I practice and learn.

My brother (as we develop our attempted buisness we continue to set each other goals and deadlines as an encouragement to productivity) set me the innocent sounding goal of building a recreation of my bedroom as a test. At first this seemed simple enough. As I learned more about level design and the tools involved, it began to seem far to simple. As I learned even more, I began to realise that there was an amazing amount of potential for this simple idea to become wonderfully complex.

This will need to be done in several stages.

Stage 1: Creating the physical space itself. This is easy enough apart from one corner (my room is not a perfect rectangle, it has a dip in one corner behind an old fireplace), but for authenticities sake I will need to do some measurements of the real bedroom and convert this into in game units.

Stage 2: Adding non-moving parts. My bedroom is an old room that's been renovated a few times over the years, it used to be a dining room that connected the front hallway to the back study, but has had an extra wall added in to make it a seperate room that connects onto the hallway. As such it has a few quirks such as an asymmetrical roof design (beams and plaster), an old sealed over fireplace, built in wardrobes and a wall pattern that juts out from the wall slightly. As these are all fixed and don't move they can be added in using fixed geometry, along with the window, which I will leave opaque for now.

Stage 3: Adding moving parts. Door to the room (which, unless I build the wallway, I will need to leave locked), wardrobe and cupboard doors.

Stage 4: Placeholder props. Bed, TV, Various shelves, desk and computer. These will be placed using in engine props, meaning the bed will not look like MY bed, etc, but this will certainly do to start with.

And that will complete the room. However, there's plenty more to be done. Firstly, I have a course in designing 3d content and props, so my eventual long term goal is to attempt to create props that match the content of my room, so I have my bed, my computer, rather than whatever the source engine has available. If I feel particularly crazy, I can even use photographs as actual textures to ensure they match adequately.

Once that's done, I will look to see if anything can be done to fix the opaque window. The simplest solution seems to be create as much of the outside as can be seen from my window (fortunately this is very little, just a fence and a portion of the neighbours house), and then leave the rest as blank, as it will never be seen in game. The same approach could be used for the hallway to allow the door to my room to be opened.

I'll be uploading pictures to my facebook (and here) as I go, to show my progress. Work will hopefully begin tonight.

Sunday, August 1, 2010

Why Advertisers Should Fear Me

Dear Universe,

I have been told on occasion that I have an excellent memory. I forget who by. However, over the years I have noticed that, while it definately has its moments, at times it seems to be rather selective in its excellentness. For example, I cannot remember What I had for breakfast on the third wednesday in February. You could argue this is because this counts as unessential information not worth remembering, an admirable explanation that sadly falls flat when you consider the amount of childrens television show theme tunes I know by heart. But whatever else you can by say about my memory, it has always been good at remembering advertising, and my father, in his speech at my 21st, told with some relish (and a slice of cake) the story of how, as a child, I would always tell them which product they should buy and listed all the reasons why it was superior, quoting the ad word for word. I suppose it raises interesting questions about retained memories, and how memory is affected by perceived cultural significance, plus the effect of advertising on children and/or suspecptible personalities. Or maybe I just saw a weird ad this morning.

Allow me to elaborate.

As I walked out of the train station, listening to a rock band singing tragically about how nobody wants to hear you sing about tragedy, I noticed an ad promoting 'The Biggest Aussie Pie Night', showing a lot of Typical Australians(tm) at the football, whooping and holloring at the sight of a meat pie with sauce. While I enjoy a meat pie as much as the next person, perhaps more so, it did seem an overly generous reaction to a baked meat and pastry product, even one with tomato sauce. However this soon was forgotten when I noticed that one of the men (who from the look on his face hadn't seen a pie in years) was yelling out at the top of his lungs: "Support kids with cancer!"

This struck me as possibly the oddest thing I had even seen someone yell at a meat pie. Leaving aside the fact that I've never understood how giving kids cancer could be considered supportive, there was the question of why he was shouting it at all. Was he perhaps so excited by the prospect of pie that his vocabularly had failed him and he merely shouted the first thing that came into this head? Is it a bizarre speech impediment that made him shout "Support kids with cancer! instead of, perhaps "Yay! A pie!"? Or was he ordering the pie to support them?

Then it occurred to me that perhaps he wasn't shouting at the pie, but rather to the footballers he had supposedly come there to watch. As far as sporting cries go it certainly ranks as one of the strangest, but there is a certain nobility to it. Instead of shouting "Caarn the Bombers!" or "The Eagles are a group who are indiscrimate in their choice of sexual partners, and in particuliar we are insinuating that their mothers may have been considered appropriate!" (or words to that effect...), instead this man decided to tell his team that he supported supporting children who are suffering from cancer.

What a kind man. If only more could follow his example. Imagine it. Football fields would be transformed from a cacophany of cheers, insults, and slurs into a place of social commentary and political debate. The place would come alive, fuelled by the passion of people's views and beliefs.

You could even change the names of the teams to causes. Instead of the 'Brisbane Bears' or the 'Essendon Bombers', you could have the 'Brisbane Save The Bears', or the 'Essendon Stop Bombing Iraq'. Their fans could support them by yelling their team names and creating banners. It'd be great television too. I'm excited about this.

Of course, things could get a bit ugly when West Coast Pro Life face off against Port Pro Choice...

In conclusion, don't have people shout slogans on your pie ads, or I will make fun of you.

Yours Sincerely,