tile-based texture mapping

Xmas

Porous
Veteran
Supporter
This is a bit of research I did as part of my diploma thesis which I finished recently. Li-Yi Wei has done some interesting work with tile-based texturing on GPUs using Wang Tiles to avoid texture repetition (http://graphics.stanford.edu/papers/tile_mapping_gh2004/ and a chapter in GPU Gems 2). I developed some extensions to that kind of method, mostly to allow tiles to be laid out in non-regular grids. The diploma thesis is written in German, but I thought someone on these boards might be interested in the methods I tried for tile-based texturing, so here's a short summary. Maybe I'll do a translation of the interesting parts.

The first thing I did was an alternating indentation of tile rows, with some random jitter. This is useful in conjunction with "real" tiles, as can be seen here. Tiles are used mirrored and rotated as well, and vary in brightness.

Then I tried to implement a decal layer with tiles, which might be useful for mass decals. The decals can be positioned freely, but there's kind of a border around them so they can't be close to each other, or even overlap. Here's an example image that shows flowers as a decal layer on top of a repeating grass texture. As you can see, the flowers are not arranged in a grid. I'm not an artist, so excuse the poor choice of textures ;)

Maybe the most useful technique I developed is using tiles of different widths. This allows textures with proportional font text to be created on-the-fly, with very high resolution. If you want to have readable book or newspaper pages, labels, etc., this can save a lot of memory. Here's an example with text, but this technique is also useful for other kinds of surfaces, like a brick wall. The placement of the bricks isn't perfect here, but that can be improved easily (just a content question). I think it still shows very well what kind of irregular textures you can achieve with only 15 small tiles/bricks.
 
Very cool work!

Where this could be very useful is in conjunction with texture-heavy techniques such as "bidirectional texture function" rendering. Small patches of BTF data require large amounts of storage. But if you could irregularly tile it, it becomes feasible in a lot more situations.
 
Very interesting. I looked at Li-Yi Wei's slides though, and it says that it doesn't work with mipmapping, which would reduce the usefulness of this technique quite a bit.
 
Humus said:
Very interesting. I looked at Li-Yi Wei's slides though, and it says that it doesn't work with mipmapping, which would reduce the usefulness of this technique quite a bit.
It does work with mipmapping, though there are a few problems with higher levels of (edit: ) minification. There are a few things you can do to alleviate this, and it can be fully solved if you precalculate a smaller version of the virtual texture (say, 256x256) and use it for the lower mipmap levels. If you set alpha to 0 in the base level of this texture, and to 1 in all subsequent mip levels, you can use trilinear filtering to smoothly fade in this texture. And if you set MagFilter to linear or point, the cost of this additional texture is a single cycle as long as you don't need it.

But it depends a lot on texture content. Often you don't even need this because the artifacts aren't visible.
 
Last edited by a moderator:
This reminded me of aths' work with his own tile renderer. Nice to see you solved problems with tile repetition and arbitrary placement.

If you're running up on issue with texture projection and filtering tile boundaries because the tiles are small, aths' method of rendering a noise surface on top seemed to help.

I need to resurrect my Wang benchmark that I gave up on (was sort of using it to measure texture caches). A translation of your thesis would be cool to see :D Nice work!
 
Rys said:
This reminded me of aths' work with his own tile renderer. Nice to see you solved problems with tile repetition and arbitrary placement.

If you're running up on issue with texture projection and filtering tile boundaries because the tiles are small, aths' method of rendering a noise surface on top seemed to help.
What aths did is offline generation of tile textures, which of course hits the texture size limit of the hardware quite fast. I'm not aware of having solved any problem with tile repetition, except by using more tiles and way larger virtual textures. ;)

I don't see how high-frequency noise could help with artifacts that only appear with heavy minification (not magnification as I wrote before).
 
Ah, I thought he was stitching small tiles in realtime in that app, not generating them offline :oops: And you solve repetition quite well in my eyes by varying tile edge and tile brightness :p

Your screenshots look good, anyway.
 
Mate Kovacs said:
Have you seen this? There are some interesting ideas about tiled textures (boundary constraints, etc).
Interesting read. Seems like they're doing a fixed mapping of tiles to geometry, something I specifically tried to avoid. Boundary constraints are already a part of the Wang Tile approach.

http://www-viz.tamu.edu/faculty/ergun/research/textures/tiledtextures/talk/
Fundamental breakthrough of our method
Using numbers to identify the boundary types instead of letters.
:LOL:
 
This is very interesting, although a tad disappointing it requires quads. How efficient do you guys rate this for less arbitrary structures (like, say terrain)?
 
Mordenkainen said:
This is very interesting, although a tad disappointing it requires quads. How efficient do you guys rate this for less arbitrary structures (like, say terrain)?
Which technique, and what kind of efficiency do you mean exactly?
 
Xmas said:
Which technique, and what kind of efficiency do you mean exactly?

This later one: http://www-viz.tamu.edu/faculty/ergun/research/textures/tiledtextures/

My question relates to how useful would this be for terrain or other fairly predictable surfaces. Specifically, I can see the worthiness of this technique for arbitrary structures shown in the paper since distortion is an issue and the synthethic factor could possibly help cut down development time (efficiency).

With terrain you have e.g. vertex texturing and other techniques to reduce distortion and generate randomness. The poly mesh for terrains is also much less prone to distortion since surfaces are more predictable. Would "Tiled Textures" be just as useful for terrains?
 
Mordenkainen said:
With terrain you have e.g. vertex texturing and other techniques to reduce distortion and generate randomness. The poly mesh for terrains is also much less prone to distortion since surfaces are more predictable. Would "Tiled Textures" be just as useful for terrains?
Most Certainly yes. The goal of tiled textures is usually to avoid repetition artifacts. Terrain needs to be both vast and detailed, and that requires either a massive amount of unique texture data, or clever reuse of a smaller set of textures to look good.

There are some problems with applying that geometry-based approach to terrain, though. You can't trivially apply a geometry LOD technique to the terrain, because that could break the quad-to-tile relation. And for distant terrain you need a precalculated tiled texture to avoid aliasing anyway. IMO the shader-based approach is much easier to use because it's completely independent of the underlying geometry and works just like an ordinary texture. Additionally, you don't need to replicate vertices for it, like you have to do for the geometry-based approach. OTOH, the shader-based approach is most likely slower, at least on current hardware.
 
Mate Kovacs said:
Have you seen this? There are some interesting ideas about tiled textures (boundary constraints, etc).

Some of the examples don't look very seemless, e.g. "rusted iron" on page 6 - the regular boundaries look quite obvious.
 
Simon F said:
Some of the examples don't look very seemless, e.g. "rusted iron" on page 6 - the regular boundaries look quite obvious.
True, but that is just a content issue. It looks to me like that paper is mostly concerned with digitizing photographs for use as textures, whereas Xmas is more concerned in his paper about getting tiled textures to not look tiled, if you already have the textures.
 
Chalnoth said:
True, but that is just a content issue. It looks to me like that paper is mostly concerned with digitizing photographs for use as textures,
That's my point.
icon_rolleyes.gif
This sort of thing, surely, is meant to be seemless yet the junctions are visible. Previous work, e.g. http://www.cc.gatech.edu/cpl/projects/graphcuttextures/, doesn't seem to display these artefacts.
 
Simon F said:
Some of the examples don't look very seemless, e.g. "rusted iron" on page 6 - the regular boundaries look quite obvious.
I guess the complexity of their example models does a good job at hiding that.


Chalnoth said:
True, but that is just a content issue. It looks to me like that paper is mostly concerned with digitizing photographs for use as textures, whereas Xmas is more concerned in his paper about getting tiled textures to not look tiled, if you already have the textures.
I did look into the generation of seamless tiles, too. I basically took the tile generation method from this well-known paper by Cohen et al., dropped the overlap area in the middle, and got away with huge memory savings by removing redundant tile parts where possible.
 
Back
Top