PDA

View Full Version : Faking depth inside a material (inside-a-window effect)



Doctor Zuul
03-03-2009, 01:44 PM
Hey guys,

I was wondering if anyone had managed to create a very basic, hacky form of "interior mapping" with the material editor. I'd like to create the illusion of some depth behind a window pane--I haven't had much luck with BumpOffset and I'm looking for any potential tricks (a skybox inside a shader? a cheap off-screen render to texture? something with parallax?)

One good example of this is in Crackdown on Xbox -- every window has a simple interior that fades out to black, and it's all done in a shader.

For a super extreme example, check out this insane guy and his interior mapping sample. (http://interiormapping.oogst3d.net/)

KazeoHin
03-03-2009, 02:37 PM
I'm sure its possible if it can be done through shader model 2.0 It will just be tricky.

jayoplus
03-03-2009, 03:09 PM
Did you look at some of the building architecture materials that are in stock?

I believe some of them may give you some ideas with which to start.

SynaGl0w
03-03-2009, 03:22 PM
I have seen simple effects done with BumpOffset... Take a look at LT_Floors.BSP.Materials.M_LT_Floors_BSP_Grate_Pipe s

It might be a place to start... :)

Edit: No idea why a space was inserted between the e and s on "Pipes"

Doctor Zuul
03-04-2009, 11:18 AM
Yeah, that material provides a good example to work from. Thanks!!!

apophis3d
03-04-2009, 01:34 PM
Eat3d.com has some tuts on that but they arnt free.

Kedhrin
03-07-2009, 02:24 AM
Hey there,

I do this effect on some of my windows, its not too difficult....

so heres a tutorial! i don't want to down play that guy, but i hate the thought of having to pay for tutorials...
Step 1: Get your window texture, with the beams on the window etc.
Step 2: make the alpha of that texture mask out where the windows are and where the beams are
Step 3: make your interior texture

Ok so here is the shader build...

Using a lerp,
make A channel your window beams
make B channel your interrior texture
make the alpha y our mask texture

on the UV channel, use a bump offset with a '0' for the height.
use values in the bumpoffset to scale your effect... (like, 0.1 for heightratio and 2.0 for referenceplane)

and tada, you got interior rendering

you can get really in depth with this, for example doing another lerp with an alpha bump offset to make a parallaxing window seal inside of the window as well.

heres a screen grab of this setup

for this example, i put blinds behind the window beams. for an added effect, i put shadows of the window beams layering on top of the blinds.

in case you're wondering, the blured 'shadows' are in the normal maps alpha, the only reason why the normal map is there.

NOTE: This shader is NOT cheap

http://peeves.noobgrinder.com/parallaxwindow.jpg

Doctor Zuul
03-07-2009, 10:50 PM
Whoa, thanks for the example. I love the way that looks--the shadows on the blinds especially.

Nawrot
03-09-2009, 09:56 AM
You can also look in one of HU_Deco packages. There are 2 space wall materials with orange and blue neon scrolling (some fake, scrolling add with people etc). They have nice paralax effect that involves camera position and accurately moves with camera. Normally its hard to spot because of scrolling AD, but its visible if you stop it.