viblo2
09-08-2006 00:05:58
I have a couple of questions regaring plsm2 and splatting, deforming and painting. I cant get them to work correct (if it is at all possible): The plan is to have realtime deformations, realtime painting and finally have the realtime deformations affect the terrain splatting (raise some ground -> might turn to snow). Is this a realistic goal? If so:
1. Terrain painting. From the wiki and a couple of posts here, it seems like you need to set the TextureFormat to *Edit, e.g. SplattingShaderEdit. But then I get assertion failed on line 364 in OgrePagingLandScapeTexture.cpp. I guess it must be something simple Ive missed?
2. Deformation works ok, but it doesnt affect the splatting. I have tried most TextureFormats (except *Edit, see 1.). Is it possible to have them affect splatting?
3. Lets say I want to write my own shader, can I just take PLSplattingShaderLit and work from there, or are there any special magic thats needed?
I have tried the latest version of plsm2 from CVS. I use PyOgre, so I have created a small wrapper for plsm2, but I don't think this should affect anything? The code for painting is:
where setBrush sets the brush w/h and then setBrushArray, and the others are direct wrappers of thier Option equivalent, i.e. setOption("PaintChannelValues", p).
It feels like I have missed something very simple.. anyone got a clue?
1. Terrain painting. From the wiki and a couple of posts here, it seems like you need to set the TextureFormat to *Edit, e.g. SplattingShaderEdit. But then I get assertion failed on line 364 in OgrePagingLandScapeTexture.cpp. I guess it must be something simple Ive missed?
2. Deformation works ok, but it doesnt affect the splatting. I have tried most TextureFormats (except *Edit, see 1.). Is it possible to have them affect splatting?
3. Lets say I want to write my own shader, can I just take PLSplattingShaderLit and work from there, or are there any special magic thats needed?
I have tried the latest version of plsm2 from CVS. I use PyOgre, so I have created a small wrapper for plsm2, but I don't think this should affect anything? The code for painting is:
color = [0.0, 1.0, 0.0, 1.0]
r = plsm2.realVector()
for i in color:
r.append(i)
sceneManager.setPaintChannelValues( r )
sceneManager.setBrush(self.paintBrush)
sceneManager.setPaintCenter( v )
where setBrush sets the brush w/h and then setBrushArray, and the others are direct wrappers of thier Option equivalent, i.e. setOption("PaintChannelValues", p).
It feels like I have missed something very simple.. anyone got a clue?