Planetside Software Forums

Support => Terragen Support => Topic started by: WAS on December 23, 2020, 12:00:23 AM

Title: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 12:00:23 AM
I'm on the latest 4.5.54 update, so not sure if this was around before, but with the Path Tracer, surfaces are reflecting luminous star points. :O

The terrain has no reflection shaders, so if this is internal with the PT, perhaps some settings should be exposed in the render node to remedy with roughness or something if it's not a "bug", though I can't see how it's not if we wanted to image map stars or procedural.  Turning up environment light exaggerates the effects and smaller stars become visible on the terrain.
Title: Re: Path Tracer Surface Reflection Issue
Post by: Dune on December 23, 2020, 02:56:15 AM
It looks like the same 'issue' where the sun shines through the terrain if not shadowed out, so not on the terrain itself. You can test by having a large luminous block half behind the mountain, I guess.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 01:31:47 PM
You can see that the stars are limited by altitude, and dont exist behind the terrain mostly. Maybe a faint one behind the the peak. But again it is reflection as it is adjusted bt strength om surfaces. It's also the same type effect I had a issue with in PT and Standard with real reflection shaders, they grab star points perfectly without ruining the effect for other lighting.
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 23, 2020, 01:39:35 PM
A starry background is very difficult to sample without some kind of preprocessing (e.g. Image Based Lighting) because most samples are dark and only a tiny fraction are bright. If this is the only thing the path tracer can find for illumination, it will be extremely inefficient. It would be better to create a separate background object which is invisible to the camera but seen by other rays, which has a smoother texture.
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 23, 2020, 01:47:09 PM
If rendering with the path tracer, Enviro Light only affects the atmosphere and cloud layer v2. So if that changes the dots then the dots are samples of the atmosphere. Does it render like this if you don't have stars? What is the colour of the surface? It may be undersampling due to low albedo and low light.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 01:48:49 PM
My issue is it worked before, unless you had an actual reflective shader on the surface. Now in PT you just can't have a image map or stars.

Additionally, I don't think it's light more than reflection, as luminosity creates very blured large circles at distance.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 01:50:13 PM
Quote from: Matt on December 23, 2020, 01:47:09 PMIf rendering with the path tracer, Enviro Light only affects the atmosphere and cloud layer v2. So if that changes the dots then the dots are samples of the atmosphere. Does it render like this if you don't have stars? What is the colour of the surface? It may be undersampling due to low albedo and low light.

The surface is just the based Colour shader from default scene. It is just the default scene with a new seed and a stata shader. And yeah there is no issue without the stars.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 01:52:28 PM
Loading up the first save which is just the default scene with pasted star background and giving it a render to be sure.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 01:56:34 PM
Yeah, same issue. Without stars no issue.

If the terrain is sampling such small reflected shapes (of light) from so far away, I can absolutely see why it's having trouble in peoples scenes and slowing down with the terrain near the camera at the bottom of the shot with refraction.

Edit: I'd imagine a global luminosity max distance would help for it's light reach. I don't see why it should be finite.
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 23, 2020, 02:47:05 PM
Quote from: WAS on December 23, 2020, 01:48:49 PMMy issue is it worked before

By now you probably know what my next suggestion will be. Whenever you think something has changed for the worse, try it in older build to be sure, so we are not chasing a red herring. If it worked before there was probably something different about the way you did it last time, so see if you can find out what that was.

Help the renderer by creating a separate blurry version of the sky for the path tracer to sample, invisible to the camera but visible to other rays.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 03:07:39 PM
I'm not sure how I could do anything other than luminous points on a background sphere? That's all I ever have done. But I have done night shots with my stars before. Perhaps I wasn't path tracing like I wanted, was the issue. Even if it didn't, or did, it's a bug, Matt. A non-reflective surface shouldn't be reflecting points, and this is clearly going to slow down scenes, and is probably what we've been complaining about for over a year now with the PT renderer.

The procedural luminosity can't get "blurry" as it's function based.

And I don't think cheating this, just for stars is appropriate when this is clearly going to impact any scene significantly, only masked by lighting. There should be no reflection on anything unless applied, really, even in PT, regardles of "realism". If the user doesn't want it there, but PT to effect other things, that should be how it is imo. Applying a reflection shader can provide that realism if needed.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 03:11:47 PM
Also, holding the stars out (invisible) still applies the same effect on the ground, so I'd imagine you'd have to do it in post. Certainly wouldn't want to mess around with blurring image maps and using crap based assets (also the star maps I have in spherical are very tightly packed of even smaller points).
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 23, 2020, 03:25:15 PM
I understand your frustration with this, but I hope you can understand that it's not a bug, it's a fundamental problem with sampling a high frequency, sparse signal. Any path tracer will struggle with this particular setup, but could probably reduce the noise by choosing a low number for the max sample intensity (which some renderers make available in render settings).

To render a diffuse surface the renderer sends out many rays per pixel. If 999/1000 rays hit empty sky, most pixels will not see any starlight, only a few pixels will hit starlight. If this were a bright scene we would call these bright pixels fireflies and they would be dealt with by clamping the max brightness, but in a dark scene like yours they are dim enough not to be clamped.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 03:27:32 PM
The problem I see is it even sampling the low luminosity stars, so far away to begin with. And in usual instances with luminosity, the light reflected is a huuuge circular blob representation of what it's reflecting. This isn't even representative of light reflection (diffusion) but mirror reflection.

I mean, take a night with no moon, but stars, in the middle of the mountains, it's usually pitch black on the ground, so much so you're going to hurt yourself. Starlight isn't doing anything to help you.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 03:33:09 PM
That's why I mentioned some sort of global max distance for luminosity sources. Seems they're creating pollution for the renderer.
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 23, 2020, 03:36:29 PM
Quote from: WAS on December 23, 2020, 03:33:09 PMThat's why I mentioned some sort of global max distance for luminosity sources. Seems they're creating pollution for the renderer.

Make the background invisible to other rays and it will have exactly the same effect.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 03:40:10 PM
I thought you're saying to do the opposite. Though, if I add water then, it won't reflect when it needs too.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 03:42:04 PM
Did you mean, like, if it were a image map, have one background invisible, and a blurred source (like gaussian), and than another sphere with invisible to rays, but visible, with the "crisp" version? To retain enviro lighting?
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 23, 2020, 04:19:02 PM
Yes.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 23, 2020, 06:07:37 PM
Curious how that will look. Wouldn't be hard to export spherical maps. Reason I don't want to use a image map from elsewhere is they're all just the Milky Way, and I want to be "otherworldly"
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 28, 2020, 12:22:50 AM
Still having issues with this in the latest version. Now, during the daytime, speckles of atmosphere are reflecting on the terrain in PT. Again, no reflection shader.

Notice all the blue pixels here. There is no blue shaders. There is the base colour shader and 0.5 white on FS and 0.5 white on surface layer masked by displacement setup.

This is definitely introduced in this latest version, and seems like a bug. All the speckle in the last image is blue-sh, and only thing blue in the scene is the sky (before the bucket is finished it's easy to see the solid blue errant pixels). Noise was common but not direct reflection like spots.
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 28, 2020, 01:54:29 AM
Quote from: WAS on December 28, 2020, 12:22:50 AMStill having issues with this in the latest version. Now, during the daytime, speckles of atmosphere are reflecting on the terrain in PT. Again, no reflection shader.

Notice all the blue pixels here. There is no blue shaders. There is the base colour shader and 0.5 white on FS and 0.5 white on surface layer masked by displacement setup.

This is noise/variance from the path tracer. At low anti-aliasing settings the path tracer aggressively reduces the number of samples, but at higher AA or lower pixel noise threshold this should look a lot better.

QuoteThis is definitely introduced in this latest version

Have you tested in an older version to be sure of this? https://planetside.co.uk/forums/index.php?msg=283731
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 28, 2020, 02:57:52 PM
I don't have a planetside account (still) to get any past versions, also reformatted PC for better support with TG and didn't save downloaded files. But I consistently work on surface shaders and while the PT has been noisy, have never noticed blue speckles from the sky ever.

You can still plainly see the speckles at AA6 and AA7, though, Matt. In  fact, you get more of them. Lol And AA7 is fairly noise-less for me, but still can see plain blue speckling independent of noise.

I'm not sure why you can't see an obvious issue that would have been complained about previously if their shaders are being messed up with blue speckles form the sky, or stars. Noise was always common, in shadow, and light, but not reflection speckles of solid colour from a source (sky, stars, etc). Shadows are bluish cause of ambient lighting and the sky, but the solid bright reflection like pixels are errant.

JPEG kinda kills the blue but all the "white" speckling is the blue.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 28, 2020, 03:10:57 PM
I would have obviously noticed such an annoying issue before that literally triggers my OCD. lol It now seems AA7 isn't even good enough. PT should be balanced for quality, on a scale similar to standard.

IMO the Path Tracer is currently broken and won't be using it. Can't have stars suddenly, atmosphere speckling a nearly flat terrain. Just bad.

Too me it seems obvious the new specular models are st fault, as that is a significant lighting model change and im sure PT defaults to one of them when no shader specifies one?
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 30, 2020, 07:25:40 AM
Quote from: WAS on December 28, 2020, 03:10:57 PMI would have obviously noticed such an annoying issue before that literally triggers my OCD. lol It now seems AA7 isn't even good enough. PT should be balanced for quality, on a scale similar to standard.

It's partly caused by the low albedo of the surface, and the optimisation choices the path tracer makes for low albedo surfaces. They aren't optimal for large open areas without texture. You can compensate for this by increasing the path tracer's "Max samples" to something like 100. Combine this with AA 8 and a PNT < 0.01, or whatever you prefer, and it should be possible to make a fairly clean image. In a scene with more texture you won't need to go that low. But there is room for improvement in the renderer, for sure.

QuoteToo me it seems obvious the new specular models are st fault, as that is a significant lighting model change and im sure PT defaults to one of them when no shader specifies one?

It might seem obvious but it's not true. Most of the shaders don't have a specular model and they are not relevant to your scene, but I tested your TGD to make sure and it renders about the same in 4.4 and 4.5.
Title: Re: Path Tracer Surface Reflection Issue
Post by: Matt on December 30, 2020, 07:41:26 AM
Quote from: WAS on December 28, 2020, 02:57:52 PMI don't have a planetside account (still) to get any past versions

Your license was created outside of the store, but if you create an account I will reassign your license to your account. You can do that here:
https://planetside.co.uk/returning-customers/

You might already have an account from downloading free versions, so try logging in with that first.

After you've done that, let me know and I'll create a replacement license.
Title: Re: Path Tracer Surface Reflection Issue
Post by: WAS on December 30, 2020, 04:14:24 PM
Will we be getting any more samples from that max samples option? I believe I remember you saying you may add higher options cause of the noise we were getting in heavy shadow on SSS? I know lowering the PNT really hits the render hard. When I ramp up max samples, I don't see as heavy a impact on render time as messing with AA customization. Maybe that would also help here without going so hard on AA,which with PT at least, really hits hard.

I still feel I never noticed such hard point reflections of colour before. Noise, yes, speckling from PT in shadows, yes.