15 Mar 2012

Paging & instancing

I finally succeeded to make paged vegetation using Ogre's paged component. I choose to go this way, instead of using the PagedGeometry plugin because I wanted to minimize dependencies of my application, and also because I wanted an unified paging system (and was a little curious about how it works underneath too!). As I was already using Ogre's paged component for terrain, I choose to take some time to implement PagedGeometry features directly... Here are the results (note that the tree model is horrible, but it's ok for my tests):




Each tile contain 50 instanced entities (using Ogre's new instancing manager system), batched together. The performance is quite good, I have a nice 2100 fps on my 2 year old computer :). Each tree is, for the moment, randomly positioned/oriented/scaled on page loading.
Next stage will be to generate impostors for far tiles, see how to implement paged grass, saving pages, and integrate the instancing shaders in my deferred engine.

15 Jul 2011

Ogre deferred terrain

I tweaked Ogre's terrain material manager to use terrain component with deferred shading. I had to look at Ogre::TerrainMaterialGeneratorA class in depth, and create my own. That was a bit of work, but I got almost everything working, here what I have for now:
GBuffer aldebo:

GBuffer Depth (and specular power):

GBuffer normals:

Final image:
 

I still have to implement terrain shadows with this deferred pipeline.