Home Unreal Engine

Post process inside geomotry?

polycounter lvl 10
Offline / Send Message
tuxmask75 polycounter lvl 10
Hey guys, I was wondering if it is possible to do a post process inside objects and not outside them? Lets say we have a fish bowl and need the water to be tinted darker.

If the camera is inside the bowl the water is tinted, and if the camera is outside the bowl the water would remain tinted but the area around the bowl would not be tinted. if the camera is half way in an out of the bowl than what is shown inside is tinted. well I think you get the point.

How would you guys handle something like this?

Replies

  • danpaz3d
    Options
    Offline / Send Message
    danpaz3d polycounter lvl 7
    The only thing I can think of is post-process volumes, but that requires the player to be within the volume.

    Another way (I think..can't remember) is to exclude certain objects or materials from being affected by post-process.

    Other than that I think it's all up to the materials.
  • blankslatejoe
    Options
    Offline / Send Message
    blankslatejoe polycounter lvl 18
    Hmmm...I think excluding objects from the post process is a very brittle route..Those are full screen effects. You'd maybe be able to exclude an object via a color key or possibly depth, but for what you're talking about I don't think that'll give you very good results

    Normally what you'd do for this sort of thing is use a Post process volume, like Danpaz3d said, for when you're within the volume and then when you're outside looking in you just use fancy shader stuff on the surface--depth bais alpha for fogginess and such. That's the normal way to handle pools, lakes, lava, acid, etc. The transition isnt gonna be graceful in UDK though, as it'll pop from one to the other...You can do some fancy FX work to cover the transition, but you;ll never get a half and half split of the screen of the posteffects work.
  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    The only way, and also by far the best is to use materials for this. You need to have polygones facing outwards in the inside of the bowl. You texture those with a unique material that is set to additive/modulate/alphablend (whichever one does it for you), and recolors and distorts what is behind it, which color wise you'd try to match to the PP effect you get from inside the bowl.
    You'd make the material one sided only, so from within the bowl you would not see this effect around you.

    The half-in half-out effect would have to be done using a PP material, but this either requires you to use the broken Set Scalar Param in Kismet, or do it via code (cleanest).
    If you would run the water recoloring and distortion via a PP material, and then turn this into a scalar that controls the heigth of the effect, you would then be able to animate this scalar based on position in the world. If above a certain position the scalar would begin to pull the effect downwards thus half the screen would be normal, half would be in the water.

    This is the approach we took in The Ball. Not exactly like that (half-in half-out), but we used it to have water run off your screen once out of the water instead. This is not something easy to explain in a few lines though, and is pretty advanced to set up.
  • tuxmask75
    Options
    Offline / Send Message
    tuxmask75 polycounter lvl 10
    Thanks guys, I think this may help somewhat!
Sign In or Register to comment.