A Fix For This?

Started by RichTwo, February 27, 2012, 12:17:14 pm

Previous topic - Next topic

RichTwo

I'm having a bit of an issue when rendering a canyon scene with rather steep stratified walls.  In the shaded areas these little bluish specks appear.  It's like the blue sky poking through the rock.  And they only appear on vertical surfaces.  Not a huge thing to postwork them out, but maybe there's something to adjust to prevent it.

I have rendered with the same .tgd on two different machines and have gotten similar results.  The flecks exist in some areas and not in others, and disappear or reappear when the camera is moved. There are some radical displacements going on, so I suspect that may be partially to blame.  But why some areas are affected while others aren't? 

What I have tried: setting the displacement tolerance to 2 and checking ray-traced atmosphere.  Neither had any effect.  I fear ray-tracing everything, because I don't want an abysmally long render time.  The computers were both older dual-core 32 bit.

Anyway I've attached the .tgd if anyone wants to delve into it.  A lot of "borrowed" stuff here, and no offense meant if I don't give credit to the contributors.  Thanks for any help!
You don't need a weatherman to know which way the wind blows...

RichTwo

Also this - same thing shows up in the render preview.
You don't need a weatherman to know which way the wind blows...

dandelO

Hi, Rich. I have had this problem many times, it comes from extreme displacements, usually completely vertical stretched terrain.
I found, when the problem appears using the strata and outcrops shader, that reducing 'hard layer steepness' from '1' can remove the errors. I managed to keep it very close to '1', I think '0.95' was around the tipping point and the errors returned after exceeding that. You might try a value of '0.5', crop render a problem area and incrementally increase the steepness value with test-crops until it's as high as you can make it without the tears reappearing. I'll try to have a look at the file in a while, I'm rendering something just now. Hope that helps in the meantime. :)

RichTwo

Thanks for the tip about the strata, dandelO.  I took steepness down to 0.5 and did a test crop - and still getting the tears, but not as severe.   As I stated, it's confined to the shaded areas.  I'm willing to bet the vertical stretch is a factor.  There's a -750X displacement X 4 on the canyons.  You will also see I have connected the Strata / Outcrops shader to warping power fractal which has a displacement of +1e006.  Just a little trick I figured out.  It keeps the strata from appearing everywhere.

The "canyonizing" part was originally cyphyr's "Monterrey Canyon" that I stripped down to the essentials.  I had played with the color adjusts, trying to lessen the steepness there, but that almost entirely killed the effects I wanted to keep. 
You don't need a weatherman to know which way the wind blows...

Oshyan

You could try increasing Displacement Tolerance even further. This will also raise render time but less than completely raytracing the terrain at decent quality.

- Oshyan

dandelO

Hi, Rich. I had a look. You really do have some wacky things going on in there!
I didn't actually find any strata steepness set above 0.25 in the file. I did find lots of fractals that won't be doing what you expect them to, though. There are at least 4 or 5 power fractals that have far larger 'smallest scale' than they should to make them work 'properly', you should never have a larger 'smallest scale' than 'feature scale', let alone larger than the 'lead-in scale'! ;)
Lead-in scale = largest number, feature scale = middle number(or, equal to largest), smallest = smallest number(or, at least never exceeding feature scale). You could even have all scales the same without running into confusion and the fractal will do what you think it should be doing. When you get into mixing extremely widespread scales and sometimes laid out in a backwards order(like smallest scale exceeding lead-in etc.) well, I'm not sure it would cause 'errors', as such, but the fractal certainly won't be doing what you think it's meant to be doing.
There's also some nodes in there applying really HUGE amounts of displacement, especially in comparison to the scales they are displacing by.

I tried to play around with it a little but the network is extremely complicated, far more so than I think it needs to be for the image you're trying to make, by the looks of your previews.
Eventually, I completely broke it and lost the entire look of the scene just by trying to tidy up node scales and put things in the right order! :D

My advice would be to start afresh from a default project and add just one shader at a time to apply each aspect and feature you want to achieve. First, a nice steep fractal, work with it until you get a form you like as a base, next add any more detail-adding fractals/strata settings/redirects/etc. but try and get the most out of every single node you put in there to ultimately use as little nodes as possible to reach your goal. I think you could get similar, if not better, results than your preview render, and possibly by not even using 1/10th the number of nodes as are in the .tgd you posted.

Maybe you just have a better grip on multi-tasking than I do but to try and control all those nodes drove me very quickly insane! I do make some pretty wacky things with TG myself sometimes, things that look like they might be very complexed but actually are not at all and usually use relatively little nodes, I've never had a node network like this one!

Sorry I couldn't be any more help but I can say that those tears and holes in your terrain are definitely coming from really extreme settings, in multiple nodes. Good luck, phew! :D ;)

Matt

February 28, 2012, 03:06:04 am #6 Last Edit: February 28, 2012, 03:09:47 am by Matt
Using the following render nodes will fix the holes. Unfortunately, you will lose some detail on the cliffs. On the up side, it will render faster.

This code can be copied and pasted into the Node Network.


<terragen_clip>
<render
name = "Quick Render"
gui_use_node_pos = "1"
gui_node_pos = "380 1180 0"
gui_group = "Renderers"
master = "0"
image_width = "640"
lock_aspect_ratio = "1"
image_height = "360"
image_aspect_ratio = "1.777777778"
pixel_aspect_ratio = "1"
camera = "Render Camera"
surfaces_visible = "1"
atmosphere_visible = "1"
do_shadows = "1"
detail = "0.5"
anti-aliasing = "5"
ray_trace_objects = "0"
ray_trace_atmosphere = "0"
GI_relative_detail = "0"
GI_sample_quality = "0"
GI_blur_radius = "8"
supersample_prepass = "1"
GI_surface_details = "0"
do_crop_region = "0"
crop_left = "0"
crop_right = "1"
crop_bottom = "0"
crop_top = "0.9999999998"
crop_to_object = "0"
crop_object_name = ""
pixel_filter = "2"
anti-aliasing_bloom = "0"
detail_blending = "0"
displacement_filter = "1"
microvertex_jittering = "0"
detail_jittering = "0"
lock_subdiv_to_frame = "0"
lock_to_frame_number = "1"
do_reverse_primary_rays = "0"
reverse_primary_rays_multiplier = "1"
fix_holes = "1"
do_ray_traced_shadows = "1"
ray_trace_everything = "0"
soft_clip_effect = "1"
soft_clip_softness = "1"
compensate_soft_clip = "1"
contrast = "1"
contrast_adjust = "0.25"
gamma_correction = "2.2"
minimum_threads = "1"
maximum_threads = "16"
size_of_subdiv_cache_in_Mb = "400"
preallocate_subdiv_cache = "0"
ray_detail_region = "1"
ray_detail_region_padding = "0"
GI_prepass_padding = "0"
output_image_filename = "C:/temp.%04d.bmp"
extra_output_images = "1"
extra_output_image_filename = "C:/temp.IMAGETYPE.%04d.bmp"
micro_exporter = "0"
micro_exporter_name = ""
sequence_first = "1"
sequence_last = "100"
sequence_step = "1"
>
<render_pixel_sampler
name = "Render pixel sampler 01"
gui_use_node_pos = "1"
gui_node_pos = "580 1180 0"
gui_group = ""
anti-aliasing = "5"
customise_sampling = "0"
first_sampling_level = "2"
pixel_noise_threshold = "0.06"
>
</render_pixel_sampler>
<render_bucket_controls
name = "Render bucket controls 02"
gui_use_node_pos = "1"
gui_node_pos = "580 1360 0"
gui_group = ""
max_bucket_size = "256 256"
allow_auto_reduction = "1"
>
</render_bucket_controls>
<render_subdiv_settings
name = "Render subdiv settings 02"
gui_use_node_pos = "1"
gui_node_pos = "760 1240 0"
gui_group = ""
fully_adaptive = "0"
force_all_edges = "1"
jitter_shading_points = "1"
ray_detail_multiplier = "0.25"
>
</render_subdiv_settings>
</render>
<render
name = "Full Render"
gui_use_node_pos = "1"
gui_node_pos = "380 1240 0"
gui_group = "Renderers"
master = "1"
image_width = "1200"
lock_aspect_ratio = "1"
image_height = "675"
image_aspect_ratio = "1.777777778"
pixel_aspect_ratio = "1"
camera = "Render Camera"
surfaces_visible = "1"
atmosphere_visible = "1"
do_shadows = "1"
detail = "0.8"
anti-aliasing = "7"
ray_trace_objects = "0"
ray_trace_atmosphere = "0"
GI_relative_detail = "0"
GI_sample_quality = "0"
GI_blur_radius = "8"
supersample_prepass = "1"
GI_surface_details = "0"
do_crop_region = "0"
crop_left = "0"
crop_right = "1"
crop_bottom = "0"
crop_top = "1"
crop_to_object = "0"
crop_object_name = ""
pixel_filter = "5"
anti-aliasing_bloom = "1"
detail_blending = "0"
displacement_filter = "1"
microvertex_jittering = "0"
detail_jittering = "0"
lock_subdiv_to_frame = "0"
lock_to_frame_number = "1"
do_reverse_primary_rays = "0"
reverse_primary_rays_multiplier = "1"
fix_holes = "1"
do_ray_traced_shadows = "1"
ray_trace_everything = "0"
soft_clip_effect = "1"
soft_clip_softness = "1"
compensate_soft_clip = "1"
contrast = "1"
contrast_adjust = "0.3"
gamma_correction = "2.2"
minimum_threads = "1"
maximum_threads = "16"
size_of_subdiv_cache_in_Mb = "400"
preallocate_subdiv_cache = "0"
ray_detail_region = "1"
ray_detail_region_padding = "0"
GI_prepass_padding = "0"
output_image_filename = "C:/temp.%04d.bmp"
extra_output_images = "1"
extra_output_image_filename = "C:/temp.IMAGETYPE.%04d.bmp"
micro_exporter = "0"
micro_exporter_name = ""
sequence_first = "1"
sequence_last = "100"
sequence_step = "1"
>
<render_bucket_controls
name = "Render bucket controls 01"
gui_use_node_pos = "1"
gui_node_pos = "580 1480 0"
gui_group = ""
max_bucket_size = "256 256"
allow_auto_reduction = "1"
>
</render_bucket_controls>
<render_pixel_sampler
name = "Render pixel sampler 02"
gui_use_node_pos = "1"
gui_node_pos = "580 1360 0"
gui_group = ""
anti-aliasing = "7"
customise_sampling = "0"
first_sampling_level = "2"
pixel_noise_threshold = "0.04285714286"
>
</render_pixel_sampler>
<render_subdiv_settings
name = "Render subdiv settings 02_1"
gui_use_node_pos = "1"
gui_node_pos = "760 1300 0"
gui_group = ""
fully_adaptive = "0"
force_all_edges = "1"
jitter_shading_points = "1"
ray_detail_multiplier = "0.25"
>
</render_subdiv_settings>
</render>
</terragen_clip>


The changes I made (included in the above) are:

Extra tab -> Microvertex jittering OFF
Extra tab -> Detail jittering OFF
Internal network -> Render subdiv settings -> Fully adaptive OFF
Internal network -> Render subdiv settings -> Force all edges ON

If you want to get the detail back into the steepest cliffs, turn Fully adaptive back ON, but you may get some holes again. Not as many as before, though. It will also increase render times quite a lot.

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

RichTwo

What dandelO says is true - I've used some extreme settings.  Mostly it's the displacement on the warping fractal.  I've experimented with that before and had no issues.  I'm thinking it's that multiple displacement stack-up paired with the color adjust clamps that's the main cause.  I may have to rethink that.

I pretty much know what-does-what and why ???, and yeah it's complex.  But basically, it's two cojoined displacement set-ups.  I got both of these from File Sharing here, I'm sure and then peeled away the parts I didn't want.  But I sure appreciate your looking into it.   

Back in my heyday with TG Classic and World Machine, I'd been known to go off the "deep end" and I guess it's true even now.  I tend to push the pedal to the metal - or try to go straight through it just to see what TG2 can do.  There are limits to everything, I see.

Thanks for the support too, Matt and Oshyan!  I'll have a go at your ideas, though if render times go off the map I will be taking another route.
You don't need a weatherman to know which way the wind blows...

dandelO

February 28, 2012, 11:36:26 am #8 Last Edit: February 28, 2012, 11:38:06 am by dandelO
Definitely use Matt's edited render nodes. There's a node in there that you probably won't have in the internal network of the original render node that is fixing things and the unchecking of 'fully adaptive' in that node really takes render time down a lot, while sacrificing some detail and displaced edge accuracy, of course.

What seemed really wrong in your setup were the jumbled scales in most of the fractal nodes, where the smallest scale in each node was normally much bigger than the feature or lead-in and that isn't how they should be set to work properly. I tried to rearrange those into a more logical order but the entire look of the scene was lost when they were set up 'correctly'.

Use Matt's render nodes to fix the issue without the need to rework the entire scene and tame those giant values. That's good advice but since it's a kind of 'hidden' node, I didn't think to mention it here. I remember Oshyan posted a fix to pretty nearly the same problem for someone's strata-type scene in the past using the subdivision settings. :)

RichTwo

Martin - I've read what you've posted about fractal lead-in values being smaller than the smallest scale, and I'm just not seeing it.  However, the feature scales of the terrain and warp fractals do have a value of 1.  I'm no expert at this, but what I suspect that does is generate noise based only on the lead-in and smallest scales.  In my set-up that noise becomes simply displaced or causes the warp.   Normally the feature scale's purpose is to confine the two limits to that size.  But in the set-up the terrain fractal is paired with the voronoi function which somehow cancels the limiting effect.  And on the warp, the scale of 1 only seems to restrain the effect in a "tighter" fashion.  Just my speculation, of course.

Matt - Thanks for sharing that render node set up; it's definitely a keeper.  I don't see too much difference in render times (blaming that on this old clunker I'm forced to use... >:( ), but it looks like the blue specks are gone.  Otherwise the quality looks spot on. 

It's great that the developers take a personal approach here!
You don't need a weatherman to know which way the wind blows...

Dune

Would you care to explain why you use an AA of 7, Matt? From earlier posts I learned that 2, 4, 8, 16, 32 were the 'best' values. And what does fully adaptive do? I rendered a small area of an object, and fully adaptive off too a bit longer than when it was on. I saw no difference in quality, but it might have to do with terrain itself.

Tangled-Universe

Ulco, I think the fully adaptive setting only affects the rasterized renderer, so if you rendered an object with the raytracer then you wouldn't notice much of a difference. At least, visually.

Matt

Ulco, I didn't choose the AA value. I left everything how I found it, except for the settings I mentioned.

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