nindim
16-02-2007 00:17:54
Scenemanager = PLSM2 CVS
OGRED SDK = 1.2.5 Dragon
TextureMode = PLSplattingShaderLit
Hi there, I have scoured both the wiki and forums for how to paint textures to the terrain, Ive come to the conclusion I need to do it something like the following:
int mChannel = 0;
float channelValues[4];
channelValues[0] = 0.0f;
channelValues[1] = 0.0f;
channelValues[2] = 0.0f;
channelValues[3] = 0.0f;
channelValues[mChannel] = 1.0f;
mScnMgr->setOption( "setPaintChannelValues", &channelValues);
Ogre::Real *brush = new Ogre::Real[100];
for (int i=0; i<100; i++)
{
brush=1.0f;
}
int width=10, height=10;
mScnMgr->setOption("BrushArrayHeight", &height);
mScnMgr->setOption("BrushArrayWidth", &width);
mScnMgr->setOption("BrushArray", brush);
mScnMgr->setOption("PaintCenter", &mInput->reticulePos);
I also have the "TextureModifiable=yes" in my maps .cfg file. What else must I do in order to get the painting working?
To be honest I'm not entirely sure how it all works with splatting etc. Seems like the coverage map is computed by mapsplitter and that decides which textures are seen where which would mean the only way to change splatting heights is to recompute the coverage map using mapsplitter.
I was under the impression (perhaps wrongly) I could set the heights and materials to use in the .cfg file of map and it would splat at the correct heights. Am i wrong in thinking this?
I've seen the goof editor which enables you to select a texture and use that to paint with, should I be setting the texture somewhere or is that simply changing the channel at which to paint on and thus showing that splatted texture?
If anyone could provide a deatiled explanation of how the painting works in plsm2 then I would really appreciate it, I'm sure many others would as well. If I have missed the info somewhere please link me to it. Thanks.
OGRED SDK = 1.2.5 Dragon
TextureMode = PLSplattingShaderLit
Hi there, I have scoured both the wiki and forums for how to paint textures to the terrain, Ive come to the conclusion I need to do it something like the following:
int mChannel = 0;
float channelValues[4];
channelValues[0] = 0.0f;
channelValues[1] = 0.0f;
channelValues[2] = 0.0f;
channelValues[3] = 0.0f;
channelValues[mChannel] = 1.0f;
mScnMgr->setOption( "setPaintChannelValues", &channelValues);
Ogre::Real *brush = new Ogre::Real[100];
for (int i=0; i<100; i++)
{
brush=1.0f;
}
int width=10, height=10;
mScnMgr->setOption("BrushArrayHeight", &height);
mScnMgr->setOption("BrushArrayWidth", &width);
mScnMgr->setOption("BrushArray", brush);
mScnMgr->setOption("PaintCenter", &mInput->reticulePos);
I also have the "TextureModifiable=yes" in my maps .cfg file. What else must I do in order to get the painting working?
To be honest I'm not entirely sure how it all works with splatting etc. Seems like the coverage map is computed by mapsplitter and that decides which textures are seen where which would mean the only way to change splatting heights is to recompute the coverage map using mapsplitter.
I was under the impression (perhaps wrongly) I could set the heights and materials to use in the .cfg file of map and it would splat at the correct heights. Am i wrong in thinking this?
I've seen the goof editor which enables you to select a texture and use that to paint with, should I be setting the texture somewhere or is that simply changing the channel at which to paint on and thus showing that splatted texture?
If anyone could provide a deatiled explanation of how the painting works in plsm2 then I would really appreciate it, I'm sure many others would as well. If I have missed the info somewhere please link me to it. Thanks.