X-Ray Effect

How to make X-ray Shader (Effect) in cycle. Please help me to make this kind of effect
https://www.youtube.com/watch?v=ZjDB-SvFEYQ

I tried many ways, some of them were very near to this, but I like this one. Any other better way to make this effect?


Looks great! You could add a density function to your material. X-rays are absorbed more and don’t reach the film with as much intensity if they have to travel through denser matter–like bone–or a thicker section of material. Of course, without a volume shader, you would just have to fake it.


xray.zip (108 KB)

Thanks @see360

Your output looks great. I am stile studying your file.

I see that I forgot to remove that multiply node right after the dot product. I originally had that in there to make sure the output into a factor node is positive. Since I made it easy on myself and used a color ramp node anyway, that first multiply node on top is no longer necessary.

I personally like this one a little better: xray.zip (108 KB).

The nodes following the Light Path node at the bottom are just an exponential decay function, inspired by the absorptive glass materials by agus. If you want to increase the material “density,” then just increase the multiply node value that is currently 0.100

Thank you all for sharing! Nice one!

kinda off topic, but the more I sorta understand nodes in blender, the more amazed I am.

Yup, I share your thought r4ytrace! The problem is that I tend to see things graphically and to use nodes properly we need to add a “math thinking” too. :slight_smile:

yeah I think my head is finally getting around it I think, and as a bonus, I think it will help my understanding of modular audio synthesis interfaces, well in particular Reaktor which will be nice next time I try it out.

Hello,

I am total beginner and I need to do something real quick.
How to remove transparency in this material? I want colours to be solid like here

I’ve tried many things, but my Blender skills are not enough for now.

Can anyone help me?

@arczello: Select the X-ray group node and press the TAB key to enter into edit mode. From there you can edit the internal node tree of the group. Press TAB again to close the group back up.

@see360: Thanks for the X-ray Group Node. I extended it by adding a couple of inputs for the Color and Emission strength. I added a Color Ramp for the input and it worked fine.

Attachments


@Atom:

Well that’s the hardest part - node tree :slight_smile: I’ve tried to change every element of the tree but with no luck. First I thought that transparency is result of blending (Multiply), but I guess it’s not.

I don’t understand how it works exactly. I want to, but right now I don’t have time to learn Blender more. I’m switching from Maya, but my work can’t wait :frowning:

arczello, Blender has a learning curve quite high :slight_smile:

Multiply is a math “operator”. It works (in the simplest way) like its name - it multiplies. For example if you mix two images in the node editor (post-processing the final image) and select “multiply” as the mixing method, the image that goes over the other is multiplied over it. You should try it to understand.

Now, for the transparency in this node setup, try changing the alpha value and the position of the colors in the “color ramp”.

I’ve tried that as well :stuck_out_tongue: but alpha does nothing :confused:
Position changes shading, but transparency stays.

It’s more easy than you think… :slight_smile:

Open the x-ray group (select and press TAB top open and TAB to close) and in the end of the node setup change the 2 input shaders like this:


Did it worked? Don’t forget that you removed emission shader so you’ll need at least one light source in the scene…

Well transparency is gone, but also the effect :stuck_out_tongue:
The trick was: no light and no shadows.
BUT I replaced only Transparent BSDF and it’s working :smiley:

Thanks for Your time and help!
I almost forgot - thanks guys for this topic and solution for x-ray effect :slight_smile:

Just noticed that you guys had continued the thread. Love the style Atom.

Wanted to let you know that I updated this to be more physically correct when the volume absorption shader came out. Still use cycles, a bright white world background, and the compositor to negate the image. The difference is the material node now looks like this:


Hi there! i was trying to lower the opacity in general BUT WITHOUT loosing the effect and I can’t achieve it!, any recommendations?
Thanks!

If you are using the volume absorption node setup above, then reduce the “Density” value in the Volume Absorption node.

Neat effect atom