Planetside Software Forums

General => Terragen Discussion => Topic started by: wiwine on January 09, 2010, 01:23:53 PM

Title: Procedural dunes - problem with the render
Post by: wiwine on January 09, 2010, 01:23:53 PM
Hello everybody...
I'm currently working on a procedural dunes generation, and I'm not far to get what I wanted,
using the functions.
But I've got a big problem with the renders : multiple thin lines appears everywhere and I
don't know how to avoid them. See the renders below.
When the camera position is near the ground, it seems to be worse.
Have you an idea to solve this problem ?
Title: Re: Procedural dunes - problem with the render
Post by: inkydigit on January 09, 2010, 01:26:59 PM
not sure, but is this caused by some smallest scale displacements being too small?
Title: Re: Procedural dunes - problem with the render
Post by: FrankB on January 09, 2010, 01:52:13 PM
very likely, if you ask me. Try a bigger smallest scale (1 cm for testing) and see if they go away.
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on January 09, 2010, 03:02:17 PM
I deleted the displacement and the functions that made the small sandwaves.
The main displacement (that makes the dunes) as a value = 7.
There's no improvement... I would even say it's worse !

See the attached files.
Title: Re: Procedural dunes - problem with the render
Post by: FrankB on January 09, 2010, 03:03:44 PM
do your functions potentially produce divide by 0, or coming close to dividing by zero?
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on January 09, 2010, 03:10:35 PM
Not much divisions in my functions. When I use a "divide scalar" it is with a constant value.
There's no "division by 0".
I sent my .tgd file in the previous post, if you want to make a test by yourself.
Title: Re: Procedural dunes - problem with the render
Post by: TheBlackHole on January 09, 2010, 03:29:25 PM
WTF?
Title: Re: Procedural dunes - problem with the render
Post by: cyphyr on January 09, 2010, 03:43:04 PM
I added a "compute terrain" node (default), between the last multiply scalar and the surface layer,  seems to be working ... :) I'm on a slow laptop so it'll be an hour or so till the whole frame is complete.
:)
Richard
ps damn that's some fine functions you got there ;D
pps: I'm rendering your "quick render" settings
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on January 09, 2010, 03:53:19 PM
I just tried your compute terrain (I've got a quad-core, it's fast). Does not work, unfortunatly...
Title: Re: Procedural dunes - problem with the render
Post by: cyphyr on January 09, 2010, 03:59:06 PM
Interesting, I've only got 1 error so far similar to yours and I'm halfway through the render.
Attached file in case I didn't explain something right.
:)
Rrichard
ps when I first did this I copied and pasted the "compute terrain" from your set up and used that between between the last multiply scalar and the surface layer. Unfortunately I forgot to tick "enable" lol
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on January 09, 2010, 04:23:06 PM
I've still got the thin lines with your file !
Could you make another test : a render with my first file, without modification ?
Title: Re: Procedural dunes - problem with the render
Post by: cyphyr on January 09, 2010, 04:31:48 PM
Sure :)
Rendering again with your original unmodified file.
I just uploaded the modified render, there is one line, but that's all.

I've wondered for a while if different processors might produce slightly different results at extremes.
Richard
Title: Re: Procedural dunes - problem with the render
Post by: Matt on January 09, 2010, 05:37:22 PM
I think it's a multi-threading bug. With max threads at 4 threads I got the spikes, with max threads at 0 I got no spikes. It's probably one of the function nodes or shaders, but I haven't figured out which one yet. If you discover which node is causing the problem, please let me know.
Title: Re: Procedural dunes - problem with the render
Post by: cyphyr on January 09, 2010, 05:42:51 PM
For the sake of completeness here's the render done with two threads at its original settings. Still one error.
Richard
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on January 09, 2010, 05:44:01 PM
I was just rendering the same view with min/max threads = 1 and there's no spike !
I'm going to reduce the whole process, function after function, until the spikes disappear. Then I tell you.
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on January 10, 2010, 04:26:31 PM
I'm nearly sure that it has something to do with the "Perlin 3D scalar".
When I delete all of these P3D from my process, I have no more spike (see the new render).
Now I'm rendering another view where the landscape is based *only* on the Perlin 3D scalar, and the spikes come back.

So, what can I do now ?  :-\
Title: Re: Procedural dunes - problem with the render
Post by: Henry Blewer on January 10, 2010, 07:37:06 PM
Looks very good. This is a technique I have been wanting to explore, but do not have time for yet.
Title: Re: Procedural dunes - problem with the render
Post by: Oshyan on January 10, 2010, 08:19:15 PM
Test your inputs and settings to the Perlin 3D Scalar and see if it's being caused by extreme settings/inputs.

- Oshyan
Title: Re: Procedural dunes - problem with the render
Post by: Matt on January 10, 2010, 08:39:54 PM
Thanks for narrowing it down. I don't think there's anything unusual with your setup. No further testing needed on your part. It's probably something I overlooked when making the Perlin node safe for multi-threading, or I incorrectly optimised something later. I'll fix it.
Title: Re: Procedural dunes - problem with the render
Post by: Hetzen on January 11, 2010, 09:01:33 AM
Just to add, I've been experiencing the same problem when using Perlin too.
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on December 05, 2010, 04:56:00 PM
I still got the problem with the new version (2.2)...  :-[
Title: Re: Procedural dunes - problem with the render
Post by: Oshyan on December 05, 2010, 05:03:02 PM
This issue has not yet been addressed. Please refer to the release notes/change log for each release as all changes, fixes, and new features will be detailed there:
http://www.planetside.co.uk/content/view/59/97/

- Oshyan
Title: Re: Procedural dunes - problem with the render
Post by: wiwine on December 05, 2010, 05:07:46 PM
This topic was opened during last january and (considering the last answer from Matt) I thought where would be a fix for this problem... now I can see it was totally forgotten.
Title: Re: Procedural dunes - problem with the render
Post by: Goms on December 06, 2010, 02:07:59 AM
Yip, i get the same error. something is wrong with the perlin noise node. but well, you can use a power fractal instead.
Title: Re: Procedural dunes - problem with the render
Post by: Matt on December 06, 2010, 09:12:57 PM
Quote from: wiwine on December 05, 2010, 05:07:46 PM
This topic was opened during last january and (considering the last answer from Matt) I thought where would be a fix for this problem... now I can see it was totally forgotten.

I'm sorry about that. I'll make sure it's in the next update. We'll also have a much faster turnaround on the next update.
Title: Re: Procedural dunes - problem with the render
Post by: reck on December 07, 2010, 07:14:56 PM
Quote from: wiwine on December 05, 2010, 05:07:46 PM
This topic was opened during last january and (considering the last answer from Matt) I thought where would be a fix for this problem... now I can see it was totally forgotten.

I think that's reasonable.

Title: Re: Procedural dunes - problem with the render
Post by: wiwine on February 02, 2011, 05:09:12 AM
No more problem with the new version. Thank you very much !  :)

Now I can go on with the "dunes & sandwaves construction".