Renderbox weirdness

DarkHorizon

25-03-2009 18:02:17

Hello,

In using the renderbox to display an overview camera, I have found that the renderbox is using some sort of alpha, and is partially displaying the colored window background (which is the default blue).

A screenshot:


In the image, you can see our beloved ninja nearby three kinds of terrain (grass, mountain, and forest). In the overview window, it appears there is some bluish color on the transitions between textures, but in the world view, there of course is no such artifact.

I have set the renderbox background color ("setBackgroungColor()") in the GUI editor as well as in code, with no luck.

The material script for terrain:
material Terrain_Shader_Hi
{
receive_shadows on
technique
{
///////////////////////////////////////////////////////////////////////
// Sand

pass
{
ambient 1 1 1
diffuse 1 1 1
texture_unit
{
// Base Texture
texture 512_Sand.png 2d unlimited alpha
scale 0.0005 0.0005
}
}

///////////////////////////////////////////////////////////////////////
// Mountain

pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend

texture_unit
{
// Splat Texture
texture 2048_Mountain.png
scale 0.0009 0.0009
}

texture_unit
{
// Detail Texture
texture 512_Frozen.png
colour_op_ex modulate_x2 src_current src_texture
scale 0.001 0.001
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Mountain.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

///////////////////////////////////////////////////////////////////////
// Grass

pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend
depth_func equal

texture_unit
{
// Splat Texture
texture 1024_Grass.png
scale 0.0005 0.0005
}

texture_unit
{
// Detail Texture
texture 1024_Grass_2.png
colour_op_ex modulate_x2 src_current src_texture
scale 0.0005 0.0005
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Grass.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

///////////////////////////////////////////////////////////////////////
// Forest

lod_index 0
pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend
depth_func equal

texture_unit
{
// Splat Texture
texture 1024_Forest.png
scale 0.0009 0.0009
}

texture_unit
{
// Detail Texture
texture 2048_Detail_Light.png
colour_op_ex modulate_x2 src_current src_texture
scale 0.0009 0.0009
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Forest.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

///////////////////////////////////////////////////////////////////////
// Swamp

lod_index 0
pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend
depth_func equal
texture_unit
{
// Splat Texture
texture 512_Swamp.png
scale 0.0009 0.0009
}

texture_unit
{
// Detail Texture
texture 2048_Detail_Light.png
colour_op_ex modulate_x2 src_current src_texture
scale 0.0009 0.0009
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Swamp.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

///////////////////////////////////////////////////////////////////////
// Dirt

lod_index 0
pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend
depth_func equal

texture_unit
{
// Splat Texture
texture 512_Dirt.png
scale 0.0009 0.0009
}

texture_unit
{
// Detail Texture
texture 2048_Detail_Dark.png
colour_op_ex modulate_x2 src_current src_texture
scale 0.0009 0.0009
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Dirt.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

///////////////////////////////////////////////////////////////////////
// Cobble

lod_index 0
pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend
depth_func equal

texture_unit
{
// Splat Texture
texture 512_Cobble.png
scale 0.0002 0.0002
}

texture_unit
{
// Detail Texture
texture 2048_Detail_Light.png
colour_op_ex modulate_x2 src_current src_texture
scale 0.0009 0.0009
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Cobble.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

///////////////////////////////////////////////////////////////////////
// Glacier

lod_index 0
pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend
depth_func equal

texture_unit
{
// Splat Texture
texture 512_Glacier.png
scale 0.001 0.001
}

texture_unit
{
// Detail Texture
texture 512_Frozen.png
colour_op_ex modulate_x2 src_current src_texture
scale 0.001 0.001
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Glacier.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

///////////////////////////////////////////////////////////////////////
// Snow

lod_index 0
pass
{
ambient 1 1 1
diffuse 1 1 1
scene_blend alpha_blend
depth_func equal

texture_unit
{
// Splat Texture
texture 512_Snow.png
scale 0.0009 0.0009
}

texture_unit
{
// Alpha Map
texture 2048_Alpha_Snow.png 2d unlimited alpha
tex_address_mode clamp
colour_op_ex blend_diffuse_alpha src_current src_texture
}

}

}
}


The code for setting up the renderbox:
MyGUI::RenderBoxPtr rb = MyGUI::Gui::getInstance().findWidget<MyGUI::RenderBox>("Overview_rbViewport");
if (rb)
{
rb->setBackgroungColour(Ogre::ColourValue::Black);
rb->setCamera(m_lpRadarCamera);
}


Is there something I can do for this?

I'm using recent (last 2-3 weeks) MyGUI code, Ogre 1.6.1, VS2005 SP1, Windows XP SP2, Geforce 7600GS, Nvidia drivers (v6.14.11.8208 from 2/18/2009).

Thanks,