четверг, 30 декабря 2010 г.

I am working currently on memory management for the engine, done a lot..later about it in details..

now about arrays. Everybody knows, that dynamic allocation is bad thing, especially in optimized applications. Fragmentations, locks, time to find free block etc. General advice is to avoid any kind of dynamic allocation in update loop. So I decided to remove it everywhere and move all dynamic data to the stack.

There were many std::vectors, std::strings in the source, around 700 cases of using std::string, same for vector. Firstly I changed vector into C arrays, but it's not convenient to use. After that I found boost::array, but it's not dynamic.

So my decision was to create mix of boost::array and std::vector, it's based on sources of boost::array, but has ability to dynamically grew (one additional variable m_size).

Useful and looks optimal.

UPD. maybe not so optimal for complex objects with not simple constructors and also for big object, but optimal for pointers and simple types.

понедельник, 20 декабря 2010 г.

SIGGRAPH Asia 2010

I visited SIGGRAPH Asia 2010, it was interesting. Several courses was attended, number of interesting people was met. Tessellation is still hot theme, it was discussed heavily in DirectX 11 and OpenGL 4.0 courses. Also Realtime Ray Tracing and stereoscopic rendering.

среда, 15 декабря 2010 г.

Post processing pipeline started

Previous week was spent on post-processing. Pipeline is implemented in the engine now. Also motion blur done as post-process (built from Geometry Buffer, described here ) and can be safely disabled. My paper library became useful.

This motion blur goes from camera movement, per-object motion blur will be implemented later (per pixel velocities will be saved in Geometry Buffer).

Motion blur in action, kernel from 15 samples:




Original scene:



Several post-processing effects are scheduled - glow pass (blur bright parts of the scene),
Analytical Anti-aliasing, Depth of Field and more.

Mirrors and reflections (deferred) are started.

воскресенье, 12 декабря 2010 г.

very inspirational reading, Shishkovtsov is smart guy
http://www.eurogamer.net/articles/digitalfoundry-tech-interview-metro-2033

especially deferred reflections - so simple idea to make reflections in deferred shader! just render reflected attributes (position, normal etc) into Geometry buffer and draw as usual.

also I am thinking about implementation of Exponential Shadow Maps after reading it.

I read the article half of year ago and have rewritten engine significantly after that. Thread pool was added, engine was detached into several parts etc.

воскресенье, 5 декабря 2010 г.

Update




Plan for November for Editor development was over-fulfilled. Over 30 tasks was implemented in time.

New features:
  • editable scaling
  • asset preview for sounds, scripts and textures
  • skyboxes (simple, without any dynamic)
  • new gizmos for move, rotate, scale entities

среда, 1 декабря 2010 г.

Normal texture trick

I found interesting trick for accessing normals from textures.

Capcon's DXT trick - http://code.google.com/p/nvidia-texture-tools/wiki/NormalMapCompression


Shortly, it allows to use DXT1 and DXT5 bump textures with same shaders.
It's important for editor because bump texture in DXT5 will be ready only at the last stage -
game packaging. There will be small difference in object appearance during in-Editor testing because DXT1 is not good for normals, but I think it's acceptable.