POV-Ray : Documentation : How do I make an object hollow?
  POV-Ray 3.6 Documentation Online View How do I make extruded text? How can I fill a glass with water or other objects? How do I make an object hollow?

This question usually means "how do I make a hollow object, like a waterglass, a jug, etc".

Before answering that question, let me explain some things about how POV-Ray handles objects:

Although the POV-Ray documentation talks about "solid" and "hollow" objects, that is not how it actually works. "Solid" and "hollow" are a bit misleading terms to describe the objects. You can also make an object "hollow" with that same keyword, but it is not that simple.

Firstly: POV-Ray only handles surfaces, not solid 3D-objects. When you specify a sphere, it is actually just a spherical surface. It is only a surface and it is not filled by anything. This can easily be seen by putting the camera inside the sphere or by clipping a hole to one side of the sphere with the clipped_by keyword (so you can look inside).

People often think that POV-Ray objects are solid, really 3D, with solid material filling the entire object because they make a 'difference' CSG object and it seems like the object is actually solid. What the 'difference' CSG actually does is to cut away a part of the object and add a new surface in the place of the hole, which completely covers the hole, so you cannot see inside the object (this new surface is actually the part of the second object which is "inside" the first object). Again, if you move the camera inside the object, you will see that actually it is hollow and the object is just a surface.

So what is all this "solid" and "hollow" stuff the documentation talks of, and what is the "hollow" keyword used for?

Although objects are actually surfaces, POV-Ray handles them as if they were solid. For example, fog and media do not go inside solid objects. If you put a glass sphere into the fog, you will see that there is no fog inside the sphere.

If you add the "hollow" keyword to the object, POV-Ray will no longer handle it as solid, so fog and atmosphere will invade the inside of the object. This is the reason why POV-Ray issues a warning when you put the camera inside a non-hollow object (because, as it says, fog and other atmospheric effects may not work as you expected).

If your scene does not use any atmospheric effect (fog or media) there is not any difference between a "solid" or "hollow" object.

So all the objects in POV-Ray are hollow. But the surface of the objects is always infinitely thin, and there is only one surface. With real world hollow objects you have always two surfaces: an outer surface and an inner surface.

Usually people refer to these kind of objects when they ask for hollow objects. This kind of objects are easily achieved with a 'difference' CSG operation, like this:

// A simple water glass made with a difference:
{ cone { <0,0,0>,1,<0,5,0>,1.2 }
  cone { <0,.1,0>,.9,<0,5.1,0>,1.1 }
  texture { Glass }

The first cone limits the outer surface of the glass and the second cone limits the inner surface. How do I make extruded text? How can I fill a glass with water or other objects?

Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.