Blending between multiple terrain textures

1 post Page 1 of 1
LukasPJ
Site Admin
Posts: 361
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Wed Feb 04, 2015 11:16 am
Hey guys.
I don't know if you have ever noticed it, but T3D has always had several bugs when rendering terrain textures.

First of all, the most apparent bug is a hard-cutoff you get when blending more than 2 textures together. This will look like this:

Image


When it should look like this:

Image


Secondly, the colors are all wrong.. Basically it applies the base texture everywhere, and then blends the other textures into that base texture (and a few other things go wrong in this process as well). So you get a terrain that looks like this:

Image


When it should look like this:

Image


Now, Daniel just accepted my PullRequest that fixes these issues, but here is what you need to be aware of!
You see, my changes fixes the terrain blending so it works just as intended... However, it seems the whole terrain system was built up around not working as intended, so one of the issues I faced is that the .dds format, is not a very good format for terrain textures. The compression means that sometimes the colors are getting squashed a bit over several pixels. Which isn't an issue for most textures, but for terrain textures it becomes a huge issue!

So if you find that, in future versions of T3D, your terrain is having some bad colors some places, then you should be aware of this pullrequest, which enables you to change the cached basetexture's format. You can select .png .jpg or .dds
On another note, these changes seems to have fixed the "angel-pee" color on the sand texture it seems:

Image


Not entirely sure why, but if it works...

Enjoy your new and nicer looking terrains! And I'll be looking at fixing my new terrain blending PR's asap, I just encountered some breaking issues when there are more than 3 textures, that I need to fix.
1 post Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest