Game Development Community

Torque 3D Beta 1 Bug - Sharp shadow LOD on terrain

by Konrad Kiss · in Torque 3D Professional · 05/04/2009 (6:45 am) · 23 replies

I've noticed that LODs are very recognizable on the terrain. Where the mipmap levels are changed, there's a noticeable line - probably because the texture do not seem to repeat on the next level where it has left off at the previous level. I might be totally wrong though, but it draws attention when moving on a homogeneous surface.

Edit: might this only be a shadow issue?


www.xenocell.com/dev/t3dterrlodbug.jpg

Page «Previous 1 2
#1
05/04/2009 (6:51 am)
Konrad, I got something similar to that, with sort of shadow blobs that flickered in and out as I moved, seeming to represent a certain distance away from the camera. I played with the shadowing number of "splits" and turning it down to 2 I think it was fixed it. I think it's the shadowing algorithm, IIRC terrain LOD isn't in yet.
#2
05/04/2009 (6:54 am)
Thanks for the heads up Gareth! I'll play with that splits value then.
#3
05/04/2009 (8:02 am)
Two things...

Its hard to say what that is... i look at that image and see nothing wrong. I suspect that if i see nothing wrong that you'll never have a gamer look at your game and see anything wrong.

Second... short of a bug i will not be working on terrain LOD any further. Unless your game is made up of empty terrains with no meshes, trees, buildings, etc... the current LOD is completely acceptable even with its discontinuities.

That said... if you have a screenshot that shows whatever this is better and its still a bug. Let me know.
#4
05/04/2009 (8:10 am)
Try recording a video Konrad, if it is what I was experiencing then you have to move to really notice how it looks funny.

The problem I had Tom was that those shadows Konrad points out, well, they'd disappear, fade or shift as I got close to them. Which was odd cause they look like simple shading due to bumpiness of the terrain mesh.
#5
05/04/2009 (10:00 am)
Hey guys,

@Tom: I'm not sure it's related to the terrain at all. It looks like - as Gareth said - it's closely connected to the numSplits PSSM variable.

Having said that, this is by far the best terrain implementation so far. You guys did a great job, and I'm really happy about the possibilities the new terrain system opened for us. I thought that I was gonna miss Atlas.. hell no. So don't think for a second that I'm being picky or something. I just wasn't sure about what the roots of this issue were.

@Gareth: Yep, I'm uploading right now, it will definitely show the issue a lot better. Now that I took a closer look, and checked out the numSplits value, it's evident that it is a PSSM thing.

I'm adding the video to the original post. it's still being processed by Youtube as I write this, so you might have to try a bit later if you can't play it yet.

I will change the title of the thread to better reflect the problem from "Torque3D Beta 1 Bug - Sharp texture LOD on terrain" to Torque3D Beta 1 Bug - Sharp shadow LOD on terrain.
#6
05/04/2009 (10:24 am)
Noticed the issue as well.
Especially under trees in the warrior camp for example you see it very well, its a "smooth shadow - boxy - smooth shadow" flicker.
But I guess this issue is known already as this issue can not be missed in the warrior camp independent of how hard you try it as every tree, especially those casting shadow on the TSStatic stones, shows the problem

if you move from the abandonedBallista towards the water and look at the small tree right of the stone, you will see that the shadow map appears with a sharp border. numSplit 3 is never even used, it just "cuts in" from 2 -> 4

EDIT: This has to do with the setup. The 0.9 logWeight controls the shadow quality distance changes. For anyone with maths great but I guess the common designer will take something on his desk and throw it after you for such a "LoD distance measure" :)
#7
05/04/2009 (12:57 pm)
Btw, you can change the terrain geometric lod distance via the TerrainBlock field "screenError". If you want to see this visually you can set $Terrain::wireframe = 1;
#8
05/04/2009 (2:32 pm)
Logged as possible bug.
#9
05/04/2009 (6:45 pm)
I can't see the video for some reason and that foto doesn't really show much so i am not sure if my issue with terrain is the same or not.

I get this on warrior camp level as from instalation (no changes made)

My system is

Win Vista 32bit
Intel Centrino 2 Duo
4Gb RAM
ATI Mobility Radeon HD 3470

www.greenwebproject.biz/ter.png
#10
05/04/2009 (11:42 pm)
Youtube had some error with the video file, so I'm gonna upload to vimeo.

@Luis: It doesn't seem to be the same problem judging from your screenshot.
#11
05/06/2009 (12:08 am)
Bump. Finally, the video is up, it will show the issue better. I've added it to the original post.
#12
05/06/2009 (3:01 am)
Ok... now with video i can tell exactly what your seeing.

It seems like the ESM factor might be too strong. Go tweak the 'overDarkFactor's for the Sun. The parameters are hard to describe... its a scalar used within an exp() function for Exponential Shadow Filtering (PDF). You have 4 factors... one for each cascade of the shadow map.

Let me know how that goes.
#13
05/06/2009 (3:51 am)
That helped a bit, but this wasn't quite what I was looking for. So I played more with the sun controls, and finally I came across splitFadeDistances.

Setting splitFadeDistances from "1 1 1 1" to "10 10 10 10" made the split changes be faded over one another, and now the lines are not visible at all.

Thank you for your help Tom! Looks like this was just a suboptimal setting - and not a bug.
#14
05/06/2009 (11:44 am)
Cool.

By the way i'm open for suggestions on how to make the shadow settings... especially on the sun... easier to tweak. Its current a complex process with more knobs than i would like.
#15
05/06/2009 (11:50 am)
Knobs are good :) It would be worse if I had to expose stuff to the console to change a setting or two.

The best splitFadeDistances turned out to be "12 12 12 12" for me, maybe that could be a new default.

Thanks again!
#16
05/22/2009 (7:29 am)
Konrad how is beta2 doing for you out of the box.
#17
05/22/2009 (11:49 am)
Hold on, I'm gonna be able to test only tomorrow.. just got back from hospital.. worth a blog in itself! :) I'll test tomorrow and let you know.
#18
05/22/2009 (5:38 pm)
Oh no. Was it that pig flu?
#19
05/22/2009 (11:24 pm)
I'm now seeing this issue in Beta 2 with default map settings. Beta 1 does not appear this way. Changing splitFadeDistance does appear to alleviate it.
#20
05/23/2009 (4:24 am)
If you're removed this issue with splitFadeDistance, all you've managed to do is turn off the first two levels of shadow detail effectively.

Yeah, I was kind of surprised when I read this today and saw that this was "expected behavior," especially considering how much worse it is in Beta 2. We're specifically getting lots of very, very dark shadowing on light-facing terrain surfaces that totally ruins the scene. This isn't a "may or may not be noticable" scenario, this is ... no, just no. This needs to be fixed.

Here's a perfectly reasonable scene on a 256x256 terrain. I'm not even trying to exceed the default terrain size here.

ubermonkey.phpwebhosting.com/shadows1.jpg
Here's the exact same spot in the same level, taken in Beta 1:

ubermonkey.phpwebhosting.com/shadow3.jpg
Back to beta 2.. if the the player stands on the false shadows, we can see there's no actual shadow being cast here. It's just a bug in the terrain shadow rendering..

ubermonkey.phpwebhosting.com/shadow2.jpg
Anyway, obviously it's gotten worse in Beta 2. In Beta 1, we can at least get functional shadows on 256 terrain.
Page «Previous 1 2