Jump to content

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

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...