Planetside Software Forums

General => Terragen Discussion => Topic started by: midnight.mangler on April 02, 2019, 02:21:49 AM

Title: Sparkles when using bump map and reflective shader
Post by: midnight.mangler on April 02, 2019, 02:21:49 AM
Hi folks

I have some "sparkles / fireflies" when using a bump map with the reflective shader. Tried to attach my image but it's too large - will render something smaller. In the meantime any suggestions on what the issue could be? It is an imported .obj using a greyscale image map as the bump / displacement.

Thanks!
Title: Re: Sparkles when using bump map and reflective shader
Post by: Dune on April 02, 2019, 05:14:16 AM
With bump on an object the reflections will be concentrated more on the bumps, I guess that's the problem. You really need reflection? Try increasing roughness or decreasing highlight intensity.
Title: Re: Sparkles when using bump map and reflective shader
Post by: Oshyan on April 02, 2019, 03:23:03 PM
Do you have any of the post effects enabled (glow, starburst)?

You should always attach images here in JPG, which should not be too large in file size. If the resolution is too high, just resample/resize. I use XnView, free and easy, cross-platform. https://www.xnview.com/en/

- Oshyan
Title: Re: Sparkles when using bump map and reflective shader
Post by: Dune on April 03, 2019, 02:04:09 AM
Or a crop of an image.
Title: Re: Sparkles when using bump map and reflective shader
Post by: midnight.mangler on April 03, 2019, 01:45:47 PM
Thanks folks. I tinkered a bit more and managed to largely fix the sparkles (Oshyan's hint helped). But there are still areas in the render with sparkles.

Please have a look - antialiasing is cranked way up. Is there something else I should be doing?

If I could fix this I would be SUPER happy as I am loving the "look" I can get with Terragen! Really enjoying it even if its a bit trial and error to figure out. Just seems to produce more realistic atmospherics than Vue "out the box".
Title: Re: Sparkles when using bump map and reflective shader
Post by: Oshyan on April 03, 2019, 08:25:07 PM
That looks like it might be texture aliasing. Can you post the texture image or a crop of it? Are you using Displacement at all? What Pixel Reconstruction (AA) filter are you using as well? That may have an effect.

In the end you may need to manually soften/blur the texture slightly to avoid aliasing. Of course this assumes you are already using Smooth Interpolation for the texture. If this is loaded through a Default Shader, then I believe that is the default/forced (i.e. only) option, but through an Image Map Shader you can turn Smooth Interpolation on and off. Likely it's on (through the Default Shader) and so is not the culprit, but I thought I'd mention it.

- Oshyan
Title: Re: Sparkles when using bump map and reflective shader
Post by: bobbystahr on April 03, 2019, 10:17:32 PM
you could try running the .obj through PoseRay and do Recalculate Normals in the Groups Tab.. that heals a lot of ills
Title: Re: Sparkles when using bump map and reflective shader
Post by: Dune on April 04, 2019, 01:55:35 AM
Looks like a combination of tiny, grainy bump all over the plane plus starburts/glow. I think if you take that grainy bump out, you'll have a smoother render.
Title: Re: Sparkles when using bump map and reflective shader
Post by: midnight.mangler on April 04, 2019, 03:17:53 AM
Thanks guys.

That "tiny grainy bump" is meant to represent straight lines which are corrugations in the skin of the aircraft to allow for thermal expansion. If you look at the detail of the bump from straight on you can see the lines are straight. It's at the glancing angle where you have "break up" of those lines. The map itself is fine.

I will give Oshyan's suggestion a try and give it a slight blur and see if that works.
Title: Re: Sparkles when using bump map and reflective shader
Post by: midnight.mangler on April 04, 2019, 03:16:39 PM
Hmmm. Pretty stumped. I have tried all the pixel reconstruction filters and have blurred the bump map. While varying the PR filters leads to some different results it doesn't fix the problem. I am using the default shader coupled with a reflective shader (ie not coupled to a displacement). The displacement is set through the default shader.

The bump map itself is pretty high res. Do I need to subdivide the model further perhaps? It's not clear to me if Terragen is actually using displacement or it's really a bump map.
Title: Re: Sparkles when using bump map and reflective shader
Post by: Matt on April 04, 2019, 03:52:52 PM
This is a difficult thing to render because the reflections are extremely bright and they change very rapidly. What are your anti-aliasing settings? I think you'll need very high AA (at least 8, probably a lot more) to resolve aliasing in such bright reflections. The new "robust adaptive sampler" with high adaptivity (e.g. 1/64 or 1/256) should help to speed up the rest of the image and focus work on the problem areas. With very high AA the default value for "pixel noise threshold" will be quite low, but you can increase this to make the render go faster.
Title: Re: Sparkles when using bump map and reflective shader
Post by: bobbystahr on April 04, 2019, 03:57:26 PM
Quote from: midnight.mangler on April 04, 2019, 03:16:39 PM
Hmmm. Pretty stumped. I have tried all the pixel reconstruction filters and have blurred the bump map. While varying the PR filters leads to some different results it doesn't fix the problem. I am using the default shader coupled with a reflective shader (ie not coupled to a displacement). The displacement is set through the default shader.

The bump map itself is pretty high res. Do I need to subdivide the model further perhaps? It's not clear to me if Terragen is actually using displacement or it's really a bump map.


Unless you set an object's rendering to Force Displacement in the object's render tab it will be bump only. SubD might help.

I see Matt got here first with great advice...love this forum!
Title: Re: Sparkles when using bump map and reflective shader
Post by: midnight.mangler on April 05, 2019, 12:16:22 AM
Thanks guys! I'll try all those suggestions this weekend. Very much appreciate the help!
Title: Re: Sparkles when using bump map and reflective shader
Post by: sboerner on April 05, 2019, 01:36:31 AM
One more suggestion (if you're not already suffering from suggestion overload  :) ) might be to try the path tracer instead of the standard renderer. That is, if you haven't already. I've found that it resolves fine displacements on object surfaces much better in some cases, especially repeating lines or grooves.

The rendering time will be about 3x the standard renderer, so maybe try a small crop first.


Title: Re: Sparkles when using bump map and reflective shader
Post by: midnight.mangler on April 05, 2019, 02:01:45 AM
Thank you Steve - I did try it previously but this did not seem to help. But maybe combined with the different suggestions above it will come together.

Appreciate any and all suggestions as I am an enthusiastic Terragen noob! :)
Title: Re: Sparkles when using bump map and reflective shader
Post by: midnight.mangler on April 05, 2019, 12:57:56 PM
I appreciate all the advice and tips as I am learning stuff - but haven't managed to fix it so far with all the above suggestions. Appreciate any other ideas no matter how off the wall. ;-)

Title: Re: Sparkles when using bump map and reflective shader
Post by: Oshyan on April 05, 2019, 11:26:49 PM
The Path Tracer uses Defer All for shading, which is why it handles some surfaces better than the normal renderer. You can enable Defer All *separately* from the path tracer and it will be faster than with PT (but with the standard lighting, not a realistic). Defer All should improve surface quality for displaceable objects, including the plant, terrains, etc., but I don't think it should affect non-displaceable objects, for example any imported object.

- Oshyan