Baking with cage: ray distance vs extrusion

The baking section of the manual states the following for the cage options:

Cage
Cast rays to active object from a cage. A cage is a ballooned-out version of the lowpoly mesh created either automatically (by adjusting the ray distance) or manually (by specifying an object to use). When not using a cage the rays will conform to the mesh normals. This produces glitches on the edges, but it is a preferable method when baking into planes to avoid the need of adding extra loops around the edges.

Ray Distance
Distance to use for the inward ray cast when using selected to active. Ray distance is only available when not using Cage.

Cage Extrusion
Distance to use for the inward ray cast when using Selected to Active and Cage. The inward rays are cast from a version of the active object with disabled Edge Split Modifiers. Hard splits (e.g., when the Edge Split Modifier is applied) should be avoided because they will lead to non-smooth normals around the edges.

Source: https://www.blender.org/manual/ko/render/cycles/baking.html

I first thought the following sentence had a typo:

A cage is a ballooned-out version of the lowpoly mesh created either automatically (by adjusting the ray distance) or manually (by specifying an object to use).

and that it should read instead: “A cage is a ballooned-out version of the lowpoly mesh created either automatically (by adjusting the EXTRUSION) or manually (by specifying an object to use)”, because when you tick the option cage, the ray distance setting becomes unavailable and is replaced with extrusion. But after talking with tobias_h on #blenderwiki, he told me the passage is correct and that “automatically” is meant to be read as “when not checking the cage option and specifying a ray distance, you are creating a cage automatically”.

Now I’m not sure if it’s the way it’s formulated or me, but if this is the case, I have a really hard time understanding the difference between those two setups:

(1) Leaving cage unchecked and specifying a ray distance of 0.1 (for instance).

(2) Checking cage and specify and specify and extrusion of 0.1 without specifying a cage object.

I understand that using a specified object as cage allows you to tweak the directions of the normals manually, but if simply giving a ray distance creates a cage by scaling the lowpoly along its normals, aren’t (1) and (2) the exact same thing? Unless “cage extrusion” doesn’t mean extruding and scaling along normals. What I am missing here?

The automatic method (ray distance) takes your original mesh and shoots rays inward from x distance away from the mesh. I know you got that part, but for the sake of clarification.

The manual method takes a custom cage that you make specifically for the task of shooting rays from it’s normals. For added tweakability, you can use the cage extrusion to give it a little extra padding if needed. You’re basically saying, "Shoot rays from this custom cage mesh PLUS this extra little distance

Thank you for your reply! If what you say is true (I tested it and I believe it is), the way the feature is built seems really redundant and doesn’t seem to make sense:

  1. Why is there a “cage” checkbox at all? The “cage object” field should simply be available at all times without a checkbox. If it is empty, the ray distance creates a cage at specified distance. If specified, it uses the specified cage.

  2. How is the extrusion setting relevant, when one can simply specify a cage and scale it along its normal with shrink/fatten? What is the purpose of entering a number that creates an invisible cage around your actual cage when you can fatten your cage and get actual visual feedback?

  3. When checking “cage” but not specifying an object, “ray distance” and “extrusion” do the exact same thing. In fact, both of them are the exact same thing, so why are they called differently? Isn’t that confusing for no reason?

I’m just discussing this here because I might have missed something and would like to be corrected if I’m mistaken, but if I’m not I think it would be interesting to bring that to the UI mailing list.

Any input is appreciated.

I’m not too sure on all your points, to be honest. My best guess would be:

  1. Perhaps you’ve selected a cage object, but you want to quickly test out baking with and without it. The checkbox gives you an easy toggle.

  2. It gives you the means to make quick tweaks to eliminate artifacts without having to go back and forth between tabs.

  3. The different names help to identify Ray’s being shot a certain distance from the original mesh, or cage mesh.