Hey guys,
Alex Pölloth (
Kartoffel) and I present the
Atrium Demo for Gamestudio A8.
It features the
Sponza Atrium scene by
Frank Meinl (Crytek), which was reworked and enhanced in Cinema4D and exported to Gamestudio A8 by me; the scene was arranged in WED and comes as WMP file. I also created some textures anew and remastered some other ones; they are all saved as DDS files. Two skycubes from Emil Persson (
Humus) were added, too. All models were split at their hard edges in order to have proper vertex normals. The demo features a day setting with directional sunlight and a night setting with a slight directional moonlight, a handful of colored pointlights and a colored spotlight.
The key feature of this demo is not only the Atrium scene itself (it is rather static, though), but the included "fxObj" object shader, which was initially written by Kartoffel and further extended and modified by me. The shader provides per-pixel lighting and shading and supports up to eight directional-, point and spotlights. It supports normalmapping with specular map and detail normalmapping. The shader uses the engine's sun color, the level ambient and fog.
The shader is procedural and can be customized for each entity with flags. You can seperately specify if a model has a normal map, a spec map and a detail map or not; if the model should be rendered doublesided (e.g. vegetation); and what kind of surface it has, e.g. if it is a solid surface (e.g. walls) or overlay surfaces (e.g. foliage, plants; activates the OVERLAY flag) or cutout objects (e.g. chain textures), or, if it is a static surface (deactivates the DYNAMIC flag). The order of skins is always 1) diffuse, 2) normal map, 3) spec map and 4) detail normalmap. If you render a distant object, you can even specify that an entity has a normal map, but is rendered without normal mapping. If you don't select any flags, the entity is "just" rendered with per-pixel default lighting - which looks even better than the standard engine lighting!
Examples:
action stoneWall ()
{
// static, solid object with normalmapping, specular map and detail normal mapping
fx_obj(my, FX_OBJ_STATIC | FX_OBJ_SOLID | FX_OBJ_NM | FX_OBJ_SPEC | FX_OBJ_DETAIL);
}
action vegetation ()
{
// overlay object with normalmapping, specular map and double sided rendering
fx_obj(my, FX_OBJ_OVERLAY | FX_OBJ_NM | FX_OBJ_SPEC | FX_OBJ_DOUBLE);
}
action lattice ()
{
// cutout object with regular (per-pixel) shading
fx_obj(my, FX_OBJ_CUTOUT);
}
Plus, the demo comes with a sky cube module + shader ("fxSkycube"), that allows you to create skycubes which can be rotated, found by name, displaced and stretched towards the horizon; and other neat stuff.
For more images, watch the following
slideshow on flickr or download the demo and its sources from here:
Atrium Demo v0.01 2013-04-18 (~40 MB)http://www.christian-behrenberg.de/files/dev/demos/atriumdemo-0.01-2013-04-19.zip It was tested with A8.40.3 and we hope that this is useful for anyone.
What's next?
Well, the project was driven by the need to have a cool multipurpose per-pixel shader that can catch up with commercial games. It looks quiet good, we are pleased with the results. But there is still so much to do and to support (e.g. lightmaps, AO, emissive textures, cubic environment reflections... and so on). Maybe we can pull other demos or enhance this one, I don't know. Though, I have the strong belief that the procedural flag-based approach is a good and convenient one, although I imagine that the interface might change if new features come into play... we'll see.