Atmospheric perspective effect help!

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Atmospheric perspective effect help!

Post by PDRA »

Hi guys!
I hope you are all doing well.
I wanted to know if someone could help me a bit with an effect I want to achieve.
It is called atmospheric perspective. It is an effect that lets you perceive a bit better the distance of the surroundings.
It is mainly perceived in big scenes like landscapes.

I'm trying to achieve this effect but I couldn't find any even close solution yet.
I have been trying with a big cube with some volume material but it doesn't make the effect.
Optimally it would be great if it could detect the lighting produced from an HDRI.

I will really appreciate your help. I have attached the raw WIP + the image with a quick pos pro in photoshop to show the kind of effect I would like to achieve
Denoised0015 atmospheric.jpg
Denoised0015.png
Also, it would be great to know which is the optimal way to create a gradient (linear radial and so one) in this engine. I'm finding this very common thing very difficult. The best way I had achieved it is by creating an image in photoshop...

A side note, I have noticed that the volume shader is a bit bugged you have to create a new output because with the original one that is created the cube shows completely black.

Regards, saludos!
Pablo
zeealpal
Posts: 59
Joined: Wed Jan 10, 2018 12:25 pm

Re: Atmospheric perspective effect help!

Post by zeealpal »

There is a mist filter under the camera settings, that might do what your looking for :)
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Re: Atmospheric perspective effect help!

Post by PDRA »

zeealpal wrote: Mon May 11, 2020 4:00 am There is a mist filter under the camera settings, that might do what your looking for :)
I just want to HUG YOU! :lol:
Thank you a lot!

It works really nice. It is kind of a pity that it has jagged edges though.. I don't know if there is a way to solve this inside its settings.

Aside from this if anyone know how to create gradient textures in an easy way, it will defietely will get me entertained at least for some days.

I attach the advance I could make with your help zeealpal!
Denoised0015 2.png
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Atmospheric perspective effect help!

Post by B.Y.O.B. »

PDRA wrote: Mon May 11, 2020 5:27 am It works really nice. It is kind of a pity that it has jagged edges though.. I don't know if there is a way to solve this inside its settings.
The jagged edges would be solved by this: https://github.com/LuxCoreRender/LuxCore/issues/361
PDRA wrote: Mon May 11, 2020 1:02 am A side note, I have noticed that the volume shader is a bit bugged you have to create a new output because with the original one that is created the cube shows completely black.
Can you upload a .blend file that shows this problem?
PDRA wrote: Mon May 11, 2020 1:02 am I have been trying with a big cube with some volume material but it doesn't make the effect.
For this as well, please upload a simple .blend file that contains your setup, so we can check what's wrong. (possibly camera volume not set?)
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Re: Atmospheric perspective effect help!

Post by PDRA »

The jagged edges would be solved by this: https://github.com/LuxCoreRender/LuxCore/issues/361
Ok great! i've posted there some images to better describe the issue I've noticed

The part with the black cube is one of those things that happens and then you can not replicate them in front of the others :lol:
I am pretty sure that I was adding the null material to the material slot and the homogeneous volume to the interior and I was getting the black cube anyways... Anyway...

There is still a thing! When I apply the volume to the scene, it can not be rendered from the inside, right? or is there an option ot be able to achieve this? I don't know what camera volume means (refering to the option you mention)
camera inside volume.jpg
camera outside volume.jpg
Saludos!
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Atmospheric perspective effect help!

Post by B.Y.O.B. »

PDRA wrote: Mon May 11, 2020 6:57 pm There is still a thing! When I apply the volume to the scene, it can not be rendered from the inside, right? or is there an option ot be able to achieve this? I don't know what camera volume means (refering to the option you mention)
The camera auto-detects the exterior volume (the volume surrounding the camera) by casting one ray into the middle of the screen and checking the exterior volume of the surface it hits. But if your materials don't have exterior volumes set up, it will not get the correct volume this way (which is often the case, sometimes it doesn't make sense to set them, or it's just too much work).
In such a case you have to go to the camera settings, open the volume panel and select the exterior volume manually.
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Re: Atmospheric perspective effect help!

Post by PDRA »

B.Y.O.B. wrote: Mon May 11, 2020 7:08 pm The camera auto-detects the exterior volume (the volume surrounding the camera) by casting one ray into the middle of the screen and checking the exterior volume of the surface it hits. But if your materials don't have exterior volumes set up, it will not get the correct volume this way (which is often the case, sometimes it doesn't make sense to set them, or it's just too much work).
In such a case you have to go to the camera settings, open the volume panel and select the exterior volume manually.
Thank you BYOB! I will be trying it!
I add a little question more.
I 've noticed that the mist effect doesn't apply through transparent materials. Is there any option to make it vissible in this situations?

I attach my new wip image where you can see the difference
Denoised0016.png
Also is it it possible to extract the mist map as an image to use in pos pro?

Thank you guys again for the help you are giving!

Saludos
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Atmospheric perspective effect help!

Post by B.Y.O.B. »

PDRA wrote: Mon May 11, 2020 9:32 pm I add a little question more.
I 've noticed that the mist effect doesn't apply through transparent materials. Is there any option to make it vissible in this situations?
No. The material needs to be transparent in the depth AOV. I think this is the case for the null material or arch. glass, but not regular glass.
For this to work, you will need proper mist from volume scattering.
For such a strong effect, that is the better solution anyway.
PDRA wrote: Mon May 11, 2020 9:32 pm Also is it it possible to extract the mist map as an image to use in pos pro?
You can get the depth AOV, but not the mist effect layer. (although, maybe you could take the difference between a result with mist and one without)
However, you can look up the algorithm used here: https://github.com/LuxCoreRender/LuxCor ... st.cpp#L92
You can replicate it in your compositing software.
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Re: Atmospheric perspective effect help!

Post by PDRA »

Thank you BYOB again for your help! :D
I will be considering these things when doing the renders.
mischterlampe
Posts: 44
Joined: Fri Apr 03, 2020 6:22 pm

Re: Atmospheric perspective effect help!

Post by mischterlampe »

Hey PDRA

I really like your sky. Is it an image or do you render them?
Post Reply