This tutorial covers how to realistically shade a marble using a combination of the standard_surface shading for the glass and volume shading using the standard_volume shader for the marble interior. When using both of these shaders with the same texture projection we can achieve an effect that marries the two and creates a realistic depth to the marble shading. The volume section is purely optional, of course, and it may well be that the glass shading produces a sufficient result in itself.
Note that this tutorial is meant merely as a guideline and so these values should not be strictly adhered to as they are mostly 'artistic' choices based on a particular texture and look. We, therefore, encourage you to experiment with different values depending on the look that you are going for and the texture map that you are using.
A recommended texture image would be one that mixes oil and ink together for example. This would produce an interesting colorful effect suitable for a marble shader.
A scene file can be downloaded here. An oil and ink texture map has been kindly provided by Kenny Frankland.
- Start off by creating a polygon plane for the marble to sit on. Assign a standard_surface shader to it and connect a suitable wood texture to the base_color.
- Create a skydome_light and connect a suitable HDR map to its color attribute.
- Create a polygon sphere and position it so that it sits on the center of the plane.
- Assign a standard_surface shader to it. Change the following parameters to match that of glass:
Now we need to connect our marble texture to the transmission_color and transmission_scatter. Transmission_scatter is suitable for any material that is fairly thick or where there is enough of it for scattering to be visible, such as honey. Transmission_scatter with depth is key to the look for our marble shading.
- Create an image shader and open the marble texture that you want to use.
- Connect the image to a uv_projection shader. We want to map the texture spherically around the sphere so change the projection_type to spherical.
- Connect the uv_projection to the transmission_color and transmission_scatter of the glass standard_surface shader.
- Increase the transmission_depth to 1. You may want to experiment with this value depending on the texture that you are using and the look that you want to go for. Changing this value will have a large effect on the overall marble shading, as you can see in the images below.
- Adjusting the U/V Angle (for spherical mapping only) of the uv_projection can give an interesting 'stretched' marble type pattern. You can also use the matrix attributes of the uv_projection to further refine the effect.
You could also try connecting the texture map to the base_color. Increase the base_weight and decrease the transmission_weight to taste.
Final shading network for the glass marble
Now, this is looking pretty good as it is. However, let's try to improve it further by adding an interior to the marble using a volume inside the glass sphere.
- Start off by duplicating the glass sphere and scaling it in slightly to around 0.9 in X, Y, and Z.
- Select the sphere and go to the Arnold volume parameters in the Modifier List.
- Change the step_size to around 0.1. Now the sphere will render as a volume.
Smaller (and therefore more accurate) step sizes will increase render times while larger sizes will render more quickly.
- Assign a standard_volume shader to the inner sphere and hide the glass sphere for now so that we can focus on the volume shading. In this example, we have used the default volume_density of 1. However, depending on the texture that you are using and the look that you are trying to achieve it could be worth experimenting with this value.
Volume Scatter Color
Now we want to add color to the volume using the same image (and projection) that we used for the glass shader.
- Connect the original uv_projection to the scatter_color of the standard_volume shader.
image -> uv_projection -> volume.scatter_color
- If the volume appears overly bright, try increasing the transparent_weight and transparent_depth of the standard_volume shader. Adjusting these attributes can really help sell the effect of merging the glass with the volume underneath.
Final shading network for the volume
- Now unhide the glass sphere and render the scene.
Make sure that the skydome_light has enough volume_samples otherwise the volume will appear noisy.
Marble glass shading with volume inside
- Finally, try adding a scratch texture to the specular_roughness of the glass shader (via a range shader for extra control). This will help to break up the specular reflection and will add more realism to the final render. Alternatively, you could try using the scratch OSL shader (link below images). Be aware though that this shader can take a long time to render.