Ray traced shadows problem: CAUSE, HOLES IN DATA

Started by domdib, June 15, 2009, 08:06:01 am

Previous topic - Next topic

domdib

June 15, 2009, 08:06:01 am Last Edit: June 16, 2009, 07:39:11 am by domdib
There seems to me to be a bug in the "Ray traced shadows" setting of the renderer. Attached are three images of a terrain I'm working on, a DEM. In the first image, a heighfield erode has been applied, and these very dark shadows on the terrain showed up when I switched on ray traced shadows (in order to get the tree shadows). I removed the erode, but the shadows remain(#2). Finally, removed all surface layers and objects (#3). Still there.

I could understand that the terrain would cast shadows on itself, which is what I presume is happening. What I can't fathom is why the shadows are so dark. Even when I ramp up GI on surfaces to the absurdly unrealistic 10.5, they are still visible (#4).

Does anyone have a clue what's happening here? These shadows spoil the scene, so I'm keen to resolve it. I haven't attached a TGD, as the terrain is an 8MB DEM, but I can email it to PS or others if it's needed for diagnosis.

Henry Blewer

It's hard to say. The images are too small for me to really tell what is going on. Try a render of number 3 at 800 x 600. I think detail quality of the render at 0.4 would be sufficient so the render time would not be too long.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

domdib

June 15, 2009, 09:01:40 am #2 Last Edit: June 15, 2009, 09:03:34 am by domdib
I don't quite understand your suggestion njeneb. Why would re-rendering at a larger size help? I thought my explanation was pretty clear - v v dark shadows that look unrealistic, presumably coming from the terrain shadowing itself. Aren't the dark patches on the images obvious?

I should add that I've tried pretty much everything to see what's inside the shadow, short of actually moving the sun, which I don't want to do as its position is a feature of the scene when the clouds are enabled.

Tangled-Universe

To me it looks like the displacements are messed up.
Njeneb asked for higher resolution and quality because TG2 generates more accurate results when you do that, guess so.

Martin

domdib

If the displacements are messed up, that's a big shame, as the third image is showing a plain .ter from a DEM, with no added displacements.

I will render a close-up of the shadowed area soon.

domdib

Well, I guess there is just a flaw in this .ter, and I've been unlucky enough to focus on this spot. Attached are some renders: one bigger, as suggested by njeneb, and two closer in - the last one has no ray traced shadows, to see the terrain for reference. Is there any way of fixing this? Or if not, of covering it up?? I just ran through most of the heightfield operators, but no matter  how I tortured the original terrain, these patches kept showing up.

Tangled-Universe

Can you post this terrain and tgd over here? Hopefully it is not too big.
I have 3 ideas what it might be and would like to test it.

Martin

domdib

The tgd is attached - sorry, the node graph is rather messy. The Medium Quality render has the camera focused on one of the problem areas - patch2-new. Unfortunately, the .ter is 8MB. I tried to upload it at terragen.org under the title "Mountain terrain for TU" but I'm not sure if there's an approval process there - I can't see it. If you have any other suggestions on how I might get it to you, I'm happy to send it - I believe Gmail will accept attachments up to 10 MB.

Tangled-Universe

Thanks, you can find my e-mail in my profile.
I'll look into it asap.
Regarding terragen.org: if I'm correct you'll have to wait for approval, so that could take a day maybe.

Martin

Henry Blewer

I would check your settings in the various color tabs. This may be a contrast problem. It may be set too high (?)
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Oshyan

Looks like a DEM with some "holes"/corruption in it. What's the source/area of the DEM? I'd suggest running it through a 3rd party terrain editor, selecting those areas and smoothing them, or using a dedicated hole filling filter. There's one available in 3DEM if you still have that (should be mirrored on Terragen.org soon).

- Oshyan

domdib

I think Oshyan is right, and the data itself is slightly corrupt. I came up with a potential workaround: a displacement shader with a painted shader for blending - you can just paint a displacement on top of the hole in the terrain. The two images below give a before and after, and it works, kind of. Unfortunately, it also sends the render time too far north, :( possibly because there is also a Compute Normal in there to ensure the displacement was Lateral normalised
I'm going to try something else as a cover - perhaps some hero rocks. The problem with trying to fix the .ter itself is that it is very large, so finding just this particular patch would most likely be troublesome.

@TU - I tried emailing the terrain but it bounced. If you still want to play with it, I can put it in a public file directory I have on Dropbox. Just let me know, and I can email the location.

Henry Blewer

Thanks Oshyan. That never occurred to me. If I remember correctly, Terragen 0.9 would interpolate between the data points. Then, it may have been VistaPro 3, which I used back in the 90's.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Matt

June 16, 2009, 07:49:34 pm #13 Last Edit: June 16, 2009, 07:51:25 pm by Matt
TG2 also interpolates between the data points, but that doesn't mean ignoring any of them. 'Holes' in the terrain are usually just bad values (maybe with an elevation of 0), but the interpolator doesn't know that they are bad.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Oshyan

There are apps out there like GlobalMapper that can patch holes automatically, so no need to find them in a big terrain. 3DEM does as well, though its algorithm is less effective (and of course it's no longer available from the official site). I've posted a mirror of 3DEM here for anyone who still needs it:
http://www.terragen.org/index.php?action=tpmod;dl=item490

- Oshyan