Planetside Software Forums

General => Terragen Discussion => Topic started by: Hannes on August 12, 2019, 08:17:44 am

Title: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 08:17:44 am
At the moment I'm creating a space scene with a planet that has rings. I want the ring cast a shadow onto the atmosphere of the planet (using an opacity image), so I enabled "receive shadows from surfaces" in the atmosphere's quality tab.
No matter what I do, I get a nasty bright area on the dark side of the planet, which drives me crazy! >:( >:( >:(
(Disabling the opacity image creates a correct shadow of the plane, but that's not what I want of course!)

Does anyone have an idea to get rid of this?

I attached a simplified version of the scene to explore it.
Title: Re: Atmosphere shadow problem
Post by: cyphyr on August 12, 2019, 08:38:36 am
I had exactly the same issue last year. The only solution I found was to model the rings.
It's also worth asking if you REALLY need an atmosphere. Although technically accurate a gas giant would not necessarily have a perceivable haze on its atmosphere. It will look pretty solid.

Also remember that Saturn has a quite noticeable equatorial bulge (something like 10% if I remember) and whilst the planet can be easily squashed the atmosphere can not so easily.
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 09:25:53 am
Thanks a lot, Richard!! Yes, I thought of modeling the rings, but still I wonder, why the shadow of an object is displayed correctly, but leaves this bright area when using an image map in the opacity slot.

And I really like the planet with its atmosphere (I mean the final one in my project. I uploaded only a very simple version)

By the way, in an older thread by you I found a way to use clouds for a planetary ring, but unfortunately the download link is dead. Could you maybe upload it again? I'd love to see, how you managed to use clouds for that.
Title: Re: Atmosphere shadow problem
Post by: Hetzen on August 12, 2019, 09:35:15 am
Maybe do a shadow pass with the atmosphere off and all surfaces/background white, then multiply it over in post?
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 09:47:19 am
Thanks Jon, this is of course a solution. Nevertheless I'd love to see it fixed. Still fighting.... ;)
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 09:56:33 am
Btw, the RTP displays it correctly!!
Title: Re: Atmosphere shadow problem
Post by: Tangled-Universe on August 12, 2019, 10:15:37 am
I wonder if it might be due to the atmosphere ceiling settings causing the renderer to disobey to calculate the shadows cast by an "out of atmosphere object" correctly.
Title: Re: Atmosphere shadow problem
Post by: cyphyr on August 12, 2019, 10:49:46 am
Quote from: Hannes on August 12, 2019, 09:56:33 amBtw, the RTP displays it correctly!!
It's actually not that correct, if you make the rings plane invisible (in it's render properties) you can see that where the shadow area is it actually gets brighter!
Weird bug
Title: Re: Atmosphere shadow problem
Post by: cyphyr on August 12, 2019, 10:59:26 am
I don't think I would have uploaded to anywhere other than the planetside forum ...
The cloud setup (which is seriously NOT ideal lol) is just a huge thick cloud layer (v2) extending to the limit of the rings and a y projection "Ring" image map.

Ah found it
I had to strip out the images but I'm sure you can supply your own :)
Ring-03-simple.tgd
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 11:07:35 am
Quote from: cyphyr on August 12, 2019, 10:49:46 amIt's actually not that correct, if you make the rings plane invisible (in it's render properties) you can see that where the shadow area is it actually gets brighter!
Weird bug
Indeed!!

Quote from: Tangled-Universe on August 12, 2019, 10:15:37 amI wonder if it might be due to the atmosphere ceiling settings causing the renderer to disobey to calculate the shadows cast by an "out of atmosphere object" correctly.

Playing around with the settings didn't make the bright area go away...

Anyway, thanks, guys!!
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 11:08:32 am
Quote from: cyphyr on August 12, 2019, 10:59:26 amI don't think I would have uploaded to anywhere other than the planetside forum ...
The cloud setup (which is seriously NOT ideal lol) is just a huge thick cloud layer (v2) extending to the limit of the rings and a y projection "Ring" image map.

Ah found it
I had to strip out the images but I'm sure you can supply your own :)
Ring-03-simple.tgd

Cool!!! Thanks, Richard!
Title: Re: Atmosphere shadow problem
Post by: Tangled-Universe on August 12, 2019, 11:33:36 am
Quote from: Hannes on August 12, 2019, 11:07:35 am
Quote from: cyphyr on August 12, 2019, 10:49:46 amIt's actually not that correct, if you make the rings plane invisible (in it's render properties) you can see that where the shadow area is it actually gets brighter!
Weird bug
Indeed!!

Quote from: Tangled-Universe on August 12, 2019, 10:15:37 amI wonder if it might be due to the atmosphere ceiling settings causing the renderer to disobey to calculate the shadows cast by an "out of atmosphere object" correctly.

Playing around with the settings didn't make the bright area go away...

Anyway, thanks, guys!!
Ok, that's interesting, since it seems to work with a very thick cloud layer extending from the planet all the way up to the ring, which to me sounds similar to increasing the atmosphere ceiling all the way up to the ring. Oh well, it probably has a different way of things, I guess.
Title: Re: Atmosphere shadow problem
Post by: Matt on August 12, 2019, 04:53:22 pm
I wasn't aware of this bug until now. I'll fix it.
Title: Re: Atmosphere shadow problem
Post by: WAS on August 12, 2019, 05:18:37 pm
Was this bug introduced somewhere recently? I used shadows from surfaces I believe in my reflective ring with transparency and don't remember the effect.

I do know the angles of reflections at that scale were wrong. Literally couldn't get the planet to reflect on the rings at direct angles (from memory).
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 05:33:36 pm
Actually 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.
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 05:38:19 pm
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!!!!
Title: Re: Atmosphere shadow problem
Post by: WAS on August 12, 2019, 05:45:06 pm
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.
Title: Re: Atmosphere shadow problem
Post by: Hannes on August 12, 2019, 05:51:12 pm
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.
Title: Re: Atmosphere shadow problem
Post by: WAS on August 12, 2019, 06:30:01 pm
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.
Title: Re: Atmosphere shadow problem
Post by: Tangled-Universe on August 13, 2019, 04:18:37 am
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.