Texture seams in TerrainPage

I noticed that a customized TestTerrainPage shows slight texture seams where TerrainBlocks meet. (could also be lighting?)

This is best noticed when using a relatively small image based height map terrain (65x65 for example) with a mountain in the middle and let split it into 4 terrain blocks.

The distortion is not equaly noticable from all sides so one has to move around the terrain to notice it.



I also noticed some (texture?) artifacts when moving far away ( > 2000f) from the terrain page but that could be my integrated graphics card.



i’m using cvs from around past week btw.



edit: on a second thougt: could this be the vertex normal gerneration, not taking into account the adjacent faces that are on the next terrain block ?

Are you applying a detail texture? (a secondary texture) If so, what wrap mode are you specifying? Texture.WM_WRAP_S_WRAP_T is generally what you want to use.



Also, if you leave on lighting and turn off texturing you’ll be able to tell if it’s normal generation. I’d be surprised though… (not the first time, hehe)

I concur, please create a bug in the issue tracker (you’ll need to be an Observer for the jME project).

done

Hmm, thought we already stamped this out, mojo… must be particular circumstances that still have it.

Maybe i’m getting this totally wrong but as i understand it a terrain block of a terrain page is built of part of a height map and never gets to know more of the map.

I can see no way of calculating the normals on the edge - vertices of the block correctly without knowing the surrounding vertexes on other parts of the map ??

Nah, you’re right. Mojo and I went over seams for a long time… i think we got them as good as they are now and finally decided to table it for a while (if you think these seams are bad, you should have seen the older cuts.)



I’ve created new code that eliminates the seams on a terrainpage by terrainpage basis. IOW, the seams are gone inside an individual page but not between pages. To eliminate the interpage seams, some code just needs to be filled in on two private methods in TerrainPage. I’ll work on that and check it in as soon as I can.

woah ! seams in page gone, solved already ?

Thanks for the fast response but i didn’t mean to put you in a hurry with this.

It’s as You said, not as badly noticeable.

Almost, not checked into cvs yet though :slight_smile:



Yeah, I know it’s barely noticeable, but I’m sick today so why not do jME. :wink:

Ok, have a look at the results:



old:





new:





As soon as I can untangle a few .9 changes, I’ll check in the fix. Please note there is still a chance at the very corner of pages and blocks to have a very small seam showing. I suppose it’s possible to fix this, but I’m not going to bother now because it would be a lot of new code for something very small.

sigh… above is me, not logged in of course. :frowning: