Here's a tutorial on how to create a basic xray material.
Reference
Here's the material we are trying to emulate in CG. This photograph of a real xray comes from a friend of mine who broke her collar bone recently (thanks Sandy, get better soon!).
Software Agnostic Material
The basic ingredients are as follows:
Here's the shader for Blender...
Under Emission in the Principaled BSDF node I set the Strength to 1 and the color to slightly bluish, this causes the self illumination.
The Base Color in the Principaled BSDF node is set to a slightly
bluish
color (although any color is good, notice my reference was yellow
colored).
The Alpha (the Opacity of the shader) is a bit more complicated. First
off I used a Layer Weight node, which causes the middle of the
object is see-through and
the edges are opaque. I then hook this into a Color Ramp node, which
lets me adjust the amount of opacity using a Gradient. It's good, but
the bones seem a little bit smooth, whereas the
reference had some noise to it. So lets add some noise with the Noise
Texture Node. I hook up a Texture Coordinate Node which applies object
3d space so that the resulting noise is applied in 3d space (instead of
say using UVs). I then modify the noise with another Color Ramp node
which lets me adjust the contrast of my noise. I then take the Noise
and the Facing value and multiply them together,
which applies the noise to just the opaque part of the Layer Weight
node. Then this resulting value I apply to the Alpha of my material.
Here's the resulting render.
Here's the blend file, Blender 4.2: xray_blender.zip
3dsmax (vray) Example
Here's the shader for 3dsmax for the vray renderer renderer.Then I placed a falloff map in the Opacity slot, set to perpendicular / parallel. I then played with its mix curve to change how much we could see through our material.
This gives me this result...
3dsmax (scanline) Example
Here's the shader for 3dsmax for the scanline renderer.Then I placed a falloff map in the Opacity slot, set to perpendicular / parallel. I then played with its mix curve to change how much we could see through our material.
This gives me this result...