In part one, I talked about the terrible technique used to fake the look of an x-ray image. Now that I’ve snatched away an item from your bag-of-tricks, it’s only fair to replace it with a new technique. But before I do that. Let’s explore how x-ray imaging works.
Simple Definition
This is the standard illumination model, or how our eyes and cameras work. This is actually a tiny sub-set but you get the idea.
Light sources emit energy that bounces off objects into a camera and absorbed by a sensor. This could be film or a CCD on a digital camera. Actually the purpose of the camera isn’t so much collecting the light from the image, rather the camera is blocking the light that is not the image from exposing the film. Light is coming from all directions and bouncing all over (not shown), but only the light that converges through the lens is captured. This is not the case for x-rays. The whole point of x-ray imaging is to have the energy mostly penetrate the object and measure the how much reaches the sensor. This type of imaging is analogous to cast shadows.
The denser the object the more rays are deflected. Metal is denser than bone, and bone is denser than muscle. It’s also important to note that the amount of object between the emitter and the sensor affects the amount of energy deflected. Also the characteristics of the sensor medium plays an important role.
Basic Preparation
Typically the much of iconic “x-ray look” is from the film. X-ray film is a negative and has a bluish tint. I find this hard to deal with directly. It’s counter intuitive for the denser objects to be white. If we invert the image and apply some other manipulations we can get a better idea of what the target render should look like. The target render will be what we render in the 3d package that will be flexible to tweak in the composite. Afterwards it will be trivial to apply an invert and a tint to recreate the look of the film.
In this blow up we can observe a few of the characteristics close up. First of all, the hand bones seem lighter at the bottom. In fact, the fingers seem much lighter too. This could be either from the emitter losing strength at the edges of the image. It may be that more stray x-rays are exposing the film . If you look back at the original, the thickest parts of the arm and wrist look like they are glowing. What ever the cause, its hard to remove from the render target so we’ll leave it in. Adding a subtle vignette and glow will add to the realism of the render later on. But for now let’s move on the more important characteristics. The bones have dark edges. This one is super important. This is the whole reason that falloff-shader technique became popular. But if you look at the arm you might notice that the edges aren’t darker. In fact, it’s darkest at the thickest part but mostly its about the same level of gray. And at the edges it actually gets lighter. Don’t confuse the blood vessels for dark edges on the arm. But do notice that the blood vessels are darker than the arm and are darkest when passing behind or in front of a bone.
All these observations can be explained by what’s happening along the ray cast from the emitter through the medium to the sensor. Don’t forget bones are hollow. Inside most bones is the less dense marrow. And the skull is like a hollow sphere containing the brain. This takes care of the look of the bones and large vessels. The rest of the tissues behave like the solid examples. Observe that at the edges the exposure is actually less. So the important factors are 1) entering and exiting an object or tissue 2) the thickness of the object or tissue. If your renderer doesn’t support these two requirement it will be hard to create these images.![]()
So it’s all about thickness and rayhits, not falloff. Next time we’ll go into making some real renderings and maybe some shader writing. I’m still deciding which renderer to use. Then we’ll discuss the problems involved in making models that will work with this technique.
Ben Lipman
Anatomical Travelogue R&D


August 8th, 2009 at 10:41 pm
you should look into using Mental ray. There are some custom written shaders out there that take thickness into account using ray depths.
~Sam
August 11th, 2009 at 4:06 pm
The point is that users don’t actually use the right shaders because they don’t understand the phenomenon. Mental Ray isn’t the solution anymore than any other renderer is, because it’s up to the user to understand the phenomenon they wish to depict.
August 16th, 2009 at 5:15 pm
I agree . I suggested mental ray in response to the statement “I’m still deciding which renderer to use.”. I was under the impression that you use brazil for all of your rendering and had come across a limitation in its shader writing capabilities.
~Sam