Splatting and popping

Ajare

30-04-2006 13:34:16

I'm just looking around PLSM2 at the moment. I only really need the simple texture-splatting, but it seems rather ugly in the demo scene. Namely, what appears to be a detail texture isn't blended with the others until you get close. Also, there is quite a lot of vertex popping near the camera. Are there any settings that can control these? I've just been playing about with the included demo so far, and it's the same for both the included terragen terrain, and ones that I've made myself.

image 1
image 2

Falagard

30-04-2006 16:13:30

There are a couple problems with the default stuff generated by PLM2:

The splatting materials are set up to use mirror UVs, which look like garbage. I'm going to lobby Tuan to remove the "mirror" from the materials, but you can do it yourself and see the difference.

The textures are also really bad. Try changing them to your own.

As far as the popping, control that with the max pixel error setting, and turn on vertex morphing and you're set.

Ajare

01-05-2006 02:35:09

I see what you mean about the mirrored textures, yes they don't look great, but shouldn't be too hard to fix. However, I'm still not sure what's going on with the rock texture that seems to suddenly appear when you get close enough. Hopefully this video (xvid) explains what I mean.

Falagard

01-05-2006 03:17:30

It's not too hard to fix at all (mirror) just go into the splatting2.material file and remove the mirror_uv setting ;-) Let me check out your vid.

Falagard

01-05-2006 03:24:32

That ones more difficult. When the mapsplitter runs it creates splatting alphas and base texture. The splatting material has a "technique" set up to use splatting at a certain distance, and then uses Ogre's built in material level of detail to switch to the base texture at a certain distance.

The base texture doesn't look very good - it's just created using colours specified in the .cfg file.

I'm planning, eventually, to work on code to do a render-to-texture of the terrain from above, for each page, so that it looks exactly like the splatting version does.

Your options are:

1. Deal with it until the render to texture functionality is ready (months).
2. Work on the render to texture functionality yourself
3. Set the LOD distance to far enough that it never uses the base texture.

tuan kuranes

01-05-2006 12:52:40

@Falagard: which adress mode is best then ? (Feel free to commit any visual improvments like better scripts, textures, etc...)

Falagard

01-05-2006 14:54:39

The best uv mode is tiling (default). Tileable textures don't look good with mirror, since they were created to look good when tiled.

Ajare

01-05-2006 15:52:14

Ok, I removed the mirroring easily enough, but I'm still having problems with the material LOD. I'm changing the 'lod_distances' parameter in splatting2.material, but it doesn't seem to affect anything. (This is for the 'terragen_genrated' terrain in the demo app, which I believe uses splatting2).

Thanks for the help so far. :)

Falagard

01-05-2006 16:19:10

Try

MaterialDistanceLod=whatever

in your terrain cfg file. The distance in the material file is ignored, and changed by the OgrePagingLandScapeTexture_Splatting2.cpp code.

Take a look at OgrePagingLandScapeTexture_Splatting2.cpp for full details on what it's doing.

Ajare

01-05-2006 17:33:19

That did the trick, thank you.