-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update water volume shader #384
base: main
Are you sure you want to change the base?
Conversation
Thanks for the contribution! I agree the water shader could use some work. It seems this PR has gotten tangled with the other changes. would it be possible to cherrypick this out into an isolated branch? The other thing that would be mildly useful is to make this an additional independent option for the water shader, rather than replacing the original. IE could you create a new file altogether called water_scatter.py or something similar? this would be maximally safe. |
I'm struggling with trying to make a separate commit on a branch when using a fork. I can't commit on a branch or the main fork as I don't have any permissions I'll try to delete the whole fork and start again. Separately, I think it's worth switching from 'Principled Volume Shader' to the combination of 'Volume Absorption' and 'Volume Scattering' so that you can specify density for absorption and scattering separately and you can also take advantage of the scattering models in Blender 4.3 which model scattering in water more accurately. I suppose it depends on whether you want to develop the framework for underwater work. I'll submit a new PR once I delete my current fork and redo the update. |
This replaces the water volume PrincipledBSDFShader with a Volume Absorption and Volume Scattering shader to provide a better representation of light attenuation in water. The scattering shader can be updated with Blender 4.3 to use the phase 'Fournier-Forand' which models scattering in an underwater environment (commented out in water.py). The combination of Volume Absorption and Volume Scattering shaders is based on this post https://blender.stackexchange.com/questions/129220/how-to-create-an-underwater-scene-in-cycles
Example image from coral_reef.gin scene