Planetside Software Forums

Support => Terragen Support => Topic started by: WAS on February 18, 2020, 12:57:15 pm

Title: Interior Illumination - Water \ Reflections issues
Post by: WAS on February 18, 2020, 12:57:15 pm
I have a PT render going on 20 threads that's now at 37 hours and only 16%. I'm sure there are settings that are off, but even from the get go adding the water plane, without reflections for water on rocks near it, and rock ambient reflection, was taking forever to render at 0.5 AA 2. I thought i'd give the server a try with a larger PT render at MPD 0.7 AA 8 (for noise in darkness) and I'm not sure these times are desirable.

I feel there may be issues with light calculation in the cave with reflections and water. I can send the TGD via email. For example, when the water is added, things get VERY dark in the interior, which is odd since you'd think the plane reflection surface would actually provide ambient light, as well as reflected direct light (like how those shore caves in Oregon in Canon Beach area). Without the plane, and non-reflective light surfaces, things are brighter by a pretty large factor.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: Matt on February 19, 2020, 12:07:13 am
We've replied to your email to the support address with some optimization ideas. There are multiple factors which have compounded to result in a very high render time. I think this can be brought down dramatically by making all those changes, but beyond that it may still need further simplification of the node network (particularly inside the cave), so please let us know your results.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: WAS on February 19, 2020, 01:02:11 am
Quote from: Matt on February 19, 2020, 12:07:13 amWe've replied to your email to the support address with some optimization ideas. There are multiple factors which have compounded to result in a very high render time. I think this can be brought down dramatically by making all those changes, but beyond that it may still need further simplification of the node network (particularly inside the cave), so please let us know your results.

That same node network works fine outside the cave, though, for example my landbridge I'm working on. It seems to be when the camera inside the cave in shadow where the issue arises. So I don't think it's the node network. The voronoi shader for example has far more extreme settings in my new project. Additionally, just disabling water, like I mentioned, cuts out almost all the issue. I'll look into your other suggestions.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: WAS on February 19, 2020, 01:04:10 am
Not only is the cube extensively warped all over the place unlike one warp in cave, there is extensive colouring and micro disp surfaces added ontop of more exaggerated Voronoi Disp in this scene, with no issues (same project file and settings as cave scene). heck we even got slow sinus waves.

Pretty much only reason I brought it up besides some improvements that could be made to overall scene optimization, was the water shader issue inside a cave like this. Circumstances seems to lead to something beyond my control just adding a lake object and water shader with interior illumination
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: Matt on February 19, 2020, 02:00:24 am
The view from inside the cave is much more challenging for the renderer. Almost the entire frame is trying to bounce light around inside of the cave. About half of the rays that leave the cave interact with the water, and then more bounces occur. So the water makes it slower. There can be many things that slow down a render, which may not be a problem when taken in isolation. But when you combine them together, the slowdown effect can be compounded. The cave interior scene has a lighting situation which the adaptive sampler sees as noisy, this will take more AA samples. Combine this with a shader network which is much, much slower to compute than the default scene (partly because of redundant execution paths which could be simplified). These effects multiply together. Combine that with high Ray Detail Multiplier and the number is multiplied again. Combined with high AA and it's multiplied again. Combined with the water that the rays hit when they emerge from the cave, well, you get the picture.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: WAS on February 19, 2020, 02:23:22 am
So, like I thought, areas for your improvement. :) Good project to examine in your future tests. This shouldn't be beyond TGs scope, honestly. We've always wanted to do caves but lacked the tools, and it's a good area for PT to shine with lighting (and work on noise). Dark areas seem to be issues all over TG, like with SSS, those areas seem to take the longest.

Thanks.

RDM seems to be the biggest issue, as it's not needed for the little tide pools which don't even exist anymore, it's already at 3% in 35 minutes.

Speaking of this, it'd be cool to have some what to isolate RDM in just water, and not effect the whole scene.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: Matt on February 19, 2020, 02:27:50 am
Yeah, fair enough. I would just like to stress that for challenging renders, the complexity of the shader network can be very important. It's not the same as rendering an imported model with baked textures - scenes made only of imported models with texture maps render much more quickly. In your scene every bounce involves calculating shaders, so what you put in is really important. It's difficult for the renderer to know what shortcuts to take, but you can simplify the network. This is something you have control over, whereas Terragen does not.

Displaced water is slow, especially when the rays hitting it are mostly horizontal. It's definitely an area I need to improve.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: WAS on February 19, 2020, 02:33:35 am
You keep stressing that like my network is really so demanding, but like I said, given the exterior scenario where I can render test renders at 1080p all day for a muuuch more complex network seems to indicate more a explicit scenario the renderer is struggling on, which isn't  related to the network considering the contradicting results (which would be more a more normal scenario).

I do wonder how much you expect a scene to be "TG" before it's covered with assets from other programs like vegetation? I don't have much money for objects, so TG's shaders are mainly what I got. It seems what constitutes a good "TG" scene, doesn't even need to be done in TG by some peoples standards... and considering render times (even in a simple scene focusing on veggies in PT), probably shouldn't...
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: WAS on February 19, 2020, 02:43:22 am
12% at 55 minutes, so I think I can go up to the resolution I wanted now. Seems much faster. It definitely would be cool if there was a Ray Detail Multiplier built into the water shader or glass. A more isolated effect, since generally, it isn't needed for terrain unless doing stuff like subtle soft sand waves/dunes and things of that nature.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: Matt on February 19, 2020, 03:36:49 am
Before you increase the resolution, are you sure it's at the exposure you want? I'm testing your scene and I find that it needs something like exposure 16 to light the cave interior nicely.

Quote from: WAS on February 19, 2020, 02:33:35 amYou keep stressing that like my network is really so demanding, but like I said, given the exterior scenario where I can render test renders at 1080p all day for a muuuch more complex network seems to indicate more a explicit scenario the renderer is struggling on, which isn't  related to the network considering the contradicting results (which would be more a more normal scenario).

Your exterior scene is a completely different case because it's not bouncing light around anywhere near as much, so the shaders don't contribute to the render times anywhere near as much. This doesn't tell us much about how they affect the interior scene. I'm only stressing this because it will help lots of people if you understand this as someone who builds a lot of complex shader networks, not only for you but for the people you share your networks with.

I'm grateful for the scene to be able to test these problems. I'm looking for bottlenecks and ways to make the renderer faster. So if I bang on about the shaders or other scene optimizations it's because I want you to be open to the idea that these things can be important, and they're things you can optimize.
Title: Re: Interior Illumination - Water \ Reflections issues
Post by: Matt on February 19, 2020, 03:44:10 am
Quote from: WAS on February 19, 2020, 02:43:22 amIt definitely would be cool if there was a Ray Detail Multiplier built into the water shader or glass. A more isolated effect, since generally, it isn't needed for terrain unless doing stuff like subtle soft sand waves/dunes and things of that nature.

I agree, it would. Unfortunately I haven't figured out a way to make RDM variable without slowing things down.