Too dark water material when rendering

Good day, everyone.
I’m starting to learn about the raytracing and rendering possibilities in ParaView to make my OpenFOAM results prettier. They usually involve water and free surfaces for my part, so to have a sort of realistic rendering of water would be great. I have looked into this thread, but I’m not able to reproduce the nice colours they get.

This is what I do:

  • Clip with alpha.water set to 0.5
  • Extract surface filter
  • Surface normals filter
  • To the surface normals I enable raytracing, select OSPray pathtraces, and set the samples per pixel to 100 or so. The material is selected as Glass_Water.

My issue is that the water is super dark. The data set I’m playing with is a cylinder in some waves. It is pretty much pitch black. I have tried to go to the material editor, and the light inspector, but I can’t figure it out. If the water looked like it does for the shader ball in the material editor I would be happy, but it’s not at all what I see. I suspect it could have something to do with the amount of water I have. When the depth is shallow, I get more colour, as the closeup of the cylinder. I have tried to change the attenuationColor of the material, and it helps a bit, but I don’t get it looking as the shader ball, still.

Do you have any advice?


Hello @Kompe,

That’s strange, I copy your pipeline with a dummy scene (box + cylinder) and I definitively not have such dark water result (tested with PV 5.13.0 on Linux):

did you set some other graphics parameters?

Is it possible to share your data? (at least 1 step?)

Thank you for looking into the case!
Here you may download one time step: https://www.dropbox.com/scl/fi/zf2sz9ylluagwy53i2y4w/Paraview_data.zip?rlkey=7j5vzj9fipeq3f4svhyvjjgja&st=gmrkonx2&dl=0

Open case.foam in ParaView. You can find the cylinder .stl file in constant/triSurface

I use 5.13.2 on Windows.

Thanks!

Hi @Kompe

Raytracing with material depends on the actual size of the object and makes assumption on the units of the data.

You can probably just use the transform on the representation to improve this:

Without transform:

With transform (scale/100):

You can find the transform in the advanced option of the representation

good catch, with the default glass_water I don’t see any other solution.

You can also create your own material :

  • click on ‘+’
  • then select as Material Type the glass

  • you’ll have an attenuation Distance property, by tweaking it you should be able to have a less darker material and obtaining some interesting result
1 Like

Thank you very much, Mathieu and Lucas. That was it - helped me a lot!

1 Like