Hello,
At some time in the future when I'm not too busy with other things, I would like to start working on a game. Until then I've been thinking about the possible problems that might show up and how to solve them. One such problem is illumination and shadows.
First some information about the game: the geometry would be split in tiles, and a topdown camera would be used, so not a lot of geometry will be rendered at a time. Because this would be a hobby project, on the rendering side I do not intend to use the very latest technologies. My goal would be to have a Duron 1600 / 256mb RAM / GeForce 440 MX as a minimum system on which the game will run at an acceptable speed. I've been studing different engines, both 3D and 2D, but for now I'm leaning more towards Irrlicht mainly because I have more experience with it and because of the forum community.
The problem right now is what illumination techniques to choose. There are two categories: fixed functionality lighting, and programmable based. Using the first choice would allow the game to run on older hardware, but doesn't have the same graphic quality as shader based techniques. My aim would be something like the lighting in Morrowind or Neverwinter Nights 1, although that might be to lofty a goal, considering that although both games have pretty old graphics by todays standards, they were made by teams of profesional programmers.
Fixed functionality:
For vertex based lighting (Gourand) I've made some tests using IrrEdit, but sadly the quality isn't too good. Does anyone know any methods to improve this type of illumination? I've been thinking about subdividing the geometry, but that isn't a very good method mainly because you lose rendering speed, while only improving the quality a little.
Another method would be fake phong lighting.Here http://freespace.virgin.net/hugo.elias/ ... polyp2.htm is a description of the method. Using this method, the second texture layer of the object can be used to store the light decal texture, and the UV coordinates are calculated using the given equations. The problem here is that an object would be limited to illumination from only one light.
Programmable :
If the above techniques are to much of a headache to implement to give a good rendering quality, I could go with only shader-based illumination. In this case does anyone know if the majority of people have shader capable cards, or if there are still a significant number of older cards? For shaders what would be the minimum card that can run a version 1.1 shader at acceptable speed? I've used a GeForce FX5200 for some time, but while it does suport shaders, it's quite slow. If using this route, would it be possible to use something like 1 global light (the Sun/Moon) + 2-3 closest lights per object + shadows using a version 1.1 pixel shader (per pixel lighting) and
still run at an acceptable speed on older hardware?
For reference a list of a lot of graphic cards and their functionalities :
http://users.erols.com/chare/video.htm
Illumination
i wrote a demo program sometime back for displaying the values of the caps bits.
i'll dig in my basement and see if that code is still in there.
or...
you can write one yourself.
it's pretty much querying the card's caps, though.
hope that helps.
try this one: http://www.ozone3d.net/gpu_caps_viewer/
http://www.warp2search.net/gpu-caps-vie ... 37231.html
i'll dig in my basement and see if that code is still in there.
or...
you can write one yourself.
it's pretty much querying the card's caps, though.
hope that helps.
try this one: http://www.ozone3d.net/gpu_caps_viewer/
http://www.warp2search.net/gpu-caps-vie ... 37231.html
Thank you for the links. I've thought about giving the option to switch between shaders, and fixed functionality depending on the hardware.
There might be other methods for lighting which I haven't mentioned. For example lightmapping that can be affected by different lights. For the phong lighting technique I've found a nice document that explains projective texture mapping : http://developer.nvidia.com/object/Proj ... pping.html
I'll continue searching some more information.
There might be other methods for lighting which I haven't mentioned. For example lightmapping that can be affected by different lights. For the phong lighting technique I've found a nice document that explains projective texture mapping : http://developer.nvidia.com/object/Proj ... pping.html
I'll continue searching some more information.