Custom render queues in Dagon

· by Steve · Read in about 2 min · (409 Words)

I’m just about to commit the final part of the implementation of another one of my TODO items in Dagon, ‘Custom Render Queues’. OGRE has always used the concept of a render queue to build up a list of things to be rendered in the frame, partitioned by ‘queue group’ to enable separation of things like skies, overlays and custom effects where ordering is important, groups the ‘solids’ by pass state to minimise render state changes, and orders transparent items by descending view depth. All pretty straight forward 😉 There are a few more advanced features in Azathoth (1.0.x) like turning off queue groups temporarily (‘special case render qeues’, useful for things like render to texture effects) and using a RenderQueueListener to allow the app to tweak things during the sequence.

Dagon builds on this even more. You can use all these existing features, but now you can also define custom queue group invocation sequences (essentially allowing you to completely reorder, repeat and skip queues) which you can link to a viewport for custom sequences. You can also change the way objects are ordered, say if you needed a global depth-sort on solids too rather than the renderstate change grouping. Finally, you can tell OGRE to suppress it’s own shadow and / or render state handling during a particular invocation, so you can completely control the state of the renderer whilst the invocation of a given group occurs. This, coupled with RenderQueueListener (which now takes an additional parameter when called back, an ‘invocation name’ so you can differentiate between multiple invocations of the same queue group), allows you to perform some pretty advanced effects, should you want to - it essentially gives you to power to drive the renderer completely manually when you need to, but still integrated in the OGRE queueing system such that all plugins and custom objects will continue to work the same way.

Of course, you can also completely ignore all this if you want and let OGRE handle it all for you as before. 😀

Still on my personal list for Dagon is enhancing the XSI exporter to support shape animation (morph / facial animation), particle trails aka ribbon particles/ billboard chains (which I’ve already committed the base classes for, and have done some design for the changes required to particle systems), possibly point sprite rendering (_mental_ may in fact be around over xmas to help with that though), and a few smaller things.