Jump to content
Sign in to follow this  
jimmyb

Xray shader with VEX

Recommended Posts

hello,

I'm a long time Houdini user, but new to the whole VEX builder stuff in 5.5

Is there a simple way to create a nice xray type shader with VOPS? Kinda

like the beginning of Fight Club?

In maya I usually use a sampler info node and a ramp which I feed into a phong

or blinn.

Any help is appreciated!

jim

Share this post


Link to post
Share on other sites

I think most x-ray shaders use a dot product calculation to shade surfaces that're mostly paralel with the viewing direction, and make paralel surfaces transparent. In vops, check out the Edge Falloff operator. You could reverse the effect (white at the edges, black in center) and feed that into opacity.

However, I always thought xrays worked quite differently..... I thought they accumulate density, so the densest part of an object would be the most opaque. Hmm... maybe you can do some sort of ray tracing.... not really my specialty, so I don't know if it'll work.

Well, the talented guy who sits behind me wrote the xray shader for xXx, so if you want I can ask him some details.

Cheers!

Zig

Share this post


Link to post
Share on other sites

thanks for the reply anakin78z. Yeah that would be really cool if you

could ask him. I'm so used to working with the old Materials editor and

TOPs - all these new VOPs seem so forign to me.

Are you working at Digital Domain? What did you do for xXx?

regards,

j

Share this post


Link to post
Share on other sites

hi jimmyb, in this thread I did something that pretty much will nail the basics of the x-ray shader. The difference is that you'd use a constant shader (green maybe :) ) as the base and modulate the opacity instead. Too bad the hip isn't there and i can't find it here. Still I dropped a few lines there about what that small example had.

Then, you can also layer on top of that some grainy animated noise, a very subtle touch, and animate the faloff of the fresnel fuction (at the shop level) with some noisy chops to make the kind of imperfect, not constant nor uniform "flashy" x-ray beam. For the noise you could be doing it in cops, rendering each object separated from the background and affecting the alpha with the same kind of noise, or the kind of "low horizontal resolution display", much like the displays do in the matrix, but easier because your renders are greyscale (or greenscale if you prefer). Projecting from the camera at rendertime would also work, but again... you'd need to rerender many frames to check the effect.

One more idea... If the object looks to much hollow inside, you can comp under it a well blurred and maybe shrunk (not resizing but correcting the alpha) copy of the image. That could give more density to the object. Well don't trust me much on this one :ph34r:

Just a bunch of ideas... but the base is the same as that old thread

regards

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×