Need help with "swiming pool" water

Discussions about LuxRender's materials, and how to make the most of them.

Moderator: coordinators

Need help with "swiming pool" water

Postby cwichura » Fri Mar 09, 2012 9:45 am

I am working on an image with a swimming pool. My camera is basically just above the water, shooting at a slightly upward angle. I am creating the scene in DAZ Studio 4 Pro and then exporting to LuxRender using the Reality 2.1 plugin. I've attached an image showing what I am getting right now, and the settings for the Reality WaterPlane. (In short, ripple .4, clarity 2m, tint 0,255,255.) There are a couple problems, however.

The biggest problem is that the water is not clear. The Reality Users Guide says that the clarity setting determines how far into the water one can see "clearly" in meters. I've set it to two meters, which is deeper than the pool is along the wall I am shooting at. But as can be seen in the image, the water is acting like a mirror, and you can't see anything below the surface.

Secondly, the tint should be blueish. But the water is coming in green. I've tried a few different shades of blue, and just end up with different shades of green ranging up to almost black (if 0,0,255 is used).

In case it helps, the code that Reality is generating for the water is this:
Code: Select all
# Volume 'RealityWater_32.waterVolume'
Texture "RealityWater_32.waterVolume:fresnel" "fresnel" "constant" "float value" [1.332830]
MakeNamedVolume "RealityWater_32.waterVolume" "clear" "texture fresnel" ["RealityWater_32.waterVolume:fresnel"] "color absorption" [744.4400719213812 0 0]
# RealityWater_32
Texture "RealityWater_32.dispmap.noisemap" "float" "blender_distortednoise" "float distamount" [1.6] "float noisesize" [0.25] "float nabla" [0.025] "string type" ["blender_original"] "string noisebasis" ["blender_original"] "float bright" [1.0] "float contrast" [0.5] "vector scale" [1.0 1.0 1.0] "vector rotate" [0 0 0] "vector translate" [0 0 0]
Texture "RealityWater_32.dispmap.limits" "float" "mix" "texture amount" ["RealityWater_32.dispmap.noisemap"] "float tex1" [-0.65] "float tex2" [0.5]
Texture "RealityWater_32.dispmap" "float" "scale" "texture tex1" ["RealityWater_32.dispmap.limits"] "float tex2" [0.040000]
MakeNamedMaterial "RealityWater_32" "string type" ["glass2"] "bool architectural" ["false"] "bool dispersion" ["false"]
# Object Water_Plane
AttributeBegin
NamedMaterial "RealityWater_32"
Interior "RealityWater_32.waterVolume"
Exterior "WorldVolume"
Shape "plymesh" "bool smooth" ["false"] "string subdivscheme" ["loop"]  "integer nsubdivlevels" [2] "bool dmnormalsmooth" ["true"]  "bool dmsharpboundary" ["true"] "bool dmnormalsplit" ["false"] "string displacementmap" ["RealityWater_32.dispmap"] "float dmscale" [-1] "float dmoffset" [0.0]
"string filename" ["reality_scene-Resources/objects/Water_Plane_Water_Plane_RealityWater_32.ply"]
AttributeEnd


The RealityWater object itself is a plane scaled 1000% for both X and Y to make it fit the entire swimming pool. It's the RealityWater prop that Reality installs. (The water with the ripples is looking a bit triangular as well, so I am thinking I also need to increase the subdivision amount from its default of 2.)

The alpha tab has the strength/opacity slider at 1.0. I've tried lowering that a bit to try and get some view below the surface, but even a very minor amount of transparency (e.g., bringing it from 1.0 to .9) completely eliminates the water effect and it looks like one is looking through a transparent grey plane instead. The modifiers tab has nothing on it except for the default subdivision that the RealityWater prop gets.

Any suggestions for how I should go about fixing the water? Thanks!
Attachments
water.jpg
cwichura
 
Posts: 375
Joined: Sun Feb 12, 2012 11:31 pm

Re: Need help with "swiming pool" water

Postby jeanphi » Fri Mar 09, 2012 11:03 am

Hi,

There are a few things to tweak:
- the absorption of the water is way too high, the red will be completely cut after a few millimetres through the water
- with such a low angle the water will be almost like a mirror
I don't know what the bas mesh looks like, but it's rather strange that the mesh is not smoothed with the options provided.

Jeanphi
jeanphi
Developer
 
Posts: 6624
Joined: Mon Jan 14, 2008 7:21 am

Re: Need help with "swiming pool" water

Postby cwichura » Fri Mar 09, 2012 11:22 am

I'm not sure how Reality is calculating the absorption value based on the input Tint colour/clarity. If I was to hand-edit the material file generated, what sort of values for the absorption statement would you recommend.

The waterplane mesh is a simple plane. The displacement for the ripples seems to come from the noisemap this code has in it, with the amount of noise based on the ripple parameter.
cwichura
 
Posts: 375
Joined: Sun Feb 12, 2012 11:31 pm

Re: Need help with "swiming pool" water

Postby jeanphi » Fri Mar 09, 2012 11:39 am

Hi,

I have some measured data with absorption values below 3.

Jeanphi
jeanphi
Developer
 
Posts: 6624
Joined: Mon Jan 14, 2008 7:21 am

Re: Need help with "swiming pool" water

Postby cwichura » Fri Mar 09, 2012 2:28 pm

I've been looking at the http://partialgeek.net/2010/03/26/physi ... luxrender/ blog post where he shows an example swimming pool. I am trying to figure out how to specify the tabulateddata file reference that he used to hand-edit the Reality generated .lxm, but between the docs on the wiki and trying to read the source code, I'm not having much luck. I was able to switch the fresnel from the constant Reality specified to the Cauchy values he used for the pool. I just don't get how I would re-write the input to use the tabulateddata. (The blog post doesn't include the .blend file he used for the pool, and even if it did, I don't have Blender to try converting it to lux syntax with...)

Essentially, what should I replace this line with:
Code: Select all
MakeNamedVolume "RealityWater_32.waterVolume" "clear" "texture fresnel" ["RealityWater_32.waterVolume:fresnel"] "color absorption" [744.4400719213812 0 0]


I am assuming it needs to become something like
Code: Select all
Texture "RealityWater_32.waterVolume:absorption" <magic goes here> "tabulateddata" "string filename" ["pope97.dat"]
Texture "RealityWater_32.waterVolume:absorption.scale" <magic goes here to multiply by 100>
MakeNamedVolume "RealityWater_32.waterVolume" "clear" "texture fresnel" ["RealityWater_32.waterVolume:fresnel"] "texture absorption" ["RealityWater_32.waterVolume:absorption.scale"]


(I am using the naming style Reality uses for the two new texture elements.)

But it's those <magic goes here> parts I am confused about.

Thanks!
cwichura
 
Posts: 375
Joined: Sun Feb 12, 2012 11:31 pm

Re: Need help with "swiming pool" water

Postby Lord Crc » Fri Mar 09, 2012 3:54 pm

Tabulatedtexture is just a color texture like any other, it's not magic ;)

Code: Select all
Texture "RealityWater_32.waterVolume:absorption" "color" "tabulateddata" "string filename" ["pope97.dat"]
Texture "RealityWater_32.waterVolume:absorption.scale" "color" "scale" "texture tex1" ["RealityWater_32.waterVolume:absorption"] "float tex2" [100.0]
MakeNamedVolume "RealityWater_32.waterVolume" "clear" "texture fresnel" ["RealityWater_32.waterVolume:fresnel"] "texture absorption" ["RealityWater_32.waterVolume:absorption.scale"]


Should work, though I didn't test it.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4518
Joined: Sat Nov 17, 2007 2:10 pm

Re: Need help with "swiming pool" water

Postby cwichura » Fri Mar 09, 2012 4:03 pm

Thanks for that. I'll give it a whirl.
cwichura
 
Posts: 375
Joined: Sun Feb 12, 2012 11:31 pm

Re: Need help with "swiming pool" water

Postby cwichura » Fri Mar 09, 2012 4:18 pm

Gives a warning "parameter tex2 not used".
cwichura
 
Posts: 375
Joined: Sun Feb 12, 2012 11:31 pm

Re: Need help with "swiming pool" water

Postby J the Ninja » Fri Mar 09, 2012 4:41 pm

cwichura wrote:Gives a warning "parameter tex2 not used".


Try this:

Code: Select all
Texture "RealityWater_32.waterVolume:absorption" "color" "tabulateddata" "string filename" ["pope97.dat"]
Texture "RealityWater_32.waterVolume:absorption.scale" "color" "scale" "texture tex1" ["RealityWater_32.waterVolume:absorption"] "color tex2" [100.0 100.0 100.0]
MakeNamedVolume "RealityWater_32.waterVolume" "clear" "texture fresnel" ["RealityWater_32.waterVolume:fresnel"] "texture absorption" ["RealityWater_32.waterVolume:absorption.scale"]
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2250
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: Need help with "swiming pool" water

Postby cwichura » Fri Mar 09, 2012 4:55 pm

That it took. And looking in textures/scale.cpp, I see it only registers float*float and colour*colour scale paramter sets, so make sense.

Is scaling by 100,100,100 as a colour accurate after tabulateddata builds the absorption values via the call to IrregulatTextureData()? Or would it be more accurate to just edit the input file and modify the second column to have the 100x factored in directly?
cwichura
 
Posts: 375
Joined: Sun Feb 12, 2012 11:31 pm

Next

Return to Materials Help

Who is online

Users browsing this forum: No registered users and 2 guests