Mmm, no, that is very wrong, I will check.B.Y.O.B. wrote: Wed Mar 04, 2020 6:45 pmThat won't work, since the alpha is the same over the whole volume.Dade wrote: Wed Mar 04, 2020 6:30 pm I think you could just post-process the alpha channel: if (alpha > 0.0) than set alpha = 1.0
The alpha is not modified by how much light was received for a pixel.
Transparent background, threshold level
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Transparent background, threshold level
Re: Transparent background, threshold level
No, that is not what I intended. I do want to keep transparency outside the beams.Dade wrote: Wed Mar 04, 2020 6:30 pm I think you could just post-process the alpha channel: if (alpha > 0.0) than set alpha = 1.0
Yes, but no. The test scene I uploaded is too simple, as I also realised from my own test. (When I uploaded it I still assumed a problem somehwere else.) In the actual scene, there is some background light to provide shading for the lens barrel, and hence there is some white volumetric scattering all across the image. I couldn't yet find a good balance with the laser beam.
The alpha is not the same everywhere, there are some different values. All very low, but as discussed above, this doesn't seem wrong. Again, what B.Y.O.B. observed might be because of the too simple test scene (?)
Re: Transparent background, threshold level
Updated test scene + render, with a distant source to illuminate the rest of the volume, showing a new observation:
In the transparent part of the volume, there are white values >100, while in front of the black object the peak is around 30, and mean much lower. As the homogeneous volume is limited, there should not be values higher than twice the black area, which is about in the middle of the volume.
A reference stripe looking outside the volume at the top and bottom is fine.
In the transparent part of the volume, there are white values >100, while in front of the black object the peak is around 30, and mean much lower. As the homogeneous volume is limited, there should not be values higher than twice the black area, which is about in the middle of the volume.
A reference stripe looking outside the volume at the top and bottom is fine.
- Attachments
-
- transparency_forum.blend
- (1.06 MiB) Downloaded 209 times
Re: Transparent background, threshold level
New compositing setup idea:
Re: Transparent background, threshold level
You can also clean out the alpha values below a threshold (from the volume) with a setup like this, although this will hurt anti-aliasing a bit:
Re: Transparent background, threshold level
You seem to assume that scattering is a linear process, it isn't, it follows an exponential law.CodeHD wrote: Wed Mar 04, 2020 9:31 pm Updated test scene + render, with a distant source to illuminate the rest of the volume, showing a new observation:
In the transparent part of the volume, there are white values >100, while in front of the black object the peak is around 30, and mean much lower. As the homogeneous volume is limited, there should not be values higher than twice the black area, which is about in the middle of the volume.
A reference stripe looking outside the volume at the top and bottom is fine.
Re: Transparent background, threshold level
But in this setup with a low scattering scale compared with the dimensions of the volume, we should not observe that. Even if, the light is coming from the direction of the camera, so the second half of the volume should then be darker and contribute less than what is seen over the black object.Dade wrote: Wed Mar 04, 2020 9:59 pm You seem to assume that scattering is a linear process, it isn't, it follows an exponential law.
Re: Transparent background, threshold level
I now let it render over night to get a converged result, and also tested one of BYOB's compositor setups.
The result is that the compositor setup works and gives me the desired output
If I export the un-composited image to png or 16-bit tiff, I again only get full white colors in the transparent areas. I.e. the png-output in transparent areas converges to white(?)
But the EXR output shows the correct result.
From other threads I understand that some image processing is not applied for EXR. But would that the be in LuxCore, BlendLuxCore, or Blender itslef?
The result is that the compositor setup works and gives me the desired output

If I export the un-composited image to png or 16-bit tiff, I again only get full white colors in the transparent areas. I.e. the png-output in transparent areas converges to white(?)
But the EXR output shows the correct result.
From other threads I understand that some image processing is not applied for EXR. But would that the be in LuxCore, BlendLuxCore, or Blender itslef?
Re: Transparent background, threshold level
As far as I know, this is Blender behaviour: the Blender color management (which is usually applied after everything else) is not applied if you save the render result as 32 bit EXR/HDR.CodeHD wrote: Thu Mar 05, 2020 7:35 am From other threads I understand that some image processing is not applied for EXR. But would that the be in LuxCore, BlendLuxCore, or Blender itslef?
Re: Transparent background, threshold level
I had a look around Blender related stuff, and indeed, there are other people noticing this behaviour, e.g.
https://developer.blender.org/T53265
The explanations I read sound a bit like the Blender color management assumes a white background and blends all colors according to the transparency. Not sure if this is exactly how it works internally, but anyways that would explain my observations.
Thanks for the input everyone, I can now work with it the way I wanted
https://developer.blender.org/T53265
The explanations I read sound a bit like the Blender color management assumes a white background and blends all colors according to the transparency. Not sure if this is exactly how it works internally, but anyways that would explain my observations.
Thanks for the input everyone, I can now work with it the way I wanted
