Announcement

Collapse
No announcement yet.

Faking depth inside a material (inside-a-window effect)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Faking depth inside a material (inside-a-window effect)

    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.

    #2
    I'm sure its possible if it can be done through shader model 2.0 It will just be tricky.

    Comment


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

      Comment


        #4
        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"

        Comment


          #5
          Yeah, that material provides a good example to work from. Thanks!!!

          Comment


            #6
            Eat3d.com has some tuts on that but they arnt free.

            Comment


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

              Comment


                #8
                Whoa, thanks for the example. I love the way that looks--the shadows on the blinds especially.

                Comment


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

                  Comment

                  Working...
                  X