Jump to content
nicolas.schlafer

fresnel in volume shaders

Recommended Posts

Hi all,

Because of the absence of deep control in the redshift shader, i'm trying to achieve what i want in mantra but dont get how to proceed.

I'm trying to apply a fresnel to the density and emission of a volume.

I tried just to multiply the density/emission with a fresnel node but of course it cannot be that simple :)

I tried to create a gradient volume, converting it to camera space and feed it in the fresnel but no succes neither..

Any clue?

image.thumb.png.66edb34f83e852c80bdaedd88bfc89f3.png

Share this post


Link to post
Share on other sites

fresnel does not work on volumes, you don't have a surface to bounce off (no ray incoming angle etc...) all you have is density values, some voxel has no density, some low density and full density, kinda.

the only way i see, if you convert it into polygons do fresnel in VEX and convert into a "fresnel" field for shading.

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks for your answer schwungsau, makes it more clear and avoid me to get lost in my shader nodes forever then.

Your idea to convert to polygons, calculate a VEX fresnel and recreate a volume out of it is really interesting, i will try to explore a bit this direction. Should be possible to compute it on a SDF with gradients somehow as well.

I'm exploring abstract vdb volumes "carved" by noise like these ones (those are converted to poly), and was curious to get a more "foggy" textural quality, but with keeping the fresnel effect.

weird03g5.jpg

weird03g13.jpg

Edited by nicolas.schlafer

Share this post


Link to post
Share on other sites

SDF is same. you have a single value of the distance, and if its inside or outside the volume.
for foggy stuff, you could just calculate the point density with pointcloud lookup on the polygons'points or transfer the density values to the polyons.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×