No announcement yet.

X-ray/thermal vision, and/or per-object bloom?

  • Filter
  • Time
  • Show
Clear All
new posts

    X-ray/thermal vision, and/or per-object bloom?


    I am working on a "thermal"/x-ray vision effect, where the player can use a special vision mode to see certain "hot" objects and enemies behind walls. It may be unrealistic but whatever! I am new to the UDK, and so far I have encountered two main problems.

    1. How to make objects visible through walls
    2. How to do a "thermal" map effect

    For issue #1, one option for making everything visible through a wall might be a really heavy scripting technique to duplicate things, move them to another location in the level, capture them with a scenecapture actor, and overlay them. I verified that this could produce ghostly overlay images, but I really want to avoid scenecapture if possible, plus I do not need the full "x-ray".

    I finally learned about the depth priority group setting on static meshes. This let me dynamically change an option to make some meshes visible to the player, and I messed with the material effects to get a simple "heat" effect on the emissive channel. Unfortunately this means that the original material is ALSO seen through the wall. The next step in this plan is to make objects that have the potential to be seen by thermal vision always have a duplicate static mesh. That duplicate mesh could be hidden most of the time, but displayed with the "heat" material at other times. I have not yet tested whether it is feasible to completely lock two static meshes together like this, so that a spinning physics barrel will move the second mesh in sync with it.

    Does anyone have any advice about the approaches above, whether the double-mesh thing seems like it could have unforeseen problems, and/or whether there are other ways to attack the "thermal" through-wall vision problem?

    For issue #2, I would like to have a vague, blurry overlay where the object is, with different colors as would be expected from a thermal map. Unfortunately, though I can come up with multiple colors, I do not know any way to make a more nebulous/blurry effect for the overlay. Would some sort of lens flare or particle effect be useful here? I am really in the dark.

    Here is a mockup from an image editor of what I would like, basically:

    Here is a sample shot of what I have right now in the UDK, using fresnel material effects and the foreground depth priority group:

    One thing I learned is that overdriving the emissive channel can produce bloom. However, is there any way to do bloom only on a per-object basis? That would not be perfect, but it might improve the effect since it would allow the glow to extend beyond the borders of the object in a blurry fashion. I have tried a post-processing volume, but that failed to have any effect, even DOF (probably because I don't know something important about post-processing volumes). Moreover, is it going to cause massive engine performance problems if I tried to somehow lock a bunch of tiny post-processing volumes to individual meshes? Actually I imagine the player would have to be inside the volume for the effect to even take place.

    The only way I even got bloom to work was potentially by enabling the overall uber post-processing effect. That lets me turn off DOF blur, and activate bloom, but it unfortunately seems to have some other image coloring/brightness effects that are unrelated to bloom and that I cannot control. Using an overall post-processing effect for dofbloom or dof motion blur bloom, and disabling dof, failed to make bloom work if I am not mistaken.

    Any advice on what direction I should pursue, or whether this sort of effect is simply impossible, would be greatly appreciated. Not requiring bloom would be awesome. Having a per-object setting for post-processing bloom would also be awesome.

    By using normal world post-processing I can get bloom to happen so I have an effect like this:

    I still do not know any way to get the colored "blob" effect I would like, yet one that would still somewhat follow the outline of a static mesh. I almost wonder if a particle effect could do something like that, but I do not need anything animated (some slight moving distortion could be okay, however).

    I feel like I am trying things that people never do with the UDK which makes me rather scared, since I do not know which things might just be impossible.