Planetside Software Forums

General => Terragen Discussion => Topic started by: james adamson on March 06, 2020, 06:23:27 AM

Title: Surface alpha values less than 1
Post by: james adamson on March 06, 2020, 06:23:27 AM
Hi all.
I have rendered out some frames and my surface alpha (32 bit exr) has varying values around .98. 
Any ideas. I would expect 0 and 1. The sky is 0.
Title: Re: Surface alpha values less than 1
Post by: WAS on March 06, 2020, 01:36:23 PM
That's strange. I don't think I've seen that. Do you have any default shaders being used with alphas?

You could try adding a Constant Shader in as your first colour shader see if that helps.
Title: Re: Surface alpha values less than 1
Post by: james adamson on March 06, 2020, 02:43:06 PM
No. I do have an image shader going into a default shader in my background, in the default I have diffuse at zero and am only using luminosity but I have made that invisible at render time. So I have pure black in my sky on the alpha and the surface has values around .95 to .98 
As far as I understand the only node capable of outputting its own alpha is the constant. I also only have atmos visible in the sky. No image. At the moment I have to live with it as the render has been going some time and its got a good few days left and I gotta move on. I have just lifted any values from. .95 to 1. Not ideal but it does not seem to be affecting the edges in any noticeable way. It has to be something I have done wrong.
Thanks.
James.
Title: Re: Surface alpha values less than 1
Post by: Matt on March 08, 2020, 09:35:32 PM
This is probably because the atmosphere alpha subtracts from the surface alpha. It seems strange that it does this, but there is a good reason. It maintain a purely additive workflow where surface + atmosphere + cloud adds up to 1, and it does this for alpha as well as RGB for consistency. The surface alpha represents the contribution that the surface has to the final pixel, which is diminished when it's partially hidden by atmosphere. This makes compositing simpler in some ways, but more difficult in others.

It used to work differently but it made it harder to composite atmosphere over the terrain, so we switched to this purely additive workflow. But it has this unwanted side effect of making it harder to get a separate matte of the terrain.
Title: Re: Surface alpha values less than 1
Post by: Matt on March 08, 2020, 09:58:53 PM
If you are using the alpha to affect your replacement background, it may be better to use the combined alpha of the surface, atmosphere and cloud anyway. This will be 1 on the terrain.
Title: Re: Surface alpha values less than 1
Post by: WAS on March 08, 2020, 11:58:17 PM
I wasn't even aware of this. Good info.
Title: Re: Surface alpha values less than 1
Post by: james adamson on March 09, 2020, 07:39:39 AM
Excellent to know. Thanks.