Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tutorials and Resources

Closed Thread
 
Thread Tools
Old 02-07-14, 21:34   #1
Level NextGen
Member
 
Level NextGen's Avatar
 
Joined: Mar 2009
Posts: 1,502
Default Texture Rendering - Seamless textures IN-GAME [Border Issue]

Texture Rendering - Seamless textures IN-GAME [Border Issue]




Introduction:
The name of this tuto can be really tricky, but some of you might have spotted that their "seamless" textures don't look seamless anymore while playing the level.
I mean this:

Well it's quite normal, the rendering process of our old Editor isn't the best: bilinear filtering! You can have a look on this Wikipage to learn more about Texture Filtering.
Quote:
Bilinear filtering is rather accurate until the scaling of the texture gets below half or above double the original size of the texture - that is, if the texture was 256 pixels in each direction, scaling it to below 128 or above 512 pixels can make the texture look bad, because of missing pixels or too much smoothness.
In fact, today we used anisotropic (x16) and before there was the trilinear filtering which by the way:
Quote:
Trilinear filtering is a remedy to a common artifact seen in mipmapped bilinearly filtered images: an abrupt and very noticeable change in quality at boundaries where the renderer switches from one mipmap level to the next.

So what!? - cf Pink! We just need to tick trilinear filtering in the option of the executable to avoid this problem
Well right... but it didn't exist at that time or it was to powerful to be used in our old good games. So we can't! We have to cope with the bilinear filtering.



Here is the solution:
Happily (ever after) there is a solution!
As far as I remember this solution was introduced by Gecko Kid few time ago... But I can't see any thread dealing with this.

Anyway to solve this glitch, you should rework your texture with any photoshop tool. Take your texture, and at each boundaries (128x128 tiles is the common TRNG texture) you should copy one of the border line of pixel (1-width and 128-height - the size of your tile). Then paste it at the opposite border - where the texture is meant to be in loop or "seamless".

If you look at this image you can see, when the texture is copy-paste contiguously, there is a duplicated line of pixels on the "border". This is meant to work like a mirroring effect without rendering a mirror effect in-game. That's why the selection has to be only of 1 width.




And the render In-game:
So here is the render in game with the same previous texture. You can see that there is no more boundariers between the "Tiles".




Limitations and other:
About Tiles:
Before showing you the result in-game, you have to understand something with the "Tile". As said previously, the bilinear filtering create "an abrupt and very noticeable change in quality at boundaries". These boundaries are the tiles Tomb4.exe is rendering.

A tile is each different texture you create by cutting your TGA.

It means even if you are still using the same 128x128 textures but you are cutting into a 128x64 textures, you will have two different tiles from the same texture.
SO this process has to be made considering the cutting you do while building, if you want a perfect result. Doing this on every border might not be enough or too much...

About High-Quality:
When I want to have HQ texture I tried to apply a "Noise-effect" on my textures. Because a too smooth texture doesn't really work with bilinear filtering.
Here is an old example I had.
The textures weren't made by me. If the person recognize his/her work, please contact me. The original set is at the left, while the "HQ" set is at the right. I only added noise or sharpness to the TGA.

Last edited by Level NextGen; 26-05-16 at 15:24.
Level NextGen is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 12:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.