Node setup for water

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.
Post Reply
AutogolazzoJr
Posts: 6
Joined: Sun May 06, 2018 10:10 pm

Node setup for water

Post 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?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Node setup for water

Post 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.
Attachments
scrn_2018-05-07_16-27-52.png
ShimmerFairy
Posts: 2
Joined: Mon Oct 15, 2018 2:21 am

Re: Node setup for water

Post 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.
Attachments
My attempt at the node setup given.
My attempt at the node setup given.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Node setup for water

Post 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.
ShimmerFairy
Posts: 2
Joined: Mon Oct 15, 2018 2:21 am

Re: Node setup for water

Post 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.)
Attachments
water_vol_test.blend
.blend file with the failing clear volume.
(508.07 KiB) Downloaded 198 times
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Node setup for water

Post by B.Y.O.B. »

If I open your file and render, I see the attached images.
I didn't change anything.

Weird.
Attachments
2018-10-17_09-27-43.png
render from camera
render from camera
Post Reply