Atmosphere shadow problem

Started by Hannes, August 12, 2019, 08:17:44 AM

Previous topic - Next topic

Hannes

I also tried your cloud solution, Richard. 
It looks quite nice, but takes ages to render. 
And it doesn't seem to cast a shadow. 
Thanks anyway, cool idea!!!!

WAS

Quote from: Hannes on August 12, 2019, 05:33:36 PMActually it happens only with shadows onto the atmosphere, when the opacity of the shadow casting object's default shader is either less than 1, or if an image is used for opacity.

I believe this coincides with a transparency ring setup like yours and mine. Both needed opacity. Mine though did feed into a surface layer, with glass shader as main input, and secondary alpha mask as surface mask. For semitransparency.

Hannes

In my scene I used two ring objects (planes).
One with the glass shader setup with cast shadows off, and one invisible plane with a simple default shader and a b/w image map in the opacity slot with cast shadows on.

WAS

Quote from: Hannes on August 12, 2019, 05:51:12 PMIn my scene I used two ring objects (planes).
One with the glass shader setup with cast shadows off, and one invisible plane with a simple default shader and a b/w image map in the opacity slot with cast shadows on.

I think that's what I did, since the glass trans plane will give you it's full shadow. Not positive though. Just throwing it out there, it may be something that can be referred in change logs. Cause, like I said I don't remember it, and it should have been very obvious.

Tangled-Universe

Quote from: Hannes on August 12, 2019, 05:38:19 PMI also tried your cloud solution, Richard.
It looks quite nice, but takes ages to render.
And it doesn't seem to cast a shadow.
Thanks anyway, cool idea!!!!
At least that fits with why my idea (of increasing atmo ceiling) didn't work either...interesting.

Hannes

#20
I have to dig out this old thread. I'm working on another project with planetary rings. The problem is still there.
Matt, you wrote, you wanted to fix it. Is there any progress so far?
Recently I watched "Ad Astra", knowing Richard did a wonderful job creating the planets, and having the same problem with Saturn's rings. Since Terragen has been used for quite some Sci fi movies, it would be fantastic to have this bug fixed, so that TG will be (or stay) the first choice for Sci fi planetary VFX.
So, to summarize it: if you have an object outside of the atmosphere (receive shadows from surfaces checked - clouds as well) casting shadows on it with a texture in the opacity slot, or an opacity less than 1, the problem occurs.
The example project is still downloadable.

Hannes

Once again I have to bring this up. There seems to be another problem which is not caused by the atmosphere but looks quite similar.
Image one shows the mentioned problem with objects casting shadows onto the atmosphere with a reduced opacity or a greyscale image.

Just to describe the settings again: There's a visible, not shadow casting ring object with the glass shader transparency falloff method for the diffuse color. Then there's an identical ring object (slightly moved downwards to not intersect with the other one), which is invisible and shadow casting. I just used a default shader with a greyscale map for the opacity.

In image two "receive shadows from surfaces" is off. The ugly bright area is gone, but the red arrows show some weird terrain artifacts where the terminator and the shadows intersect.

The third image shows the same problem with the atmosphere turned off, and the artifacts are still there, so it's not only caused by the atmosphere.

Image four shows the planet without rings, just to see, how it should look. No problems here.

I have no idea what the problem is here. It's just a semi transparent object casting shadows on another object. There is no problem on a smaller scale.

While I'm writing this, I just had the idea, that the location of the planet (far, far away...) could be causing this (for whatever reason), but I made a test with the planet at 0,0,0, and it was still there (see last image).

WAS

Yeah I encountered this recently before retiring my old PC, and still had the same issue. I tried many methods to fix it but the only thing there really was, was doing a torus shape for the rings, which was solid, and ugly. So I just gave up on the idea. This wasn't a issue in past versions, so curious where it popped up, and why.

Is it possibly due to the new Rayleigh scattering?

Hannes

Thanks Jordan. Just did some tests with version 4.3.16 (that's the oldest version I can run), and the problems were already there. Too bad... :(

Mahnmut

Hi, i´ll try to rephrase my idea here where it belongs:
I wonder if the bright stripe surrounding the shadow corresponds to the outer margin of the opacity image.
Maybe parts of the image that are opacity<1 do somehow influence not only the ring shadow, but also the planets shadow, or they get applied as "negative shadow value", thus brightening the region they apply to?
In that case, using a broader opacity image should result in a broader bright stripe.
Just an idea.
Best Regards,
J

Dune

Despite the fact that opacity is on or off above or below 0.5, an intermediate greyscale above 0.5 (say 0.7) will still affect shadows. It is somehow calculated as such. I use that feature to have more light between canopies in (RT mode). So it might have an influence here too.

Hannes

Thanks guys!
However, it is a bug indeed. I made a test with a very small planet, since I thought maybe it is something that happens only with planets at planetary scale, but I found it's the same with a small (internal) sphere.
As you can see, the RTP doesn't show the planet shadow correctly (I resetted it first and let it run for a few minutes), but at least the intersection of the two shadows is correct.
The render shows the problem. The two shadows don't seem to add, but subtract, if one of those is restricted by opacity. I thought, why didn't I notice this earlier, and did another test with an imported object, and voilà, the shadows are correct ??? ??? ??? !!! See the render with my long time companion. So, I guess the bug is somewhere inside the planet or the internal sphere (maybe even other internal objects?).


So, maybe I have a temporary (!) solution for ring planets until this bug is fixed: I could use an imported high res sphere the same size of the planet with the same textures and make the original planet invisible.



Hannes

And Tadaaaaaaah!!!! An imported sphere the same size as the planet at the same location with "force displacement" checked did the trick. The planet's "render surface" is unchecked to make it invisible. In the atmosphere's quality tab "receive shadows from surfaces is checked.
I had to use some transform input shaders with world space checked for the textures to make them work. I haven't managed to put these exactly like on the planet, but this is not the problem.

So, actually this thread has a wrong name. It's definitely no atmosphere problem, but a problem with the planet (or other internal objects as Ialready wrote).
I think, now it's time for Matt, Kevin or Cris to chime in. ;)

Dune


Dune

#29
And what if you use an internal sphere with force displacement on? And what if you use a polysphere?
 No, doesn't work either.