work-around for slow PT reflection calculation

Started by Dune, March 23, 2021, 12:41:48 PM

Previous topic - Next topic

Kadri

Quote from: Dune on March 28, 2021, 10:09:40 AMI've made a 1x1m sheet with small displacements (still a 70MB tgo),...
Did you add any displacement on the OBJ after you imported it?
It should only have colour and-or reflectivity for a real comparison.

Dune

No, I just fed the color (world space) into the default shader color input and set reflectivity. So, actually, my result contradicts yours ???

Kadri

Hmm...Interesting.
I think i will take the annoying decision and install the free version and test this myself too.
Too curious to not to try...

Kadri

Ulco i use this free-version for the first time and don't know the new features much.
I tried just to use the same file i made with my own old Terragen version and changed only to path tracer (25 landscape).
I can render only half HD of course but that doesn't matter.

I don't know how you test your scene but in this one the difference is still there.
The scene with the obj (600 mb) imported (by the way this free version couldn't even load the nearly 4 gb obj file)
rendered in 1 minute 8 seconds.
The standard fake stoned landscape is at 10 minutes now and still rendering.

So i think the difference is still there if i didn't make anything wrong and-or everything with the setting i made-use in the free version is right.

Kadri

I used the reflective shader node.
I will try when the render finishes with the default one too ones again.

Kadri

Wow!
If this test is correct the Path tracer is really slow with reflection.
It took 31 minutes 06 seconds to render in half HD. More then 4 times slower probably then the old renderer.
At least in this scene of course. I would export my landscape and render the scene only as all objects with the path tracer.

Kadri

#66

I couldn't get some useful reflection out from the default node as it is different-new to me.
I am making a new render with a new reflective shader node as it looks like there are quite some differences.
I used the old reflective shader in my test before.

Kadri

#67

The scene with the new reflection shader took 25 minutes 50 seconds to render.
This is a little faster but still hugely slower then 1 minutes 19 seconds with the obj object.
(The small longer time in the obj test is probably from GI. I used higher settings)

If this is consistent in general i would use objects for reflection so much i can.

A small test without reflection with the path tracer looked ok to me.
No such big difference. But this is the first time i try this new version.

WAS

I haven't been able to test cause TG isn't giving me any render elements, but I had an idea.

Use the specular / reflection outputs from standard render to composite in, or use them as a mask to fake with simple shapes. Depending on where your sun and lighting is it could be just three soft SSS shapes. One dark blue for away from sun, one light blue for focal center (if sun isnt center), and one white for specular on sun side. In PT it would render as fast as any texturing, and may look realistic. Could also project standard reflections with same images converted to masks within TG instead of composite.

From what I see in PT with empty sky, or overcast, the reflection is so simple it seems time is being wasted big time and could just be soft gradiented colours.

WAS

#69
So it is faster, but the through camera projection doesn't match the scene, I don't know what to do about that. I'm not too familiar with the through camera projection, but to my assumptions it should match the scene if the camera isn't touched. Huh.

The outputs are as to be expected, specular, and reflection, and could be easily composited onto a PT render if need be on a reflection-less muddy ground. As for in TG itself from these images, not sure why they don't match up.

Add ref images, note the layer elements are from EXR so way brighter than they should be as JPEG.

If we could get help on why projection is wrong, this could really help. The Standard reflections take an hour, PT take 4 hours, and look almost the same for flat ground. And the compiled PT with projection only takes 12 minutes.... soo yeah, huge savings. But the alignment issue...

Kadri

#70
Looks good.
Try this if your scene is in HD.
("Fit mask to this" checked or unchecked didn't changed anything. It is just a leftover...)

Kadri

Looks like Terragen expects a 1:1 image.
You have to calculate the ratio of the length and high.

Kadri

If you have trouble just use something like this for testing.

WAS

Oh, that actually kinda makes sense. Didn't even think of that.

WAS

#74
Here is a projection at aspect ratio 1 compared to original SR render. SR took little over an hour, PT took 23 minutes, which would probably be about 4 hours with reflections.

Gotta play with gamma of the convert to grayscale mask, and gamma of the reflection maps, but it works. I didn't really compare while changing gamma so probably not exact. I do notice a little bit of breakup in PT but that could be the noise from the renderer only at AA 6 (or the mask roughness and intensity from original SR render). Also just applied as a child of a surface mask. I wonder if a merge shader and using mixer would provide better results similar to masking surface shaders to not have a seam showing base colours along mask boundaries.