Atlas2 Detail Texture - Kinda working in MS4.2
by Dave Young · in Torque Game Engine Advanced · 01/24/2007 (12:46 pm) · 13 replies
For the first time ever I was able to create and import Atlas2 terrains (using the GUI) as both blended and unique.
I also noticed that uncommenting out the renderDetail line in clipbatchmapper gave me a somewhat decent looking detail texture on my newly created terrain! There are some funny looking things to fix yet still (which is probably why it was commented out...) like the area in which the detail texture gets lightened up and the further terrain gets darkened. But it's a start and I bet someone brilliant can finish it from there.
Look at the difference using the stock atlas2 terrain:


And finally, here is a picture which better illustrates the darkening effect of the detail texture. The current terrain block is darkened up, the next one over is lighter, detail texture *is* rendering though, in a grey kinda way.

I also noticed that uncommenting out the renderDetail line in clipbatchmapper gave me a somewhat decent looking detail texture on my newly created terrain! There are some funny looking things to fix yet still (which is probably why it was commented out...) like the area in which the detail texture gets lightened up and the further terrain gets darkened. But it's a start and I bet someone brilliant can finish it from there.
Look at the difference using the stock atlas2 terrain:


And finally, here is a picture which better illustrates the darkening effect of the detail texture. The current terrain block is darkened up, the next one over is lighter, detail texture *is* rendering though, in a grey kinda way.

#2
For the record, here is the same terrain with no detailing enabled.
01/24/2007 (1:08 pm)
I get a 1 FPS drop when I enable the detail texturing. This 20fps feels like a lot more though, feels like 60. Very wierd!For the record, here is the same terrain with no detailing enabled.
#3
So I played around with the shader settings a little, and the only remaining problem I can see is that the next terrain block is always lighter, so I get this wierd border between terrain blocks as they pop in and out of detail. you can see the line clearly in the 3rd pic I posted, upper right quadrant of the pic.
01/24/2007 (1:41 pm)
Actually, I'm back up to 100fps after turning off bloom, hdr, etc etc. :)So I played around with the shader settings a little, and the only remaining problem I can see is that the next terrain block is always lighter, so I get this wierd border between terrain blocks as they pop in and out of detail. you can see the line clearly in the 3rd pic I posted, upper right quadrant of the pic.
#4
I noticed it was added in 4.2, but obviously isn't completely working, but was still pushed out lol... I'm assuming the issues with rendering the quads and stuff is probably why it wasn't every "finalized".
I am seeing the grey texture issue too and unfortunately doesn't look anything like detail texturing, but more of an extra texture which looks crappy
01/24/2007 (4:21 pm)
Can you post any fixes you do to the detail texturing? I noticed it was added in 4.2, but obviously isn't completely working, but was still pushed out lol... I'm assuming the issues with rendering the quads and stuff is probably why it wasn't every "finalized".
I am seeing the grey texture issue too and unfortunately doesn't look anything like detail texturing, but more of an extra texture which looks crappy
#5
01/24/2007 (6:20 pm)
It is definitely detail texturing, the texture itself is grey, need to tweak the alpha mixture to be a little less so the terrain shows through more, and resolve the LOD kinda issue. *If* I happen to fix anything I will gladly share as always, but there are people a lot handier with TSE than I :)
#6
From those shots it looks to me like your detail texture is rendering over the entire active terrain page, as opposed to within 100m or so of the camera. That could also explain the "darkening" as the view distance increases, since the detail texture is being rendered at a smaller and smaller ratio it is just "fuzzing out" and darkening the terrain.
I haven't even downloaded MS42 yet so I'm coming from an uneducated angle, but is are terrain details shader based with just hooks to render it in the engine, or is it still being processed in the engine itself?
It could be something as simple as bad shader code... easily fixed between releases.
01/25/2007 (3:53 pm)
I'm not at my desk at home so I can't look it up, but wasn't there a global to control the render distance of terrain detail?From those shots it looks to me like your detail texture is rendering over the entire active terrain page, as opposed to within 100m or so of the camera. That could also explain the "darkening" as the view distance increases, since the detail texture is being rendered at a smaller and smaller ratio it is just "fuzzing out" and darkening the terrain.
I haven't even downloaded MS42 yet so I'm coming from an uneducated angle, but is are terrain details shader based with just hooks to render it in the engine, or is it still being processed in the engine itself?
It could be something as simple as bad shader code... easily fixed between releases.
#7
What am I missing?
01/25/2007 (7:45 pm)
I must be missing something. I searched for "renderDetail" and found AtlasClipMapBatcher::renderDetail(). Unfortunately it is an empty function:void AtlasClipMapBatcher::renderDetail()
{
}What am I missing?
#8
01/25/2007 (8:29 pm)
@Dennis: You must be using MS4.0, download MS4.2 from the My Account area, it just came out a couple days ago.
#9
01/26/2007 (11:23 am)
There are a couple of vars in the file for fadestart and fadeend, I am going to be adjusting them and examining the results.
#10
01/26/2007 (2:48 pm)
Ahhh... Right you are! I had just downloaded but missed it by a day or two. Thanks for the heads up.
#11
Note, that while that makes the details look a bit better, it does not fix the bizarre coloring issue that occasionally happens in the distance.
02/08/2007 (5:10 am)
When I was fiddling with the detail textures I found that it was always a bit too white so I modified the it to render the detail in half color in the AtlasDetailP shader by changing the line that sets the output color to this:OUT.col = (diff * 0.5) * IN.fade.x;
Note, that while that makes the details look a bit better, it does not fix the bizarre coloring issue that occasionally happens in the distance.
#12
02/08/2007 (6:42 am)
I do wonder what equation they're using for rendering the detail textures. In some of my legacy work using multipication for blending the multiple textures can often result in dark, unattractive results. Try addition perhaps?
#13
The atlas details are working in RC1, which will hopefully go out today or tomorrow.
02/08/2007 (11:00 am)
@Matt - You generally want to darken, multiplication is the cheap way to do it, and if it's too dark, then just adjust the detail texture. With shaders you have quite a bit more control though, and can write simple modifiers that will fade it in the distance, etc.The atlas details are working in RC1, which will hopefully go out today or tomorrow.
Torque Owner Vincent BILLET
Default Studio Name