Some questions, is that possible?

Xavyiy

14-08-2007 12:24:28

Hi I'm a noob with PLSM2!, I have some question:

It's possible put a dinamic texture in the terrain, like this:

http://pcmedia.ign.com/pc/image/article ... 051053.jpg

The ( ! ) simbols in the terrain,etc, but controlled by the program: after X secongs we remove this texture in the terrain, or the possibility of change this of place(like a texture in the terrain under the mouse cursor,etc).
And how I can do it,there're any sample/tutorial?

And the other question is about lighting: if I configure the terrain( TsmTerrain ) with this configuration:

Deformable=yes
VertexCompression=no
VertexProgramMorph=no
VertexNormals=yes
VertexLit=yes


I have only the Ambient light over the terrain, but no other lights.How I can configure the terrain for work with dinamic lights?

Sorry for my very little English!!

Thanks.

Cutter

14-08-2007 22:51:12

Hi,
these signs on the terrain are called Decals. See http://www.ogre3d.org/wiki/index.php/Mesh_Decals.

Xavyiy

15-08-2007 19:47:14

Thanks, I'm going to investigate it!

Xavyiy

15-08-2007 22:51:39

I'm traying to implement it, but when I create the MovableObject* the program crash.

Here is my code:

mEscena->mSceneManager->setWorldGeometry(Ogre::String("paginglandscape2.cfg"));

Ogre::MovableObject *a = mMapa->CreaDecal("Hola","Examples/OgreLogo", Ogre::Vector2(256,256));


the CreaDecal funtion:

Ogre::MovableObject* Mapa::CreaDecal(const Ogre::String name, const Ogre::String materialName, const Ogre::Vector2 size)
{
Ogre::NameValuePairList params;
params["materialName"] = materialName;
params["width"] = Ogre::StringConverter::toString( size.x );
params["height"] = Ogre::StringConverter::toString( size.y );
params["sceneMgrInstance"] = mEscena->mSceneManager->getName();

return mEscena->mSceneManager->createMovableObject( name,
"PagingLandScapeMeshDecal",
&params );
}


and the Examples/OgreLogo material:

material Examples/OgreLogo
{
technique
{
pass
{
depth_bias 1

texture_unit
{
texture ogrelogo.png
}
}
}
}


What's fails? Thanks!