Page 1 of 1

Expose 'debug rendering' materials

Posted: Sat Dec 27, 2008 3:32 pm
by nullsquared
Maybe I just haven't found it, but currently there's no way to tell Ogre what material to use for rendering AABBs, debug shadows, debug skeletons, and so on. I think it just goes on its own and uses BaseWhiteNoLighting, etc. This isn't exactly a flexible way of doing it once you introduce a deferred renderer :D. I 'fixed' it by unloading BaseWhite and BaseWhiteNoLighting before loading in my own alternatives, like:

Code: Select all

// colour_template plays nicely with each of the engine's renderers, forward and deferred
material white : colour_template
{
    set $colour "1 1 1 1"
}

material BaseWhite : white
{
}

material BaseWhiteNoLighting : white
{
}
It'd be nicer if maybe something like SceneNode::getWireBoundingBox() exists, or more simply, SceneNode::setDebugMaterialName(), or maybe SceneManager::setDebugMaterialName().

Re: Expose 'debug rendering' materials

Posted: Sun Dec 28, 2008 8:21 am
by Praetor
This stuff has been on the TODO for a while. The whole debug renderable system needs to be tweaked. I believe the TODO mentions the debug renderable geometry specifically, but materials should probably be revised as well.