Terrain painting broken?

Falagard

13-04-2006 03:07:05

Tuan,

I think terrain painting is broken, or perhaps I'm missing something. The plm2 demo doesn't have terrain painting, right, just deform?

I'm using splatting2edit. First thing, I noticed that there's a mSupportModif in PagingLandScapeTexture that if false, will not update the texure after painting, and I assume the splatting2edit should have that setting to true but currently don't. After setting that to true, the upload() function gets called when I paint the terrain, however I'm not seeing the updated splatting texture rendered.

When I exit, I get some Alpha .modif png files created that DO show the modifications I've made, although where I've painted seems to be tiled unexpectedly in the .modif files. If I rename the .modif files to overwrite the original Alpha files and load the terrain I see what I painted, but it is tiled multiple times across the terrain.

The PagingLandScapeTexture_Splatting2Edit::upload() function is getting called etc.

Thoughts? I looked at the code, but since you're more familiar with it, I'd bang my head against the wall for days or weeks probably before finding something you might in an hour.

Here's a screen of the unexpected tiling, and the actual alpha png file where you can see it's not just a UV problem, the painting has actually been painted tiled into the alpha splatting texture.




Let me know if you can help, or if there's any other info you need from me.

Clay

tuan kuranes

13-04-2006 09:26:07

It appear to upload a bad texture square on GPU and update wrong part of texture. Surely related to the lately introduced "Texturestratchfactor" that allow texture bigger than heighmap size which was a bad limitation, but that do increase a lot complexity of painting...

I'll look into that.

Falagard

13-04-2006 18:35:44

Thanks dude

Falagard

19-04-2006 03:58:15

Any luck with this?

Falagard

20-04-2006 05:11:05

It might be the texturestretchfactor, but if it is, I can't find it after a bit of stepping through in debug. My texturestretchfactor is 1.0, so it seems to always be just multiplying by 1.0 in various places, which doesn't do anything.

tuan kuranes

21-04-2006 21:22:11

Made some changes in CVS.
Not working perfectly but at least visually works.

Sorry for the delay and lack of time lately, my oldest son just had chicken pox, and that was hard time.
My daughter should have it very soon too, so I cannot guarantee that I'll fix it completly.

Feel free to try to fix it, as it should be easier now.