Pages

Pretensions of objectivity must be left at the door, clothing is optional...

My Poems - My Music - My Paintings - My Serialized Novels

The Wholy Order of The MEEK
An Atheist Pagan Hymn
My first book of Atheist Spirituality
What Canada REALLY NEEDS !!
SG Atlantis and their Unethical BS
Ring of Corruption

"All that is valuable in human society depends upon the opportunity for development accorded the individual."-A. Einstein

"Ain't it funny how the factory doors close, around the time that the school doors close,
around the time that a hundred thousand jail cells open up to greet you, like a Reaper...." -Zack de la Rocha

They say "Sing while you slave!", but I just get bored... -Dylan

"It's NOT a 'War on Drugs'. It's a war on Personal Freedom.Keep that in mind at ALL times" - Bill Hicks

"Opinions are like assholes, everybody has one" - Anon

"I'd get pretty bunged up without my asshole" - C. Taylor

"If you're going to tell people the truth, make them laugh, otherwise they'll kill you" - O. Wilde

"It is likely to excite dissatisfaction against government and incite people to non co-operation..."

Monday, February 03, 2014

Low end game design: idtech 4

I haven't written about idtech in my game designer exploration for a very good reason
The idtech boyz do military sims
they have incredible gear
and their games have always ground down the best consumer machines of the day of their release
I finally decided to give them a good look, choppy framerates and all

They have beautiful rendering in the game engine, they support normal, bump, and specularity maps
Models and animations are done in Lightwave by the developers but you can use other things and milkshape converts to and from md5
I used this:
http://www.clintons3d.com/lightwave/
it has a 6 page step by step tutorial about exporting an animated mesh from LW
but you can model in something else and use either milkshape or lw to convert
or mirex's Biturn http://mirex.mypage.sk/FILES/bi088.rar
but for anything other than an animated mesh, importing and mapping is really easy
I have a thing called the doom material editor which helped with surface flags (translucent, mirror, two sided, etc.) but straight textures and mapping meshes is easy
a lot can be done in 3d coat or another package with just the 4 image maps
the uv's are all that matter.

I REALLY HATE RADIANT.
That's the level editor
I hate it
I've always hated it
I think I always will.

Too much clicking, a nonstandard interface, its just wierd to me.
But I suffered through and can use it enough to do what I need.

Optimizing levels is hard
On even a small room, one misoptimized mesh or large texture can slag the FPS.
But its pretty, and it has bumps.
oooh. bumps. so nice...

the bumps on the chest and the legs scales are 3d coat normal and bump
Image039_1

Material definition files allow textures to consist of diffuse, bump and specular on brush materials
a huge bonus!
Image040_1

This is the game mesh
very low polys

Image045_1
none of the work that makes this look like in game is done to the mesh
the only thing being modified are the 4 image maps for diffuse colour, normal tangent space, specular, and height/depth maps, no polygons are harmed in the process in any way.
I simply added the 4 new images to the folder where the other image maps were and changed the lines in the the material file to point to the new files
What the flamboyant dude here is showing us is specularity
the diffuse colour image map below is completely devoid of purple
all of the purple on the dude is coming from the specular colour map
which I made purple to see how much the specular colour affects the look
I have read that putting colors opposite the diffuse gives interesting effects.
from opening the md5 file to extract the low poly mesh for texturing to exporting the maps from 3d coat and changing the material file took 20 minutes to make the standard marine tech look all bumped out and green with purple specularity.

Image046This image is again showing the power of specularity as the reflection in the mirror of the painting behind the player has large black areas that are raised and shiny - specularity and bump on a blog surface! The blog is a single 6 sided polygon, yet we are getting rendered bump and specular lighting detail in that space.
The mirror is pretty but it slams the framerate.

Image041_1

Image043_1Image044_1

oldtecht_d

it also comes with an sdk which has a visual c++ solution
not as easy as the unreal scripting
but you can do everything you want because its GPL
I was able to load it into VC++ 2005 express just fine

creating new entities requires you to write a definition file
which is basically a class extension script
and that can be done without any compiling
but you can't just click in the editor and extend a class
you have to manually write a .def file

ITs not as easy to extend the programming without actual visual c++, but importing bum[p mapped meshes alone makes it a big favorite.

It is SOOOOOOOO picky about leaking light in rooms
make backup copies always as you go

but its pretty
even though its a military sim
no civilians if that's what your game is
but good for outer space and alien stuff.

the gui materials totally rock too.

The simple low poly mesh shown earlier, plus these 4 image maps below, creates the interesting final result in the game engine.
The original diffuse and local space tangent normal map are seen as well as the modified maps. The specular is the stock one, with simple colorization and spinning the hue to the opposite of green, increasing the contrast, and lowering the brightness. If it was even lowered more the results would be more subtle.
Maybe 40 minutes was spent to create the demonstration here, and the original mesh was never touched, it was only used as a reference base for the uv painting in 3d coat.
Image049_1
Image047_1
Beyond the need for optimization and frugal shader use, the idtech 4 engine gives beautiful color, bump, and light rendering. The normal maps rock.
Its GPL so you can create your own games with it without a license, but you would have to strip away the Prey, Quake4 or Doom3 related assets.
The hud and PDA/video/audio log system is accesible.
The editor sux. Maybe you could make a better one. When everyone else was using radiant on Quake 1 and 2 maps I was using hammer and glad to not be as 'leet as them. I can't right click and get the properties of an object, yet they insist on taking up about a thousand pixels of my screen space with f#$%#$% windows toolbars and window decorations. Grrr. Programmer geeks just don't get interface design. I will one day create an intelligent editor that will just make a bloody room with a door and you can drag out to extend the hallways, double click to make new roooms or caves, or buildings, and right click bloody everything and drag its handles to wet your panties. But I swore I would never become a programmer.
Map sections can be built completely in a 3d package as long as you can save it into .lwo or .ase with uv mapping. I think that's why they neglect the editor, they actually design large sections of maps directly in a 3d package like maya, lightwave, or max.
BSP is very picky in idtech4, save often.
There isn't a conversation system, and there are no real civilian assets, so if your game is not military in nature you would have to make an md5 workflow and import some character assets.
A couple vehicles are included, but they are military as well.
There is a vehicle mod for Doom 3 that has a nice regular jeep in it that works good, and I believe that mod can be tweaked into quake 4, but there doesn't seem to be one there by default, just the walker and the tank.
I personally haven't figured out the head system yet. I think the entiy .def files for each soldier that isn't generic contain the specific heads, decals, etc. but they often share the same base mesh.
In contrast, if you were to use Deus Ex to previs your design you have approximately 90+ discreet civilians to start with that are already subclassed. But it isn't GPL.

I like the Prey engine and assets,
which is basically the same as Doom 3 and Quake 4
but I like the gravity mechanics and the base creatures/entities
Note the line in the config file
everything elde is set at high quality
but I had to set this flag to "0" in order to use the uncompressed TGA textures instead of the DDS ones
I copuld not successfully make a normalmap into a dds for prey
so I set this flag and voila!
I now have uncompressed textures and normal maps on my dead alien
as you can see by the ostentatious pink and red bumpy lines made in 3d coat
I also gained a 3x longer load time
=(
It was worth it.
notice the bumps and different coloured cells on the gun as well
you can tweak a lot of the glow effects with simple images
and it has texture swaps for bloodied versions as you can see by the farther dead alien that has a dark purple head and yellow on his legs.
I accidentally whacked the tooth alpha as you can also see.
I understand from exploring this that you could basically put anything from doom 3 or quake 4 or prey all into the same base engine and it will work with tweaking.
I am unable to successfully run the prey editor and dark radiant doesn't like its textures, but all of these examples are just done with image maps and no modelling or level changes.
I am trying to get the editor to run and if I find the secret where it doesn't freeze my video card and force me to restart, I'll pass it along, beause the gravity effects are fun for puzzles.
I think I might even become hooked on idtech 4 if I can optimize the game rendering settings a bit.
The main drawback is the need to use a complex debugging and compiling environment for building in anything that isn't in the engine.
And radiant. Ugh.
I think a lot of people would use idtech 4 for development if it had the following:
1. A new editor with a decent fullscreen texture browser,
2. gui's for layered image map material creation and management.
3. an entity subclassing/creation dialog
4. disable advanced shaders and make a dx9c compatible version based on minimal shader use and the focus on image maps for texturing.
5. Some prefabs and a few civilian characters
6. Make a stripped down idtech 4 that contains a couple of weapons and characters and maps that are gpl as well. Remove it from its d3/q4/prey base.
7. Package it with a minimal IDE and a compiler. That VC++ along with the windows platform sdk is about 2 G. There must be another solution.
8. A dialog tree with triggers woulkd expand it.
9. Some code examples or updates, like regular vehicles, rpg style inventory management, etc. in templates.
With one of these 3 games as a base there is plenty of assets to tell a story with or previs, but stripping and repackaging the game is difficult and so you would be stuck with modding them unless you stripped and repackaged it yourself.

Image055_1
Image054_1
Image056_1

Image057_1
There is also an MD5 plugin for blenderand a script for max for exporting at Katsbits http://www.katsbits.com/
simply adding a glow texture and linking to it with a blend add function gives you some great effects. The glow image can be small 64x64 or large and intricately detailed. In the script you see rgb 1, zero is black and point sizes are in between. This section can also link to an equatio, trigger or function to increase the glow dynamically according to parameters initiated in the game, such as glowing turning on or of according to an entity death or a trigger.. but 1 or less just makes the image glow. R,G,B can also be set each on a line with its own value for simple colour altering of the glow. glow images should be mostly black and you can use the diffuse map as a guide to draw them.
if you look in the editor image, the holes on the wall there are not geometry, they are a normal mapped and bumped material on a flat geometric block.
This is the shortcut string you need to use for prey editor. The multisample flag is necessary or it will flake.
PREY.exe +set r_fullscreen 0 +r_gamma 1 +set r_multiSamples 0 +editor +set fs_game cdtmod
Image059_1

image64-1
If you are going to work with idtech 4 and don't have lightwave, this tool called noesis may help you with the MD5 format.
http://oasis.xentax.com/

http://oasis.xentax.com/files/noesisv40964.zip

My next round of tests is something I've been working on for a number of years, but was waiting for the engine rendering to be good enough, I am going to make a virtual gallery using UT2k4 and another using idtech4 and see how just a simple room with paintings renders in each engine.

So in looking for a base engine to start building a game on, it matters whether you can modify it and also sell a game built on it without paying exorbitant licensing fees.
The base Idtech4 engine is now about 10+ years old.
I believe the terms of its use are basically that you can make and distribute and sell your game provided that you also allow your code base to be viewed and modified. If you don't want anyone to be able to have your base code modifications you would be breaching gpl and have to pay licensing fees.
The idech4 source code was released many years ago with nothing serious coming from it.
I was wondering why.
So I downloaded all the main forks of idtech4 and compiled them.
iodoom compiled but sucked
the gpl base compiled, but a lot of new code for multiprocessing is in the BFG edition of the code so I looked for a fork off that.
The base Doom3-BFG-Master repository did not compile on VS2010 with an error in the joint section of model.h, which has significant differences from the base d3 version so you can't just use the old one.
I then found RBDOOM-3-BFG-master, which contains all of the BFG edition code, adds some glshaders that are good on newer cards, and the author of the fork has made some effort to clean up and organize the source. It compiled and ran with some gl errors in the exe, but it did run. Download the master zip at the repository here https://github.com/RobertBeckebans/RBDOOM-3-BFG
RBDOOM-3-BFG-master also needs a program called cmake as the base build is made from a linux source and can be used to make a cross compiling(it will create windows and mac binaries as well) build on a linux machine, but I was using vs2010 in all its disgusting bloated glory in xp and I was able to generate a working vs2010 solution from the source in the zip repository by using the win32 cmake gui.
For those of you that hate microstink, you can actually compile this doom3 engine on a linux box with no microsoft libraries and no vc2010. vc2010+dx_sdk+MSWinSdk=4.5G!!!
I hate the MS IDE and libraries, I believe it is possible to compile idtech4 D3BFG on windows using mingw with a couple small community made libraries and the scons project. I am currently examining this other method of compiling in windows with cygwin/mingw and an alternative IDE. Bloated ide's bug me soooo much.
The RBDoom project has solutions for the eclipse IDE as well as VC express from 2002 to 2012.
I found if you copy the bloated directx sdk folder to the projects folder you are building life get easier.
Anyway, I blah blah blahed this and that and ended upp with a nicely compiled executeable which works as well as I can see at this point.
The main problem with idtech 4 is no one has built a nice base package for it
it comes with no interface or anything and there is no set of base template content or even a player model.
No one has stepped up and made a base package yet
because a list of necessary startup assets isn't there yet.
Anyway.
If you want build a game from scratch and sell it, RBDOOM-3-BFG-master might compile properly for you to build off.
You are on your own from there though, as documentation is sparse and other user support in forums is a non newbie friendly geekzone of hardcore programmers. RBDoom is the neatest and most organized.
A nice thing about idtech4 is that many entity definitions can be created with scripts, so with a good basic package you could extend the game and use it quite well without recompiling the base solution.
I personally find Q-Dir useful for copy-pasting paths and notepad++ indispensible for browsing the source directories. You can make a Doom 3 source workspace and have the different dev builds under different projects there and load the folder structure into the project. N++ also loads the image and model folder structures which helps in pasting filenames into the scripts you are working with.
Image072_1Image070_1
Maybe someone could make a bare set of assets for D3 like Torque3D has.

http://www.garagegames.com/products/torque-3d
You might be able to build off torque from MIT, many people have made games with it and it is a flexible engine with working (Swap RGB in the nvidia filter without inversions, as you see from the orange not blue .dds) normal mapping. It builds and runs fast on my machine and you can actually be up and running in minutes with your own dev build.
If you are not really a code person, but want to begin to get your feet wet, Torque is really very good. The core emty and full projects are about 350 megs and all the source is simplistic and available. It is the opposite of idtech, but of course, idech4 looks better than the older Tribes engine powering the free Torque.
The editor gui itself is ceated with scripts and all gui elements and the assets of the entire engine and editors are modifiable without recompiling anything. It can generate project files for other IDE's, but I find notepad++ fine for browsing through it and xnview for browsing the image elements.
Someone needs to write some importers for it as you need to basically use an older version of xsi to write nice .dae files for it as it has no other import modules, but it does have nice performance with large normal and texture maps. Terrains are very smooth at about 5k, and there is vehicle and flying machine code.

Image073_1

Image074

I'm starting to warm up to Torque a lot. I like the open perspective interface that runs the game logic as you are building. I don't like the .dae only 3d import, but if you use softimage xsi 6 or above the collada 1.4 import/export woks excellent and all clusters, nulls, mount points, lights, textures, etc. transfer well. I have been unable to find any other 3d package with .dae support that transfers things back and forth to torque, but I began my 3d explorations with softimage 3D from the irix to NT port 20 years ago.

The Torque world editor has an EXCELLENT shape editor for imported meshes. As you can see, you can ADD MOUNT POINTS and nulls and clusters and bones! It is so excellent to be able to add a mount point, light, camera point, particle emission null, etc. right in the editor and move the positions of them without having to load up the design package again.

Image082 Image083

The old softimage I learned on:

Softimage3D_392

There is also OGRE3D and Irrlicht but they are very geek oriented game engines. If you want to use ogre3d thoug, with its bump and normal mapping and even occlusion mapping, then this is a better start: Ogre-Irrlicht GameKit which is not just the bare bones ogre, but has OGL, animation, mouse, sound, bones, physics, etc. all linked up already as you can see on the left of the VS2010 in the background which was used to compile it. Its a good starting base and it compiled and ran better right off than the base ogre which has nothing linked up by default. be Warned, both ogre and irrlicht use the horrible online only wiki docs that GNU crap is famous for, so you can't study unless you download all the pages of dox you want. I have an offline dev box so its a super pain. But GameKit made me happy with Ogre3d as it compiled and ran perfectly.
Image075
Image076I like this the best in the repository:
Its blender 2.5 with the gamekit latest build installed and the executeable for both dx and pure ogl.
I am currently working on im[plementing the bump mapping normal map shaders to import files.
Anything that can import into blender will go into it!!!
It is waaaaay cool.

Gamekit-blender-2.54-beta-windows32

http://code.google.com/p/gamekit is the main repository

Image080 Image081

I figured out the .dds localmap problem so I can work with the compressed normal maps in my mod folder, speeding up dev test time:
Doom 3 uses the ATI compressionator program
not the nvidia dds tools

from katsbits:
IMPORTANT NOTE

The UberCompression filter needed by this tutorial to get correctly functioning RxGB compressed normal maps (with or without alpha channels (masks)) for Doom 3 powered games has been removed from the general application interface. At time of writing it's not known if the ability to compress via the command line method is still viable.

To create 'correctly' compressed DDS files download the Compressonator v1.21 from the link provided below.

Please note: this is the officially released version of the tool and not some hacked and redistributed file. It is provided in a zip file 'as is'..

Download idtech 4 compatible Compressonator from katsbits

Note : There's a potential problem some may have when installing the Doom 3 compatible version of the Compressonator onto a fresh Windows (cleaned) install. Apparently ATI didn't include a couple of commonly used DLL files in the *.msi self extracting installer as they were most likely relying on the missing files to have been installed by other programs. It does mean however, the program errors out because it can't find them.

There is a temporary 'fix' for this (reported but not doubled checked) which requires the installation of the new version of the Compressonator, which does appear to include the missing DLL files. However, once that is installed it (and the DLL files placed) it may need to be uninstalled as it potentially causes conflicts with the older version. A recent test with both applications installed didn't reveal any problems so this may not effect everyone if indeed anyone.

What are DDS exactly? ^

DDS is an acronym for 'Direct Draw Surface' and as you might guess from the reference to 'Direct Draw', it's part of Microsoft's graphics 'API' (Application Program Interface) for their Windows operating system environment; Direct X to you and me!. What it's for, or rather, what it does, is allow content creators the ability to compress images using a number of different algorithms depending on the needs of the content originators; Doom 3 powered games for instance use 3 different algorithms for the assets used in game; DXT1, DXT3 and DXT5. This tutorial will cover DXT5 and the compression of a localmap (normalmap).

Another tool that is useful is Njob
http://charles.hollemeersch.net/njob

And I often use a couple of the extra utilities in xNormal

As an ending?
I actually think I am switching to idtech 4 since I am a bump map normal map fanatic.
If I could get basic profile occlusion from the normal mapping I would be in heaven.
Its not such a great engine for large outdoor stuff,
but the patch meshes, glow textures, normal maps, triggered and emissive textures, and nice specularity effects rock. I like every test map I have better than the ut ones.
The vehicle support sux, but its there
So I'm going to start building from there...
Image078

Image079
Type editguis in d3, q4, or prey for the gui editor. The pdaa editor is editpdas

No comments: