Home Unreal Engine

Close proximity xray

polycounter lvl 13
Offline / Send Message
crasong polycounter lvl 13
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.

Replies

  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
    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
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Hey crasong, I found a whitepaper
    http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4385136&tag=1

    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.
  • crasong
    Options
    Offline / Send Message
    crasong polycounter lvl 13
    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!
  • crasong
    Options
    Offline / Send Message
    crasong polycounter lvl 13
    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!
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    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 :)

    http://www.daveprout.com/
  • crasong
    Options
    Offline / Send Message
    crasong polycounter lvl 13
    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
    http://img690.imageshack.us/img690/7356/destsampletest.png

    The Mat setup
    http://img580.imageshack.us/img580/843/destdepthsetup2.png


    If I could somehow apply this to other mats somehow through code, would this work?
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    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...
Sign In or Register to comment.