Question about DotScene's Shadow

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
coderwu
Gnoblar
Posts: 4
Joined: Wed Mar 30, 2005 5:44 am

Question about DotScene's Shadow

Post by coderwu » Wed Mar 30, 2005 6:00 am

I use the Ogre 1.0.0 RC

Code: Select all

// Some Code
SceneManager* mSceneMgr;
SceneManager* mDotSceneMgr;

mDotSceneMgr = mRoot->getSceneManager(ST_GENERIC);
mSceneMgr = mDotSceneMgr;

// Set the SceneManager
mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE );

mSceneMgr->setShowDebugShadows( false );
mSceneMgr->setShadowColour( ColourValue( 0.5, 0.5, 0.5 ) );
mSceneMgr->setShadowDirectionalLightExtrusionDistance( 1000 );
mSceneMgr->setShadowFarDistance( 1000 ); 
mSceneMgr->setShadowIndexBufferSize( 30000 );
mSceneMgr->setShadowTextureSize( 512 );
mSceneMgr->setShadowTextureCount( 2 );
// mSceneMgr->setShadowTextureSettings( 512, 2 );
mSceneMgr->setShadowDirLightTextureOffset( 0.3 );
mSceneMgr->setShadowTextureFadeStart( 0.2 );
mSceneMgr->setShadowTextureFadeEnd( 0.8 );
mSceneMgr->setShadowUseInfiniteFarPlane( true );

mSceneMgr->setAmbientLight( ColourValue( 1.0, 1.0, 1.0 ) );

Light* pLightA = mSceneMgr->createLight( "LightA" );
pLightA->setType( Light::LightTypes::LT_DIRECTIONAL );
pLightA->setPosition( Vector3( 60, 80, 100 ) );
pLightA->setDirection( Vector3( -3, -4, -5 ) );
pLightA->setDiffuseColour( ColourValue( 1.0, 1.0, 1.0 ) );
pLightA->setSpecularColour( ColourValue( 0.1, 0.1, 0.1 ) );
pLightA->setCastShadows( true );

ResourceGroupManager::getSingleton().setWorldResourceGroupName("General");
mDotSceneMgr->setWorldGeometry( "Room_32.scene" );
	
ParseDotScene( "Room_32.scene", "General" );
I can see the scene. But I can't see the scene' shadow. why? Help me!

Thanks!
0 x

User avatar
DaesDemon
Goblin
Posts: 209
Joined: Thu Jan 22, 2004 3:59 pm
Location: Toulouse (France)

Post by DaesDemon » Thu Mar 31, 2005 5:54 am

Try STENCIL_MODULATIVE
or lower your ambientlight

I think with ambientLight to full, you cannot see ADDITIVE_SHADOW
0 x
Every Night and every Morn
Some to Misery are born.
Every Morn and every Night
Some are born to Sweet Delight,
Some are born to Endless Night.

Post Reply