Planetside Software Forums

General => Terragen Discussion => Topic started by: reck on November 13, 2009, 02:15:56 AM

Title: Annoying black triangles
Post by: reck on November 13, 2009, 02:15:56 AM
Hi guys

Has the annoying black triangle bug been fixed in the new alpha? I was always under the impression this bug only appeared only a few scenes with complicated displacement, shaders.

A lot of my scenes are fairly basic though and yet I still see these black triangles pretty often.

Today I opened Terragen, added an alpine shader, changed a few render settings (detail, aa & gi) and hit render and even this most simple scene suffered from the problem. I didn't alter any parameters other than the render quality and didn't add any other shaders.

If a fix hasn't been found would it help it I emailed this file to planetside support?

Title: Re: Annoying black triangles
Post by: Oshyan on November 13, 2009, 02:16:54 AM
We're working on it and it would definitely help if you emailed the file to us. support AT planetside.co.uk

Thanks!

- Oshyan
Title: Re: Annoying black triangles
Post by: jo on November 13, 2009, 02:18:19 AM
Hi reck,

Oshyan beat me to it :-). It would also help to know how many cores your machine has.

Regards,

Jo
Title: Re: Annoying black triangles
Post by: reck on November 13, 2009, 03:35:37 AM
OK, when I get home i'll email the file. I started the render off again without changing any settings to see if it does it exactly the same thing.

I have a core 2 duo cpu so i'm running 2 threads.
Title: Re: Annoying black triangles
Post by: reck on November 13, 2009, 03:37:01 PM
Hmm this is strange. After I posted this last message I hit the render button again without altering anything, come home tonight and the image has rendered without any block triangles this time!

I thought the triangles were down to some setting so why would it render fine one time but not another with no change in settings?

Is it still worth me emailing the project?
Title: Re: Annoying black triangles
Post by: Matt on November 13, 2009, 05:15:29 PM
Yes, please send the files. If it happened once, it might happen again, and we need to catch it.
Title: Re: Annoying black triangles
Post by: reck on November 13, 2009, 06:07:56 PM
ok. email sent
Title: Re:Reproducable - Annoying black triangles
Post by: dandelO on November 13, 2009, 08:08:44 PM
I'm 99% sure I have found a way to reproduce this problem...

Was it the 2.0 releases that first included 'displacement tolerance' in internal objects? I think it was as I cannot remember seeing this problem at all in 1.9.XX versions and sometimes I have had to revert to rendering projects in the last public beta before 2.0 when this problem has been appearing in my scenes and I couldn't fix it, it never happens in that.

Here's a couple of test images on a default file:

Background Node(sphere) - displacement tolerance = '2'
[attachimg=#]

Background Node(sphere) - displacement tolerance = '0'
[attachimg=#]

Since there isn't any displacement used in the background shader could this parameter be creating some bad, unwanted calculations to make this happen since displacement tolerance defaults at '1' on objects?

*EDIT: All my scenes run on one single thread so it doesn't seem to come from multi-threaded rendering, I get it often. I will try and use a value of '0' in the BG sphere to minimize this anomaly until it's fixed. It is definitely easily reproduced by altering this parameter, I have only seen it in the sky in my scenes, never terrain, so you might want to set it to '0' in the planet too. (Or will this stop any displacement from being possible at all? I hope not, I'll test that now It doesn't stop displacement from happening by setting tolerance to '0' in the planet node, just needed to confirm that to myself, I'm a bit thick sometimes)...
Title: Re:Reproducable - Annoying black triangles
Post by: dandelO on November 13, 2009, 08:23:35 PM
Quoteso why would it render fine one time but not another with no change in settings?

This happens on my computer too.

Hmmm, I've kept playing with this and have come across the issue whilst using a setting of '0', aswell. Sorry for the above post, I really thought I'd found a hint there. Here's the .tgd, it happens a lot in this for some reason here...
[attachimg=#]
Title: Re: Annoying black triangles
Post by: dandelO on November 13, 2009, 09:30:37 PM
OK. Another trial and error...

With the above, bare bones triangles.tgd file, I think I can eliminate it from happening(I thought this about the tolerance thing for a bit too, though, that was a happy coincidence, it now seems. It was just randomly, by complete chance, not happening when I had different settings in there, just lucky renders).

However, I cannot get this .tgd to give me missing triangles if I select 'No Detail' in the 'Ray Detail Region'. This parameter is defaulted to 'detail in crop region'(if i haven't changed that setting for my own default .tgd but I don't think I have.)
If I render with 'detail in camera' or 'detail in crop region'(I always have 'Do crop region' enabled in my renderer) the triangles happen. If I render with 'No Detail', they don't! :)

I've tested this many, many times now, just to be sure this isn't another pointless post, I think this is it, though. Use 'No Detail' to eliminate the triangles, even when region padding is set to '0'.
Title: Re: Annoying black triangles
Post by: Oshyan on November 13, 2009, 09:54:46 PM
Thanks for the continued troubleshooting. Hopefully this info will be useful. :)

- Oshyan
Title: Re: Annoying black triangles
Post by: dandelO on November 13, 2009, 10:12:54 PM
Ha! I'm starting to think I might be leading myself up the garden path. Since I last posted I've repeated this test rendering, over and over. I have had black triangles twice with a setting of 'no detail' out of probably 15 renders.

With any other ray detail setting and when padding is '0' it is happening most times.
When ray detail settings are used and padding set to '1' it hasn't happened, yet...  :-\
Title: Re: Annoying black triangles
Post by: Matt on November 13, 2009, 11:38:59 PM
I don't think those settings have anything to do with it. I think you're trying to find some combination of those settings that will never produce black triangles, but why concentrate on those settings?
Title: Re: Annoying black triangles
Post by: dandelO on November 14, 2009, 12:06:01 AM
Because, when I load that .tgd up in version 1.9.xx the only differences in the file settings are the 'ray detail regions' and 'displacement tolerance'. Versions of Terragen before v.2 didn't have this missing triangle problem, I'm just trying to adjust the items that the last, pre version 2 TG didn't understand yet, the warnings when opening a new .tgd in an older version, I'd assumed, would maybe help to find where the new problem was coming from. Displacement tolerance and ray detail regions are the only differences that I'm able to see/edit on this end between versions.
Simply, it never happened before, so maybe it was one of these new to v.2 things that are making it happen. That's why I messed with these settings. I know lots of other things have been added/changed that users can't edit, like the actual rendering etc. I just thought to give it a go by editing the only things I could that are new to try and make things behave as they did before, without black triangles.

Anyway, that .tgd gives me lots of missing triangles, if it's any help. The tests must have just been lucky renders. I'll leave it.
Title: Re: Annoying black triangles
Post by: Matt on November 14, 2009, 11:01:04 AM
Ah, I'd forgotten that you'd mentioned that. Seems logical.

I think it's a red herring though. I've seen it occur in other situations that make me think it's a more general problem.
Title: Re: Annoying black triangles
Post by: Seth on November 14, 2009, 12:19:06 PM
in my last animation, there was only one frame with black triangle out of 330 frames...
So i guess it is a general problem as Matt said.
Title: Re: Annoying black triangles
Post by: reck on November 15, 2009, 10:29:44 AM
Ah "general problems". I guess they are the ones that are hard to track down and therefore fix. The fact that the same scene can render fine one time and then not another point to the fact it might be tricky to track down.

Hope you get to the bottom on the mysterious black triangles though.
Title: Re: Annoying black triangles
Post by: himalofa on November 23, 2009, 12:13:14 AM
I have been having this problem in spades.

I have rendered frames of an animation overnight at least 10 times, each time changeing various parameters and somtimes they occured and somtimes not.

I have a quad core Q6600 and when I finally set the max threads to 3 there were no more missed triangles and I rendered a 2000 frame animation without a single occurance. I switched back to 4 threads and the triangles were back. Went back to 3 and no black triangles.

I think quality and frame size may have an influence although I changed so many settings I lost track. I finally concentrated on the render settings as they seemed to have more influence on this bug but I have nothing certain there except the number of threads. Could it be somthing to do with the multi threading loosing track of which thread has rendered which triangle, where each thread thinks the other thread has rendered it and in fact none of them has.
Title: Re: Annoying black triangles
Post by: Oshyan on November 23, 2009, 02:35:33 AM
Thanks for the feedback himalofa. I think we're making progress on this one, but it's still not nailed down yet, so the additional information is helpful. I think it slipped through despite being a pretty noticeable bug because it's so intermittent and tends to happen most with long animations.

- Oshyan