Page 1 of 1

Node setup for water

Posted: Mon May 07, 2018 12:04 pm
by AutogolazzoJr
I am trying to do a fluid animation and can't get a good water material. Anyone know a good water node setup?

Re: Node setup for water

Posted: Mon May 07, 2018 2:30 pm
by B.Y.O.B.
How about something like this?
Absorption depth and color are not realistic, I just picked some sensible values.
Since you have a fluid simulation, you probably don't need any bump for artificial waves.

Re: Node setup for water

Posted: Mon Oct 15, 2018 5:00 am
by ShimmerFairy
I've tried using the settings given in the picture, but all I get is a glassy black box. I've gone over the node setup multiple times, and aside from any variations in the specific color values set, it's the exact same setup. (If I set the value of the volume's absorption color to 1.0, then it'll be very saturated blue, unsurprisingly.) The attached picture is after 1h40m of rendering on CPU.

It still looks black/blue if I use the null material, so the issue seems to be with the clear volume shader.

Some notes about my environment, in case any of it matters:
  • I have a sun attached to the sky pointing straight down, no settings changed.
  • Camera set to automatic linear tonemapper, as is default.
  • The given picture was rendered with Path+Sobol. Bidir+Metropolis seems to give the same result, at least within the first several minutes.
  • Using the latest git commits of blender/luxcore/blendluxcore from their respective repositories. I can give the specific commits I'm on if interested.
  • Again, rendering was done on CPU. I can't try OpenCL so I don't know if it looks better there.

Re: Node setup for water

Posted: Mon Oct 15, 2018 9:08 am
by B.Y.O.B.
Maybe the scale of your box is different?
Or maybe the normals point into the wrong direction? They should point outward.

If this doesn't fix your issue, please upload the scene.

Re: Node setup for water

Posted: Wed Oct 17, 2018 4:23 am
by ShimmerFairy
If by scale you mean the scale of the object, it's the same whether or not you apply scale. If by scale you mean the absorption depth, then that's one of the first things I tried, and it doesn't seem to have any effect strangely. The normals are correct, since it's the standard cube object stretched a bit.

I've attached a blend file that shows the issue for me. I have the absorption depth set to 100m to demonstrate how it doesn't seem to affect anything (I would expect an absorption depth of 100m on that rectangular prism to look like I hadn't set a volume at all).

Edit: I just had a thought that maybe the Emission color setting on the clear volume node is causing things to look wrong, so I tried setting it to a grayish color. What I found is that setting the value even slightly above 0 causes luxcore, and with it blender, to crash, with the following:

Code: Select all

blender: /mnt/d2/repos/git/LuxCore/src/slg/samplers/metropolis.cpp:179: virtual void slg::MetropolisSampler::NextSample(const std::vector<slg::SampleResult>&): Assertion `!isnan(luminance) && !isinf(luminance) && (luminance >= 0.f)' failed.
Aborted (core dumped)
What's extra odd to me is that I'm asking for the Sobol sampler, not Metropolis. I'll poke at it a bit more and see if I can get anything else interesting out of this. (I used the attached blend file to try this out, just to make it clear.)

Re: Node setup for water

Posted: Wed Oct 17, 2018 7:31 am
by B.Y.O.B.
If I open your file and render, I see the attached images.
I didn't change anything.

Weird.