Terrain texture questions
by Justin Woodman · in Torque Game Engine · 02/13/2005 (6:04 pm) · 20 replies
I have 2 questions about the terrain textures. Firstly, I have a forest floor texture with leaves, sticks, dirt, everything (it's made from a photo) and when I texture my terrain with it, the texture scale is WAAAAY too big. I mean the leaves are bigger than my buildings. How do I change the scale of the texture so that it's a manageable size?
Second, I have a dirt path texture that has wagon wheel tracks running through it. This also needs to texture the ground. I have the same problem with this as the one I mentioned above, but also, the texture of the track is following in the same direction the whole path. In other words, the track is fine if It goes in a straight line, but if it turns, it looks like a bunch of tracks all facing the same direction as the straight line of tracks. Hope that's clear enough.
Thanks,
Justin W.
Second, I have a dirt path texture that has wagon wheel tracks running through it. This also needs to texture the ground. I have the same problem with this as the one I mentioned above, but also, the texture of the track is following in the same direction the whole path. In other words, the track is fine if It goes in a straight line, but if it turns, it looks like a bunch of tracks all facing the same direction as the straight line of tracks. Hope that's clear enough.
Thanks,
Justin W.
#2
Shame about the texture size. Hey Ben can shaders be applied to the terrain?
If so you should be able to use a Texture scaler shader if one exists in the shader pack.
02/14/2005 (10:16 am)
Thats too bad that it will be difficult to change the settings for this. Is it possible to use larger textures for the terrain maybe 512's or 1024's? 1024 is a big texture though. One solution to your problem Justin is applying an alpha texture of the leaves to flat plane dts meshes and placing those around in your world. I'd also try experimenting with the image as the detail texture, maybe it's worth seeing if comes across nicely?Shame about the texture size. Hey Ben can shaders be applied to the terrain?
If so you should be able to use a Texture scaler shader if one exists in the shader pack.
#3
02/14/2005 (12:43 pm)
Hmmm... i figured someting out... It works really well to use it as a detail texture, but the problem with that, is that it covers the whole map, and as far as I know, there is no way to "paint" the detail textures on the ground as you would a normal terrain texture. If it's not possible, I will probably just have to make the whole forest a DTS. Not at all what I was going for though.
#4
02/14/2005 (1:06 pm)
Hmmm... i figured someting out... It works really well to use it as a detail texture, but the problem with that, is that it covers the whole map, and as far as I know, there is no way to "paint" the detail textures on the ground as you would a normal terrain texture. If it's not possible, I will probably just have to make the whole forest a DTS. Not at all what I was going for though.
#5
TSE has full shaderized terrain. The new terrain code should be released as part of the next milestone; you might want to check that out.
@Justin: Why would it be particularly bad to have the detail texture be everywhere? :)
You can get a lot of mileage out of the terrain code as is; people have done some pretty incredible stuff. Before you go rewriting everything or doing horrible workarounds, you might want to see what you can get out of what's there.
02/14/2005 (3:37 pm)
@Todd: In theory, simple. In practice hard.TSE has full shaderized terrain. The new terrain code should be released as part of the next milestone; you might want to check that out.
@Justin: Why would it be particularly bad to have the detail texture be everywhere? :)
You can get a lot of mileage out of the terrain code as is; people have done some pretty incredible stuff. Before you go rewriting everything or doing horrible workarounds, you might want to see what you can get out of what's there.
#6
02/15/2005 (8:55 am)
I look forward to the next code drop then. Cool!
#7
02/15/2005 (8:57 am)
I look forward to the next code drop then. Cool!
#8
I think what he's getting at w/ the detail texture is that it's a bit limiting when working with a multi-textured environment.
As an example, using the default TGE detail texture (which is a nice one =) over dirt and soil looks stellar - though across grass it looks... well, off.
If we had the ability to use multiple detail maps (perhaps assigned to specific textures) or even paint them in, we'd get a much more aesthetically logical look and feel.
At least, that's my guess for his meaning. I've wanted multiple detail maps forever, but there seems to be some problems blending them asnd the whole push for that got dropped long ago. =\
02/15/2005 (9:00 am)
Ben,I think what he's getting at w/ the detail texture is that it's a bit limiting when working with a multi-textured environment.
As an example, using the default TGE detail texture (which is a nice one =) over dirt and soil looks stellar - though across grass it looks... well, off.
If we had the ability to use multiple detail maps (perhaps assigned to specific textures) or even paint them in, we'd get a much more aesthetically logical look and feel.
At least, that's my guess for his meaning. I've wanted multiple detail maps forever, but there seems to be some problems blending them asnd the whole push for that got dropped long ago. =\
#9
It would look strange on crossing the trigger boundary, but if the terrain was obscured enough (grass and bushes are the first thing that comes to mind, but the flat, leaf textured DTS objects would work too), it might not be particularly noticeable.
02/15/2005 (10:36 am)
I'm afraid I haven't looked too much into the terrain yet, but could you use an ad hoc sort of solution like placing triggers around the forest areas and then tying a hook into the scripting system to change the detail texture from the default to the leafy texture and back again when the player enters/exits the trigger area?It would look strange on crossing the trigger boundary, but if the terrain was obscured enough (grass and bushes are the first thing that comes to mind, but the flat, leaf textured DTS objects would work too), it might not be particularly noticeable.
#10
02/15/2005 (1:42 pm)
Hmmm... thats a pretty good idea with the triggers! I may just have to give that a try...
#11
The little stick looking person is the Orc. As you can see, a texture covers a fairly siginificant area.
Changing this so a texture is applied across a smaller area is no small task, as Ben has pointed out. It is actually
an area I would like to change myself but I don't have much time to poke at it here and there every so often. My
proposed change would be to shrink the area down to 1/4 the size as shown here:
02/15/2005 (9:53 pm)
Too add to this discussion I would like to show a pic of actually how large of an area a texture is on the terrain:
The little stick looking person is the Orc. As you can see, a texture covers a fairly siginificant area.Changing this so a texture is applied across a smaller area is no small task, as Ben has pointed out. It is actually
an area I would like to change myself but I don't have much time to poke at it here and there every so often. My
proposed change would be to shrink the area down to 1/4 the size as shown here:
#12
On a side note I think I understand why it was created like that in the first place. With the tiling set to the size it is currently at, you never notice the tiling on these wide open expanses, shrink it down would make it more noticeable. But you can just add more objects and more hills.
02/16/2005 (8:08 am)
Robert, if you or whoever got that to work I think it would be a very significant change that would actually improve the look of the terrain a lot. On a side note I think I understand why it was created like that in the first place. With the tiling set to the size it is currently at, you never notice the tiling on these wide open expanses, shrink it down would make it more noticeable. But you can just add more objects and more hills.
#13
thanx
03/08/2005 (5:58 pm)
Is there a way to change or apply textures for objects by using the editor? I can change the terrain textures by using "terrain editor" but I cant do the same thing for objects. I want to import un textured objects and change its textures in Torque.thanx
#14
1. More arbitrary support of texture layers: Ability to add as many as you need.. or at least increase the number of supported layers.
2. UV tiling independent of the terrain scale or orientation: Start stretching a surface too much verticall and you quickly get that "streaking" effect on the vertical surfaces. I've seen plenty of other engines where the textures do not behave this way.. or at least it's not nearly as bad. Also the ability to scale a texture layer up or down.. which would perfectly fix the issue of the leaves being too huge, etc...
3. Finer Mesh Detail: I think this is already in the TSE code based on what I've read, but more arbitrary mesh scale and resolution. If you're working in an area where finer detail in the terrain mesh would be useful, not being limited to static-sized polys would be a great help, while for more open areas, larger polys would suffice. A dynamic LOD system in the terrain could probably accomodate this.. add local mesh detail as needed, remove it when it's not.
4. Edge Turning: this is a feature in the Unreal Editor and it is a godsend in so many situations. Instead of that annoying "zig-zagged polys" issue where a steep surface meets a more horizontal one, or two hills meet at the base.. edge turning allows you to turn the direction of the polys' edge so it follows the countour of the hill instead of going perpendicular to it. Great for making things look more natural and less "3D Polygonal"...
Those are some things I would love to see in the new terrain system. They may well already be implemented as such, or similarly.. and that would be awesome. Overall, the more control over the terrain (as with other aspects) the better.
03/10/2005 (9:17 am)
Yeah, this is a rather intrusive aspect of the terrain/texture system in the current TGE. No way to adjust the UV-scaling/tiling of the textures. Not complaining too much about it now because I understand the engine is built off of a system where that kind of control likely wasn't necessary (for Tribes, etc). However, going forward, I hope the new terrain system in TSE provides more precise control over the terrain.. in a few areas.1. More arbitrary support of texture layers: Ability to add as many as you need.. or at least increase the number of supported layers.
2. UV tiling independent of the terrain scale or orientation: Start stretching a surface too much verticall and you quickly get that "streaking" effect on the vertical surfaces. I've seen plenty of other engines where the textures do not behave this way.. or at least it's not nearly as bad. Also the ability to scale a texture layer up or down.. which would perfectly fix the issue of the leaves being too huge, etc...
3. Finer Mesh Detail: I think this is already in the TSE code based on what I've read, but more arbitrary mesh scale and resolution. If you're working in an area where finer detail in the terrain mesh would be useful, not being limited to static-sized polys would be a great help, while for more open areas, larger polys would suffice. A dynamic LOD system in the terrain could probably accomodate this.. add local mesh detail as needed, remove it when it's not.
4. Edge Turning: this is a feature in the Unreal Editor and it is a godsend in so many situations. Instead of that annoying "zig-zagged polys" issue where a steep surface meets a more horizontal one, or two hills meet at the base.. edge turning allows you to turn the direction of the polys' edge so it follows the countour of the hill instead of going perpendicular to it. Great for making things look more natural and less "3D Polygonal"...
Those are some things I would love to see in the new terrain system. They may well already be implemented as such, or similarly.. and that would be awesome. Overall, the more control over the terrain (as with other aspects) the better.
#15
Why not just make your character and models bigger... Getting yourself further away from the terrain? Sure, the detail map wouldn't show up, unless there is a way to make it show from further away...
This way the terrain would look more tesselated and have the texture look better... it doesn't fix the problem I have, draggin the terrain up to make canyon walls, but I imagine it would solve some peoples problems?
Like people have said (in random threads) ... It looks great from far away but get close and it looks like a big smear...
One other thing, you would have to make the terrain squaresize a lot bigger, so you have more room to work with...
Any opinions, or unforseen problems with this?
03/17/2005 (11:57 am)
I have a question... Call me silly but I think I came up with another solution for this problem... Why not just make your character and models bigger... Getting yourself further away from the terrain? Sure, the detail map wouldn't show up, unless there is a way to make it show from further away...
This way the terrain would look more tesselated and have the texture look better... it doesn't fix the problem I have, draggin the terrain up to make canyon walls, but I imagine it would solve some peoples problems?
Like people have said (in random threads) ... It looks great from far away but get close and it looks like a big smear...
One other thing, you would have to make the terrain squaresize a lot bigger, so you have more room to work with...
Any opinions, or unforseen problems with this?
#16
- Reflection map would vanish in a short distance from camera
- water does not work well without a squaresize of 8 (Xgalaxy told me that one)
- visible distance and speeds must be increased, which can cause collision bugs
03/17/2005 (3:31 pm)
A few other things would be affected badly by doing that.- Reflection map would vanish in a short distance from camera
- water does not work well without a squaresize of 8 (Xgalaxy told me that one)
- visible distance and speeds must be increased, which can cause collision bugs
#17
i know that tongue was in cheek, but the reason repeating the same detail texture over the whole map is a bummer is that different types of terrain have different textures. :)
my personal direction heading into this is experience with the excellent RTS game [unlike any other], Myth. specifically, Myth 3. here are a few shots of what is possible there with detail textures:
http://www.wholesignal.com/myth/media/shadowmtntextures/
particularly,
http://www.wholesignal.com/myth/media/shadowmtntextures/MythIIIScreenSnapz010.jpg
note the eroded dirt on the cliffside vs the track-dust vs the cracked earth, etc. so, clearly, doing this sort of thing is worthwhile and will come with engine evolution. there will always be those of us who care deeply abt such things, and you can bet that as the engine evolves, i will be at the forefront of exploring this issue with any others willing. :)
in the meantime, i have thought of a few workaroudns, and am developing a sort of modular texturing set to demonstrate some of them.
the possible workarounds fall, to me, into 2 categories: terrain textures [color tiles making up the larger features], and detail textures [the single b&w alpha seen only close-up.]
larger color terrain textures on the landscape wld be a great boon, and i note this is possible with normal models; but it seems not to be an option. so, how can we simulate greater variety and detail, at least at a distance? the solution i am working on would use all 6 slots for the color terrains; the first 3, say, would be designed as major color features of different areas: deep red sandstone, verdant green rivulets, and beige sand, perhaps. the last precious 3 slots wld be used for somewhat desaturated variants in-between these; think of a color wheel. when you textured an area, and began to see a repeated pattern at a distance, you could call upon one of the 3 'masking' textures to spot-diffuse those repeats, ideally with enough translucency to end up with an entirely new texture, all in all. the overall effect across the landscape wld be far more variety than those 6 slots allow. i'm working on such a set.
then the issue of the single, monolithic, ever-repeating detail texture. i have come up with only one possible workaround for this, and it is not ideal, but it does end up having some useful effects. consider a fractal: it is self-similar; it is similar at half-size to its full-size look and feel. my method for this fix, then, is to take each of my existing 3 major terrain textures, shrink them appropriately, Auto-Contrast them in PS, layer them each on top of one-another at 25% opacity each, Copy merged, and then Auto-Contrast the result. there is your detail tile.
it will need to be de-contrasted a bit so it doesn't look like black tar on the ground; but the effect will be that, no matter which area you are in, if you look at the ground, the eye will *pick out* the part of the pattern which has affinity to the surrounding colored patterns.
it's hard to explain; but give it a try. i will get cracking on that example set.
i realize this doesn't address the question of your leaves, but it may be helpful in general. :) for the leaves, i wonder; can 2-sided objects be created [like the slices of foliage in modeled trees], each of which represents a different leaf as a model, and all of which can be scattered about the landscape? could this be used for similar other small-scale terrain needs? can a 2-sided image lay on the terrain like that? i have no idea.
- aqaraza
03/17/2005 (7:01 pm)
I came late to this discussion, but this topic is of intense interest to me as well. hopefully, some flexibility will come with the next release, and even more with the TSE release.i know that tongue was in cheek, but the reason repeating the same detail texture over the whole map is a bummer is that different types of terrain have different textures. :)
my personal direction heading into this is experience with the excellent RTS game [unlike any other], Myth. specifically, Myth 3. here are a few shots of what is possible there with detail textures:
http://www.wholesignal.com/myth/media/shadowmtntextures/
particularly,
http://www.wholesignal.com/myth/media/shadowmtntextures/MythIIIScreenSnapz010.jpg
note the eroded dirt on the cliffside vs the track-dust vs the cracked earth, etc. so, clearly, doing this sort of thing is worthwhile and will come with engine evolution. there will always be those of us who care deeply abt such things, and you can bet that as the engine evolves, i will be at the forefront of exploring this issue with any others willing. :)
in the meantime, i have thought of a few workaroudns, and am developing a sort of modular texturing set to demonstrate some of them.
the possible workarounds fall, to me, into 2 categories: terrain textures [color tiles making up the larger features], and detail textures [the single b&w alpha seen only close-up.]
larger color terrain textures on the landscape wld be a great boon, and i note this is possible with normal models; but it seems not to be an option. so, how can we simulate greater variety and detail, at least at a distance? the solution i am working on would use all 6 slots for the color terrains; the first 3, say, would be designed as major color features of different areas: deep red sandstone, verdant green rivulets, and beige sand, perhaps. the last precious 3 slots wld be used for somewhat desaturated variants in-between these; think of a color wheel. when you textured an area, and began to see a repeated pattern at a distance, you could call upon one of the 3 'masking' textures to spot-diffuse those repeats, ideally with enough translucency to end up with an entirely new texture, all in all. the overall effect across the landscape wld be far more variety than those 6 slots allow. i'm working on such a set.
then the issue of the single, monolithic, ever-repeating detail texture. i have come up with only one possible workaround for this, and it is not ideal, but it does end up having some useful effects. consider a fractal: it is self-similar; it is similar at half-size to its full-size look and feel. my method for this fix, then, is to take each of my existing 3 major terrain textures, shrink them appropriately, Auto-Contrast them in PS, layer them each on top of one-another at 25% opacity each, Copy merged, and then Auto-Contrast the result. there is your detail tile.
it will need to be de-contrasted a bit so it doesn't look like black tar on the ground; but the effect will be that, no matter which area you are in, if you look at the ground, the eye will *pick out* the part of the pattern which has affinity to the surrounding colored patterns.
it's hard to explain; but give it a try. i will get cracking on that example set.
i realize this doesn't address the question of your leaves, but it may be helpful in general. :) for the leaves, i wonder; can 2-sided objects be created [like the slices of foliage in modeled trees], each of which represents a different leaf as a model, and all of which can be scattered about the landscape? could this be used for similar other small-scale terrain needs? can a 2-sided image lay on the terrain like that? i have no idea.
- aqaraza
#18
http://www.wholesignal.com/realia/torqueTxtr/terraintiles01.jpg
- top row, 'Primary' color terrain tiles; lower row, 'Secondary' color terrain tiles. [all original, all included in the zip below for yr reuse and revision.] the saturation and contrast of the Primary tiles are deliberately extreme, as will be seen in-game.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles02.jpg
- the 3 Secondary tiles in PS [i decided to use them in the detail tile]; stacked at 30% opacity.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles03.jpg
- the Primary tiles stacked at 30%. [note Layer 4; the Auto Contrast composite of the first 3]
http://www.wholesignal.com/realia/torqueTxtr/terraintiles04.jpg
- the Primary tile blended with the Secondary tile at 70% emphasis on the Primary. [note how completely the regular pattern of the sand-dunes in the Primary stack overwhelms the over-all texture. this will be a clear deal-breaker in-game; i would minimize that regular pattern in the mix, or even remove it. i was trying to demonstrate the idea, though, not perfect it. the work file .psd is linked below.]
http://www.wholesignal.com/realia/torqueTxtr/terraintiles05.jpg
- the 'final' detail tile, and its Brt/Con. this turned out to be too subtle in-game, but i never tried the dark version [i did save it out, though, in the .zip].
http://www.wholesignal.com/realia/torqueTxtr/terraintiles06.jpg
- in-game, standing on a peak near the orc village; default demo terrain mapped to height, ready to change out.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles07.jpg
- ouch! :) very vibrant results of inserting the Primary terrain tiles. note, however, how effective the obvious details can be at a distance when they are allowed in the texture; the rivulets and dunes. note also the unacceptable repeats of the rivulets. that's where the Secondary tiles come in:
http://www.wholesignal.com/realia/torqueTxtr/terraintiles08.jpg
- Secondary tiles added, and i have begun to mask obvious repeats and edges with them. way too much terrain in one spot, but as above, just the concept here, not its perfection. can you spot the places where the Secondary tiles are used? in a few spots [the lefthand edge ridge], they are blended into one-another over the Primary tiles; this is the technique that could bear real fruit; a palette of terrains.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles09.jpg
- now the detail tile. it looks fine when standing on the dirt and sand, but..:
http://www.wholesignal.com/realia/torqueTxtr/terraintiles10.jpg
- not so cool on grass. :) try removing or [better yet i think] minimizing the opacity of the sand in the raw texture builder, which i give you here, with my supporting detail and terrain tiles:
http://www.wholesignal.com/realia/torqueTxtr/textureExperiment.zip
any thoughts? experiment and let me know... :) should i make this into a tutorial somehow? it probably doesn't warrant a Dev Snapshot yet... :)
[ps - after the fact, i did the minimizing of the sanddunes myself to 10% of the Primary mix; latest .zip includes that tile in the Details folder.]
- aqaraza
03/17/2005 (9:32 pm)
Ok, i've given this a try, in a quick and dirty way, taking copious screenshots. i've ended up more with some material for you to experiment with, than a polished solution, but here goes.http://www.wholesignal.com/realia/torqueTxtr/terraintiles01.jpg
- top row, 'Primary' color terrain tiles; lower row, 'Secondary' color terrain tiles. [all original, all included in the zip below for yr reuse and revision.] the saturation and contrast of the Primary tiles are deliberately extreme, as will be seen in-game.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles02.jpg
- the 3 Secondary tiles in PS [i decided to use them in the detail tile]; stacked at 30% opacity.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles03.jpg
- the Primary tiles stacked at 30%. [note Layer 4; the Auto Contrast composite of the first 3]
http://www.wholesignal.com/realia/torqueTxtr/terraintiles04.jpg
- the Primary tile blended with the Secondary tile at 70% emphasis on the Primary. [note how completely the regular pattern of the sand-dunes in the Primary stack overwhelms the over-all texture. this will be a clear deal-breaker in-game; i would minimize that regular pattern in the mix, or even remove it. i was trying to demonstrate the idea, though, not perfect it. the work file .psd is linked below.]
http://www.wholesignal.com/realia/torqueTxtr/terraintiles05.jpg
- the 'final' detail tile, and its Brt/Con. this turned out to be too subtle in-game, but i never tried the dark version [i did save it out, though, in the .zip].
http://www.wholesignal.com/realia/torqueTxtr/terraintiles06.jpg
- in-game, standing on a peak near the orc village; default demo terrain mapped to height, ready to change out.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles07.jpg
- ouch! :) very vibrant results of inserting the Primary terrain tiles. note, however, how effective the obvious details can be at a distance when they are allowed in the texture; the rivulets and dunes. note also the unacceptable repeats of the rivulets. that's where the Secondary tiles come in:
http://www.wholesignal.com/realia/torqueTxtr/terraintiles08.jpg
- Secondary tiles added, and i have begun to mask obvious repeats and edges with them. way too much terrain in one spot, but as above, just the concept here, not its perfection. can you spot the places where the Secondary tiles are used? in a few spots [the lefthand edge ridge], they are blended into one-another over the Primary tiles; this is the technique that could bear real fruit; a palette of terrains.
http://www.wholesignal.com/realia/torqueTxtr/terraintiles09.jpg
- now the detail tile. it looks fine when standing on the dirt and sand, but..:
http://www.wholesignal.com/realia/torqueTxtr/terraintiles10.jpg
- not so cool on grass. :) try removing or [better yet i think] minimizing the opacity of the sand in the raw texture builder, which i give you here, with my supporting detail and terrain tiles:
http://www.wholesignal.com/realia/torqueTxtr/textureExperiment.zip
any thoughts? experiment and let me know... :) should i make this into a tutorial somehow? it probably doesn't warrant a Dev Snapshot yet... :)
[ps - after the fact, i did the minimizing of the sanddunes myself to 10% of the Primary mix; latest .zip includes that tile in the Details folder.]
- aqaraza
#19
Thanks for doing this R&D with the terrain. Terrain was one of the first things I started working with and came away with lots of questions about what to try next. I played most with the actual mesh resolution, just trying to get a handle on it; then of course, I saw that very small meshes can intrduce bugs to AI and water and I stalled out. You've done a great job of explaining your approach and hopefully I'll make some time to try a version of my own. If I can manage, I'll add it to this thread as well.
Thanks again,
Don
03/18/2005 (9:15 am)
Hi Heath, Thanks for doing this R&D with the terrain. Terrain was one of the first things I started working with and came away with lots of questions about what to try next. I played most with the actual mesh resolution, just trying to get a handle on it; then of course, I saw that very small meshes can intrduce bugs to AI and water and I stalled out. You've done a great job of explaining your approach and hopefully I'll make some time to try a version of my own. If I can manage, I'll add it to this thread as well.
Thanks again,
Don
#20
03/20/2005 (4:56 pm)
Don; thanks for your comments. if you take at my posting just now some pages down ;) in the TSE Terrain dev snapshot, you will see some discussion of Myth III's implementation, now that mroe is known abt the TSE Terrain engine. please see the imminent thread here, an 'open challenge' on this issue; to implement some of the lessons MIII teaches..
Associate Kyle Carter
There is no easy way to scale the terrain textures. This is because to give a high texel density on the terrain there is a quite complex texture blending and caching architecture in place. To modify the texel density would require some fundamental changes to this architecture. Can it be done? Yes. But not easily, and at the risk of some major performance loss.