Monday, October 4, 2010

GLSL

I've finally started to read up on GLSL. It's nicer than I expected, I wish I had looked into this years ago. It's surprisingly easy to do some pretty cool effects - at least in a simple standalone test program. I am starting to realise, however, that fully integrating shaders into a game is quite a lot of work. And unfortunately I'm having trouble comitting much effort into my engine these days.

Anyway, here's a screenshot of a simple shader to compare basic lighting in the fixed pipeline with shaders. (The sphere on the right uses a shader, in case it wasn't obvious).

Tuesday, September 7, 2010

Transparent bases

This ork is my first experiment with a transparent base, which I feel is less obtrusive on the tabletop. Personally I feel that single figures with well modelled bases can look amazing on display, and units with matched modelled bases can look fantastic on display if they're in a matched movement tray, but on the tabletop modelled bases just look strange and out of place to me, I prefer unadorned black bases (which to an extent we can accept as being a "shadow"). However I think a good transparent base could look even better, so I'm experimenting with making my own.

This one wasn't too bad. I embedded the model in the transparent epoxy, which I'm not sure about - the next model will be pinned to the top normally so I can compare. The matt spray-on varnish "whitened" the surface a little, so I coated half of the base with a layer of gloss varnish to see the difference. As you can see here, it helped.

Also, there's four small button magnets embedded in base (I currently add magnets to the bases of all my models for transport), they look a little out of place but it's not too bad. There's actually a pair of magnets in his feet as well but this is tricky to do and weakens the model - a second ork I made with magnets only in the feet broke at the ankles. Though the attraction to metal was weaker, it still didn't move around (much) when placed it on a tin and shook it up, so I might try again, but not all model have feet / legs big enough for good sized magnets.

Here's a normal "plain-Jane" based ork for comparison:

Wednesday, September 1, 2010

Realism in games

There's many unrealistic elements of video games that we happily ignore, either because we know it's too difficult (or just not worth the effort) to make it more realistic, or we know that making it more realistic would not make it better, often it makes it worse.

But to an extent that's subjective - some people like realistic but complicated games, at least in certain genres. Take flight simulators for example. I think it's abaout gameplay first, but if an effective gameplay mechanic is also realistic, that can help immersion and enjoyment. Take for example the way current shooters often limit the number of weapons you can carry while older games generally allowed you to walk, run and jump while carrying many times your body weight in firearms. Limiting your carrying capacity wasn't done just because it was more realistic; it was and is done because it forces you to make strategic decisions about which weapons to carry. In some games this is an advantage.

So whenever we look at something unrealistic in a game, we have to consider if it needs to be improved or whether we should just maintain suspension of disbelief. However, today I had an idea that just might work.

In most shooters, when you reload a half-empty clip you don't lose the ammo that you dump (even though you clearly see it drop). This makes sense. But consider: if you tap the reload button in the middle of a firefight you drop the clip and reload as quickly as you can, losing the rest of the clip (though it falls to the floor and can be picked up later). If you hold the reload button you are treated to a more longer animation in which the character removes the clip, visible stowing it away thus keeping the ammo, before replacing it. This combines realism with an added layer of tactical decision making in-game. I think, for a modern-day shooter like Counterstrike, this could work. I'm planning to try it in my game anyway.

Of course it still doesn't explain how the ammo is consolidated from the half-empty clips into full ones, but hey; it's just a game. Right?


Also, I'm starting to suspect that I talk too much.

Tuesday, August 24, 2010

Animation more sorted

That thing I said yesterday about the exporter only exporting a single pose at a time? Solved. Actually took much less work than I expected, and now I can export an entire animated action in a single file. Might have to tweak it later after I tweak how the engine handles animation of course, but that's the nature of the work. It's an iterative process.

Monday, August 23, 2010

Animation sorted

I recently started to spend time on my engine again, and have finally solved the issues with importing geometry and animations from Blender. There were some problems before that I had not noticed because I had not tested enough, but things seem to be running quite well now. I've also cleaned up the code a bit, and improved the export scripts, making them more user-friendly. The animation export script currently only exports single rig poses though, so the next step will be to export an entire "movement" in one go. After that I think I'll look at graphics again, try to throw in some fancy effects.

Current progress:

Bind pose

Posed bones. It may not be obvious, but this is supposed to happen.

Wednesday, June 2, 2010

Quick update - Rolling Bones and Crimson Fists

So I've made some progress in my game engine. I've gotten the animation to a point that I can live with for the time being, though I will be changing some elements later. The problem now is getting the data. I considered trying to use existing formats, but for now I'm sticking to my own as I cannot find an existing format (supported by Blender) that I like. Instead I'm writing tools for exporting from Blender. I've written an exporter for my mesh format, though it doesn't export edges or vertex weights yet (coming soon!). I've written an exporter for the rig, but I don't understand what Blender is doing with it's matrices - the bones seem to be rolling or something, and my rigs are not exporting correctly. Anyway, I'm shelving my engine for a short time while I concentrate on Java, which I need for work. Hopefully I'll be able to pick it up again soon.

In the mean time, here a couple of Crimson Fists. I had some trouble with the transfers, but otherwise I'm happy with how they turned out. Their armor is much lighter than normal for Crimson Fists, but I prefer it as it looks better under normal room lighting. I settled on Crimson fists because I like blue for Space Marines, but Ultramarines are pretty much the standard, so I wanted something different (some people always have to be different...). I considered making my own chapter, but I couldn't think of anything special and I like the Crimson Fists colour scheme and backstory.

Tuesday, March 30, 2010

Lights! Camera! WAAAAGGGHHHH!

I have been spending most of my free time on Warhammer, mainly reading and painting (I've found a few people mildly interested in playing, but no-one seems to have the time). I've made a start on some custom models, which I think will be pretty unique, and I'll tell you why.

First let me tell you about something I don't understand, but that's interesting nonetheless: plasma balls are scary. Take a power testing screwdriver and hold it near a plasma ball. It doesn't even need to touch it to light up. What's more, if you open the screwdriver and remove the bulb, then just hold it near the plasma ball it will light up - that's all it takes. Hell, if you put it close enough or touching the plasma ball you won't even need to touch the bulb (though touching the bulb seems to provide an earth and allow a better current flow). If you place a small piece of metal such as a coin (I found the metal spring from an old pair of headphones works well) on the surface of the plasma bulb and connect it via a cable to the bulb, it will light up at a distance (if you touch the bulb it will be even brighter).

Holding the screwdriver close to the plasma ball is enough to light it (don't ask why the sides of the plasma ball have been cut off).

The bulb from inside the screwdriver also lights when held near.

The bulb on it's own. It isn't actually touching the plasma ball, but it does need to be very close.

Just holding your hand close is enough to brighten it.

Connecting the bulb to the plasma ball using a simple cable and the spring from an old pair of headphones.

"Stealing" the current: the bulb no longer lights up.


Now the really important thing about all this is that you have a relatively small bulb that lights up when connected to it's power source by a SINGLE cable. Why is this important? Because it means we can install the bulb in a model and we don't need to connect the model with two cables. If done right we only need to place it on a metal surface that is connected to the plasma ball, allowing us to pick it up move it around freely without any annoying cables, and it will still light up! I've already installed some bulbs in a couple of models:

A Grey Knight Terminator (with a failed undercoat).

When connected to the plasma ball by a single cable (through his leg), it lights up!

A Dreadnought (that will eventually be a Grey Knight Dreadnought) with 5 bulbs.

It's connected to the plasma ball ball by a single cable through the leg.

The metal nut is there so you can touch it to brighten the bulbs further.

The view from behind.


Now there is one more thing you can do here (and probably more that I haven't thought of yet), though it's not as impressive and actually far less reliable. When you place a piece of metal on the plasma ball, sparks (or an arc I suppose) will jump to skin or metal held very close - if you're not careful you can end up with an extremely small yet momentarily quite painful burn on your fingers. Allowing an arc to jump to your fingers for about half a second will produce a tiny visible burn (and the small of burnt flesh) without causing any pain, but longer than that and it could hurt. I once burnt a mark into my fingernail by accident, that was rather painfull and the mark was visible until it grew out.

You can get a "captive spark" to jump on a model, but it's tricky to do and the spark is very small, and you need to touch the model to complete the circuit or else it just won't jump. Also you cannot mix sparks and bulbs on a single model, not with any degree of reliability anyway, as my Dreadnought taught me - the messy holes in his Multi Melta are from a failed attempt to get a spark to jump between the barrels. I actually got the spark to jump on occasion, but the bulbs wouldn't light unless the spark jumped. If I wired it up differently the bulbs would work better but the spark never would. Instead I got a spark on the end of a Grey Knight Brother Captain's incinerator. It's reasonably reliable, but the problem is that I think the spark might actually be slowly burning away the metal. It might just be something else or just random luck, but the spark is less reliable now than when I first set it up. Time will tell I suppose.

Grey Knight Brother Captain.

The spark is small yet visible.

This was a hard picture to take, but it shows off the spark a little better.


I will place more detailed descriptions of how I installed the bulbs later, probably after I actually paint the models. I'm putting off the painting until my skills improve a little, as I really want these to look good. As you can see I'm having some trouble with the undercoat layer on metal models, so I still have some things to figure out. By the way, a plasma ball will also light a neon bulb in the same way (the basis of my old home-made lightsaber), but as the smallest neon bulb I have is about the height of a Dreadnought and as thick as his arm, I don't see it as being good for anything other than scenery, and I'm not there yet (besides, since scenery is quite fixed in place the "one cable advantage" is less pronounced). Also, using an oven lighter (the kind that just makes sparks) will also light the bulbs, but they will flicker and you really need two cables then. Good for showing off the models when transporting them I guess. In theory with some work you could use the bit that makes the spark on cheap lighters, but... no.