Client side QuakeC series

grok_csqc

I started work on some CSQC documentation. I hope to go from common functions via networking and entities to graphical GUIs and how to do a mouse cursor.

Part 1 is here.

No, the irony of this site having a CSQC primer when most people have a hard time with plain old server side QC is not lost on me.


Blender: Sculpting new floor tiles

newconcrete_sculpt

Blender’s Sculpt mode is great to create textures, among other things. I’ve recently done a work-over of a couple Herdbase textures, and I grew tired of my photosourced floor tiles. So I did this.

newconcrete1

I mean, this is so much better! Textures created in Blender tend to beat photosourced ones hands down. The only photos in there are a basic concrete structure and a few grungemaps. The basis was a normal and AO map sculpted and baked in Blender, though.

newconcrete2

Here’s one with a different concrete structure in there, same base though.

I get the feeling I’ll sculpt a couple more textures to replace photosourced ones.

The mesh was first modelled with a subdivision modifier, then I switched to a multires modifier and sculpted on that (brush, clay, scrape, flatten, smooth). I used a pressure-sensitive tablet for sculpting. I topped it off by disturbing the creases a little using the Nudge brush.


Cage baking

cagebaking

Blender 2.71 was just released with a bunch of new features. The most interesting ones for game development are split vertex normals (for hard edges) and normal map baking using a cage.

The cage avoids a number of problems with normalmaps on complex objects; read the Polycount wiki to learn more. Cage baking in Blender uses their relatively new Cycles renderer. An instructional video is here.

cagebaked

I think the result is quite nice. There’s room for improvements, but this is a good start. The lowpoly mesh for use in the game is 500 polygons – the original highpoly one was 200,000 polies.

I look forward to baking weapon models with this.

Edit; after some texture work, the crate looks like this

crate_e


funky walls

modularset_herdbase_0614

Did a bit more modeling recently.

^ Modular wall set for herdbase level. Cycles render. This goes back all the way to the Remake Quake project. Naturally it looks better now, is a lot easier to use, and made the transition from BSP brushes to modular meshes.

Progress, eh.


Painting software status

It seems the Krita project is doing a kickstarter. Very good free digital painting app. Requires KDE, though.

The Mypaint project seems to be in active development again recently, as per their twitter. It sounds like version 1.2 isn’t far off.


Terrain collision

terrain_collision

Terrain models collide quite happily now. Meaning you can walk around on them as you’d expect. This isn’t the heightmap terrain, but a mesh made in Blender.

For some reason, q3map2 seems to treat terrain meshes as planar surfaces/triangle fans instead of triangle soup, so adding the meshcollide surfaceparm to the terrain shader directly did nothing. Only when I added a dedicated collision mesh with the meshcollide shader on it did things work. I don’t presently know why that happens.

collisionmesh

In this image from Blender, white is the collision mesh.

The terrain has about 5000 tris, which I find acceptable for something this size, and the collision mesh was decimated to about 1200 tris. So the entire terrain has the polycount of 2 or 3 character models. That’s pretty efficient.

Heightmaps are somewhat limited in a number of ways. On the upside, they’re easy to make. On the downside, they must be made separately from the rest of the environment so there is guesswork involved, and they can’t be as detailed. You also can’t have vertical terrain or caves with a heightmap.

I’ll have to figure out a way to blend textures on terrain meshes still, otherwise I might go with a megatexture-like approach. We’ll see. I can probably use vertex colours to vary the brightness of the surface.

In other news, I’m still writing SJ’s quest system, and I started using a different method to create visportals in my maps. I found that severely reducing the number of visportals / leaves brought a large gain in performance, especially in very large and detailed levels. The reduction of the vis data is done by disabling blocksize (which keeps the compiler from automatically chopping the map into blocks, aka leaves) and instead operating more with hint portals, antiportals and areaportals. The polycount of a scene rarely seems to matter anymore. What matters more is batching. I got the idea to use larger vis leaves from looking at Call of Duty (and Doom 3) with their visportals / cell based occlusion.

Call of Duty also gave me a number of other ideas, regarding for example AI navigation and scripting. It must be one of the most impressive idtech-based games (I’m talking CoD 1 and 2 here.)


Close the door on it

areaportal1

Prompted by a disappearing-models bug, Spike went and got areaportals working with q3bsp/QC. This came out of left field a little because I wasn’t aware that idtech 3 even had areas. I was only aware of visportals in Doom 3. Anyway, this little feature might be quite a performance-saver in the long run, especially if it can eventually be utilized in the culling of realtime light sources which right now is less than ideal.

areaportal2

In other news, I’ve been re-playing the original Call of Duty game, which incidentally is also based upon idtech 3, so SJ might take some cues from that. The most impressive feature of CoD 1 compared to most idtech games are the physically large levels. I guess a lot of instancing of tree models etc. helps, but some of its levels still give the GPU quite a few polygons to push I’d wager, even for a 2003 game. The liberally used particles and the amount of AIs on the screen are also interesting. Very technically impressive game all things considered.


Follow

Get every new post delivered to your Inbox.

Join 45 other followers