A pool scene

I am fighting with this scene, I hope that someone can help me

Attachments


How can I do those kind of reflections of the sun in the water and the foam of the cascade?

Attachments


If you’re talking about the light patterns under water, those are called “caustics”. Kinda hard to make with Cycles (needs a huge amount of samples to be smooth); but I’m not sure if it’s possible at all with BI. Some of the other renderers do handle it better, but I’m not familiar enough with them to recommend any, you’ll have wait for someone else to chime in.

There are also ways to fake caustics; you can find various tutorials on that if you wanna go that route.

But if you’re talking about actual reflections on the surface of the water, looks like you already got it; I’m just not sure if it’s 100% correct though (there’s something you need to do to make it crossfade between reflective and seethru, something about the angle and fresnel; sorry I don’t remember the details).

As for the cascade, I can’t see it very well to be able see what you’re talking about there.

Yeah that´s what I want, caustics

http://www.leisurepools.com.au/wp-content/uploads/2014/06/Cascade-2.jpg That kind of foam

To make it for real, I’m not sure if it’s the only, or even the best, way, but here how I would do:

  • You make a mesh for the water that overlaps the walls of the pool (so you don’t risk seeing the “surface” of the waters on the walls)
  • Make sure it got enough faces on the top to provide a reasonable resolution for the waves.
  • Apply a Displacement modifier to the water.
  • Create a texture to use as the displacement.
  • Set the texture type to Voronoi
  • Adjust the size of the the voronoi to make realistic looking waves
  • Back in the displacement modifier, set Texture Coordinates to Object, and set the object to an Empty (you will use it to animate the waves by animating the empty’s movement (moving it vertically is the most important, gives the more random style of movement; but if you want to make the waves have a predominant direction, animate the empty’s position horizontally too)
  • Set the surface shader of the water mesh to Glass, with an index of refraction of 1.33333, and type Sharp; and the volume material to Volume Absorption (you gotta play with the color and density to find something that looks good, I haven’t found a set of values I’m satisfied with yet. Test with the surface shader unplugged to not have to deal with the performance issues of the Glass shader while you tweak the volume shader)

You might wanna repeat steps 3 to 7 with new voronoi textures and empties (with different animations motion speeds on the empties), to make for more complex wave patterns.

Now unless I’m forgetting something; all you got left is doing the rest of the scene and let it render overnight (will need a lot of samples).

Oh, and you can skip the stuff with the displacement modifier and voronoi texture if you got a better way of doing the surface waves.

Now if you wanna fake it instead; here’s how I would do:

Do the same material you did for the water plus:

  • Have a Mix shader between the Glass and output
  • Plug a transparent shader on the second shader input of the Mix shader
  • Use the Is Shadow Ray value of a Light Path node as the factor of the Mix shader

And on the Render tab of the Properties panel, go down tot he Light Paths section and disable both Reflective and Refractive Caustics (so the glass shader doesn’t add fireflies).

Now for all the faces of the pool walls that are underwater:

  • Have the same material as for the faces above water, but
  • Put an Add shader between that material and the output
  • Plug a Mix shader into the second input of the Add shader, set Factor to 1
  • Plug an Emission shader on the second input of the Mix shader
  • A MixRGB in Multiply mode, plugged in the Emission Color input
  • A MixRGB node onto the Color2 of the previous MixRGB node; set this node’s Color1 to a light blue/cyan (color of sunlight deep in the water), and Color2 to a light yellow (sunlight color near the surface)
  • A Math Add node, with Clamp, as the factor of the MixRGB; which will be used to control the vertical position of the color gradient
  • A Math Divide node plugged into the previous Add node; which will be used to control how stretched the color gradient is (to make it match the depth of the water)
  • A Separate XYZ node, with the Z component fed into the previous Divide node.
  • A Texture coordinate node, with the Generated vector plugged into the previous Separate XYZ node (to get the coordinates to use for the gradient)
  • Plug a Math node in Power mode into the Color1 Input MixRGB node from step 5; set the second value to something like 0.999
  • Plug a Math Add node into the first value of the previous Power node
  • Add a Voronoi Texture node and plug the Fac output into the previous Add node’s first value
  • Get plug the Object vector from the Texture Coordinate node from step 10 into the previous Voronoi’s Vector input; and set the Object of the Texture Coordinate node to an Empty. This empty will be used similarly to the one used to control the water waves.

Now, here’s some of stuff you might need to play with to find values that will look right on your scene:

  • The scale of the Voronoi texture from step 13.
  • The Z scale of the Empty used on step 14 (to control the stretching of the light pattern on the walls.
  • The rotation of that Empty (make it’s local Z axis aligned with the direction of the sunlight).
  • The second values of the Divide and Add nodes from steps 7 and 8 (to control the height and altitude of the color gradient, to make it so it is sunlight color near the surface of the water, and bluer deeper down)
  • The second value of the Power node from step 11 (to control the sharpness of the light patterns)
  • The second value of the Add node from step 12 (to bring out the weaker parts of the light patterns that disapear when you increase the sharpness too much; keep in mind this will also increase the brightness of the brighter parts of the pattern)

The Mix shader from step 3 is meant to add shadows; it’s not complete, and I don’t think I’ll have time right now to describe the process in detail; but basically, you will need to bake a fully white difuse shader on the poll walls and bottom so you’ll have a texture map with the shadows backed in; then you will use that texture map as the factor of this Mix shader, leaving the first Shader input of the Mix shader empty.

I’m not sure if I’m forgetting some parts, but like I said, I’m running out of time at the moment.

Ah, hm, I’m not sure I would know how to properly make that…

As I didn´t understand how to do that I decided to add the .blend file. Im looking for an image not for an animation. Thank You friend.:smiley:

Attachments

alberca2.blend (4.37 MB)

What part did you not understand?

I did what You said for the faces of the pool but I got full illuminated walls

I’m looking at the .blend file you posted; you did a lot different from the steps I suggested above, from both versions.

But there are two small changes that will produce a similar result with what you got there. First remove the Transparent shader from the water, and leave the Glass shader plugged directly; you want all the light to be processed by the Glass shader. And second, in your light, ensure Multiple Importance is marked in the properties panel in the light tab (not sure what is the proper name, where you set the settings of the light). Takes forever to render, though, and with that camera angle, the water is reflecting too much.

With those two changes the caustics will have more priority in the render; it’s a bit subtle with the setup you got there, but if you try rendering with the camera underwater you’ll see more clearly it is there.

I found a way to do the coustics! I´ll post an image to read what You think.

That´s the new render

Attachments


Cool!

I’m not sure if it’s the depth of field or what; something feels a little off but I can’t put my finger on it. I think maybe the lines of the pattern need to be a little sharper perhaps? How are you doing it?

Oh, and you need to work on the material of the water of the cascade; too dark.

But overall seems you might going in the right direction :slight_smile:

Those are the nodes of the material of the walls underwater

Attachments


Ah, you’re going with the faking approach, ok.

I think it would make more sense instead of a Mix shader with the Voronoi as the factor, have an add shader and use the Voronoi to control the light color.

To control the sharpness, either with what you did there, or with the modifications I suggested, you add a Math Power node after the Voronoi and play with the second value of the Power node till you find something that looks good (something above 1.0 to pull the dark parts darker, but don’t go too far or you’ll miss most of the lines).