Simple Gold Ring with Caustics Tutorial v1.2.0

2005-03-12

For basic to intermediate Blender users. It will help if you already know the common Blender keyboard shortcuts and where the common buttons are. (For example: [F12] to render)

Made with Windows XP (but other OS'es are OK), Blender 2.36, YafRay 0.0.7.


Start Blender.

Delete the default cube.

Make a large ground mesh:

  1. Add a plane.
  2. Scale the plane up to about 11 or until it about fills the screen.

Make the cross section of the ring mesh:

  1. Switch to object mode.
  2. Switch to the side view.
    1. Make sure NumLock is on (and leave it on for the tutorial).
    2. Press [3] on the numeric keypad.
  3. Add a circle mesh.
    1. Add > Mesh > Circle
    2. Click OK for 32 vertices.
  4. Scale the circle smaller in the Y direction so it looks tall and thin.
Prepare to spin the cross section:
  1. Switch to object mode.
  2. Move the squashed circle away from the center in the direction of the Y axis.
    1. [G] for go
    2. [Y] to constrain movement to the Y axis
    3. Move the mouse
    4. The distance you move the circle away from the center will be the radius of the ring.
    5. LMC when done
  3. The 3D cursor should still be in the center. If it is not, then snap it there.
    1. LMC in the center of the global grid.
    2. Switch to top view.
      • [7] on numeric keypad
    3. LMC in the center.
    4. [Shift]-[S], pick "Cursor -> Grid"

Spin the ring cross section:

  1. Go to top view.
  2. Go to edit mode.
  3. Go to editing buttons.
  4. Look under Mesh Tools,
  5. Put 360 in Degr.
  6. Put 32 in Steps.
  7. Click "Spin"

Clean up the ring mesh:

  1. Remove doubles
    1. Select all vertices
      • Tap [A] until all vertices are yellow
    2. Click Rem Doubles under Mesh Tools
    3. Blender says "Removed 32"
    4. LMC the message to accept
  2. Reset the center of the ring mesh
    1. Switch to object mode
    2. With the ring mesh still selected
    3. In Editing buttons under Mesh
    4. Click "Center New"

  3. Feel free to scale the ring mesh to make it look more realistic.
Adjust the ring position so it sits on the ground plane:
  1. Go to side view.
  2. Double-check that you are still in object mode.
  3. Move the ring up so it just touches the ground plane.
    1. Double-check that you are still in Ortho mode.
      • If not, [5] on numeric keypad
        (The grid lines will no longer get closer together as they go off into the distance.)
    2. Constrain movement to the Z axis by pressing [G] then [Z]
      OR
      You may also hold down [Ctrl]-[Shift] as you move the mouse to move in small steps.
Set up a photon lamp:
  1. Switch the render engine to YafRay.
    1. Go to Render buttons on the Scene panel
    2. Click the drop down menu under the big Render button.
    3. Change it from "Blender Internal" to "YafRay".
  2. A YafRay tab appears.
  3. Click on the YafRay tab.
  4. For now turn off AutoAA and XML
    (Auto AA is like OSA: with it off, render time is decreased.
    With XML off, the rendering is displayed as it is calculated)
  5. Make sure you are still in object mode.
  6. Snap the 3D cursor to the lamp position:
    1. Select the lamp.
    2. Press [Shift]-[S]
    3. Pick "Cursor -> Selection"
  7. Add a photon lamp
  8. Point the photon lamp directly at the ring.
    1. Switch to top view
    2. Rotate the photon lamp's light cone so it points directly at the ring.
    3. Switch to side view
    4. Rotate the photon lamp's light cone so it points directly at the ring.
  9. Decrease the photon lamp's angle so it just fits the ring
    (this conserves photons)
    1. Go to Shading Panel then Lamp buttons, Yafray: Shadow and Photons
    2. Adjust the Angle setting
    3. Check top, side, and front views for fit
Tweak the plain lamp:
  1. Select the plain lamp (not the photon lamp)
  2. Turn on Ray Shadow for the plain lamp
  3. Increase the plain lamp's energy to about 2.5 or until the scene is bright enough for you when you render it.
  4. Play with the Samples and Radius settings for Ray Shadow.  They will soften the shadow edge.
    This example is with Samples = 8, Radius = .8
  5. Feel free to scale the ring mesh so it looks more realistic.
Smooth out the ring mesh:
  1. In object mode,
  2. Select the ring mesh
  3. Go to the Editing panel under Links and Materials.

  4. Click "Set Smooth"
  5. If you look closely, you can see horizontal banding in the ring.  This is because not all of the surface normals are pointing outside.  To fix this:
    1. Go to edit mode
    2. [CTRL]-N
      Or
      In the menu bar under the 3-D view click Mesh -> Normals -> Recalculate Outside
    3. Click on "Recalculate Normals Outside"
  6. In the Editing panel under Mesh click "SubSur" to enable SubSurfacing.


Give the ring mesh appropriate material settings:

  1. In object mode,
  2. Select the ring mesh.
  3. Go to the materials buttons
    in Panels -> Shading -> Materials
    or
    Press [F5]
  4. Under Material click "Add New"
  5. Set the diffuse color, "Col", to a very light yellow.
  6. Set the specular color, "Spe", to a light yellow.
  7. Set the mirror color, "Mir", to light orange yellow that's more saturated than the specular color
  8. Feel free to experiment with the colors.
  9. Go to the Mirror Transparency tab
  10. Turn on Ray Mirror.
  11. Slide RayMirror up to about .90.
  12. Slide IOR to 3.

    You should now see some caustics in the renders, but they will just be specks at this point.
  13. Go to the Shaders Tab
  14. Change the Specularity, "Spec", to about 1.0
  15. Change the Hardness, "Hard", to about 500

    Yes, the top of the ring is green for now.  That is because it is reflecting the blue sky.
Give the ground a material, so we can give it a texture:
  1. In object mode,
  2. Select the floor mesh.
  3. Go to the material buttons.
  4. Click "Add new"
Make the ground texture:
  1. Still under the material buttons, under Texture, click "Add new"
  2. Click the "Map to" tab that appears.
  3. Unselect "Col" (for color)
  4. Select "Nor" (for Normals)
  5. Keep the Nor slider at .5
  6. Click the "Map Input" tab
  7. Change the SizeX SizeY and SizeZ sliders to about 8.2
  8. Go to the texture buttons.
  9. Under texture type pick "Clouds".
  10. Feel free to play around with the texture settings, but note that Yafray does not currently support all of the Blender procedural textures.

 Add a texture to the ring mesh:

  1. In object mode,
  2. Select the ring mesh.
  3. In material buttons, under Texture, click "Add new"
  4. Continue as you did for the floor, but set the "Nor" value to about .1 and the SizeX, Y, and Z to about 15.
Tweak the photon lamp settings:
  1. In object mode,
  2. Select the photon lamp.
  3. Increase photons to 100,000 for clearer caustics.
  4. Set the blur to about .25 so the individual photons blur together.
  5. Set the Photon lamp energy to about 3.
  6. (Your Angle setting may be different than below)

Add walls and a ceiling by extruding from the ground plane:
  1. In object mode,
  2. Select the ground plane.
  3. Switch to edit mode.
  4. Switch to top view.
  5. If the plane does not extend past the lamps and camera, scale it up so it extends past all other objects
  6. Switch to side view.
  7. Extrude the plane up for better reflections.
    1. Press [E]
    2. Choose "Region"
    3. Move the extruded plane up over the lamps.
  8. The ceiling normal will be pointing out, but that does not matter for this tutorial, only if caustics would fall on the ceiling.
Tweak YafRay settings:
  1. Go to the Scene panel, Render buttons.
  2. Go to the YafRay tab.
  3. Turn AutoAA back on.
  4. Go to the Render tab.
  5. Turn on OSA.
  6. Set OSA to 5 (or more if your computer is fast, or if you are patient).

Now fix it up so it looks good to you.  Maybe like this?

Share your work on Elysiun.com or Yafray.org or the Blender forum on CGTalk.com

If you have any comments, you may post them in the Elysiun forum thread.

1