View Full Version : Close proximity xray
08-20-2010, 02:39 AM
Hey guys, I couldn't seem to find anything on this so far.
Tried searching up words like translucent materials or fading of objects, but what i'm trying to do is to get objects that are close and/or blocking the cameras Line of Sight to fade or have an xray effect.
Anyone have tutorials for these? Or a quick explanation of how I would set that up would be great.
Thanks in advance!
P.S I've got a third person camera setup right now, so i'm also trying to switch off collision with the camera as well so that it wont end up so zoomed in in tight corners.
well i guess what you would need to do is script some sort of distance detection for an object, so you can switch the material to a translucent one, as i doubt making every asset with a translucent shader would be very good for your performance, the translucent material is pretty straight forward, there are plenty of nodes to check screen distance on a per pixel level, all you need to do is plug those into the opacity channel
08-20-2010, 07:33 AM
Hey crasong, I found a whitepaper
Dunno if that's available to you or not. I was able to get it through my university id. If you can't message me and Ill try and grab a copy of it.
My first guess would be to make a depth map and basically if anything is black, reduce opacity by certain %. Best way to calculate black and white would be intensity I guess. On a mac and cant try anything (stupid mac doesnt like bootcamp) though Ill mess around on the weekend and see if I can pull something. Always enjoy making stuff as it teaches me more about the material editor :)
Actually now that I think about it, if you can inverse the depth map, so what would be closest to you would move from being black to being white and if you plug that with a multiplier to control the opacity. Think of it almost as an alpha channel.
08-20-2010, 07:34 AM
Hey Neox, will try your suggestion, I'm been learning some basics about the nodes and material editor in UDK, will muscle my way around it for a while to see if i can get something going. Thanks again!
08-20-2010, 07:36 AM
Hey haiddasalami, I'm afraid its not available to me, and I kind of understand what you and Neox are talking about, I suppose its a matter of finding it and meddling with it for myself over the next few days. Thanks for the suggestion!
08-20-2010, 07:40 AM
Read through the whitepaper and haha it confused me so gonna have to read through it again but thats for simulating an actual xray effect. For depth map node configuration, check out dave prout blog, scroll down and you should see a bunch where he uses it. Probably save you time :)
08-20-2010, 09:08 AM
Okay, so far I've gotten some results following a DestDepth Hourence tutorial. Slowly starting to understand how I might go about getting this done, but this is like 10% of the way there I suppose. :p
haiddasalami: Cool! Thanks for the link, will check it out now.
The screenie of what the effect is like
The Mat setup
If I could somehow apply this to other mats somehow through code, would this work?
08-20-2010, 10:00 AM
Hey crasong, nice. You could try using it as a post process effect through a material slot. I would link you to UDN but it seems the post process page is not there :( I think the package is FX Hit effects by default and it should be Ut Post Process Console. just add a material node in there and create a material and attach it. Wish I had UDK on here...
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.