[B4/B5 Bug]: Terrain Detail Map Loss
by Travis Vroman · in Torque 3D Professional · 08/11/2009 (9:51 am) · 3 replies
I've run into an interesting bug with terrain detail maps. I first ran into it in B4 yesterday, but decided I'd try B5 before posting. Unfortunately, it's still present.
First off, here are the specs my setup:
Windows Vista Ultimate 64-bit, Service Pack 1
Intel Core 2 Duo 6300 @ 1.86 GHz
3 GB DDR2 RAM @ 667MHz
nVidia GeForce 9800 GT 512MB GDDR3 (Driver v. 178.24)
I'm running in advanced lighting as well.
Okay, so on to the actual issue at hand. I've been working with painting my terrain. I have 10 terrain materials at the moment, each with their own detail map at varying strengths. I'm not using normal maps at all. My terrain's squareSize is 0.5, and has been working fine up till this point.
What's happening now is that, while using materials 6-10, certain sections of the terrainBlock lose thier detail maps for materials 1-5, and others take it just fine. For example, take the following screen shot into consideration:

Note that I am using material 9 on one section of the terrain, and it works fine, no problems. However, when I paint into the next section to its immediate left, this is what I get:

Materials 1-5 have lost their detail maps, even though they are still present in the "terrain material" window. Materials 6-10, however, still have their detail maps present within this section. This also seems to have the exact same effect on the section of terrain immediately behind it as well.
(It seems I need to split this into 2 posts, so please look below for the rest.)
First off, here are the specs my setup:
Windows Vista Ultimate 64-bit, Service Pack 1
Intel Core 2 Duo 6300 @ 1.86 GHz
3 GB DDR2 RAM @ 667MHz
nVidia GeForce 9800 GT 512MB GDDR3 (Driver v. 178.24)
I'm running in advanced lighting as well.
Okay, so on to the actual issue at hand. I've been working with painting my terrain. I have 10 terrain materials at the moment, each with their own detail map at varying strengths. I'm not using normal maps at all. My terrain's squareSize is 0.5, and has been working fine up till this point.
What's happening now is that, while using materials 6-10, certain sections of the terrainBlock lose thier detail maps for materials 1-5, and others take it just fine. For example, take the following screen shot into consideration:

Note that I am using material 9 on one section of the terrain, and it works fine, no problems. However, when I paint into the next section to its immediate left, this is what I get:

Materials 1-5 have lost their detail maps, even though they are still present in the "terrain material" window. Materials 6-10, however, still have their detail maps present within this section. This also seems to have the exact same effect on the section of terrain immediately behind it as well.
(It seems I need to split this into 2 posts, so please look below for the rest.)
#2
After a little more investigation, I've determined that the detail maps are in fact NOT disappearing, rather this seems to be more of a blending issue. The detail textures show up fine from 0.5 to 0 opacity (where 2 different materials meet) but from 0.5 to 1 opacity, the detail texture is not rendered.
08/15/2009 (11:52 am)
I've managed to narrow down the steps to reproduce the problem. - Create a new terrain. None of the terrain's properties affect this it seems, so stick with the defaults.
- Create and Choose 8 unique materials for the firsst 8 terrain layers.
- Paint using each material at least once. You'll notice that they act fine.
- Add a ninth material, and paint with it. Make sure to go all the way around the outside edge, and you'll find that one section's detail maps for the first 5 materials disappear when using the 9th material. Only the 9th material and beyond cause this, and only materials 1-5 are affected. I'm still looking through some of the code to see if I can find anything that might point to the problem with this.
After a little more investigation, I've determined that the detail maps are in fact NOT disappearing, rather this seems to be more of a blending issue. The detail textures show up fine from 0.5 to 0 opacity (where 2 different materials meet) but from 0.5 to 1 opacity, the detail texture is not rendered.
#3
08/17/2009 (6:39 pm)
Logged as THREED-672
Torque 3D Owner Travis Vroman
Fireslinger Studios
Here, we're behind the problem terrain section. The sections to the side of the problem area still continue to work properly, as shown below:
However, the minute I paint on the terrain section behind the problem area, it presents me with the same result, as shown below:
However, as strange as it is, these are the ONLY two sections in the entire terrain affected by this. Any other section, including the one behind these 2 problem sections, continue to work properly.
Now, here are the steps that I have taken to try and resolve this:
1. Delete and re-create the terrain materials. This did not work.
2. Create a new terrain from scratch, with all new materials. This did not work, either.
3. Create an entire new scene in B5 (as I figured maybe it was something carried over from the B4 terrain), with a new terrain, and all new materials. Same result.
This seems like something left over from the old maximum of 6 (or 8, I can't remember back that far :P) terrain textures per terrain, but I could be wrong entirely. It seems, however, that whenever I go over 8 materials, this problem presents itself. It's always the same two "sections" of terrain though.
However, I'm no longer familiar with the workings of the TerrainBlock, as I haven't touched it since the days of TGE. I also don't know if this is an engine issue or a shader issue. So if someone can either (a) point me in a possible direction to fix this if it's an engine issue, or (b) let me know if it's a shader issue so I can run away screaming. (Shaders seem to be the bane of my existence).
If there is any other information I can provide that might help, please let me know.
Thanks,
-Travis