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
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.
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.
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.