Announcement

Collapse
No announcement yet.

Reflection of lights in glass-floor ?

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

    Reflection of lights in glass-floor ?

    My problem: In my map I have a hallway with a large glass-plate as a part of the floor. There are lights at the bottom of the left and right walls of that hallway that should be reflected in the glass. I can't describe it very good therefor I made a drawing for easier understanding:



    [EDIT]I updated the pic so its also showing the right wall![/EDIT]

    I wanted to ask you guys what you think would be the best way to achieve this before I spend hours and hours with cubemaps and stuff.

    The glass is very "clear" so I don't really need the walls or ceiling to reflect. But the lights are very bright so there should be a reflection of them.

    Thx !!!!

    #2
    You're not going to be able to get the reflection that accurate. You MIGHT if you use my weird technique, but that's best for small surfaces where the player can't walk on top of the camera. Best bet is to make the glass "fuzzy" so you can't see sharp details in it.

    Comment


      #3
      make a texture showing exactly the wall with the lights and insert that texture as specularity map... haven't tried it but if you play around a bit you'll surely find a nice solution

      Comment


        #4
        @Angel_Mapper:
        Thx Rachel, I already knew your "weird" technique and actually thought for a few seconds of using it when I decided to have the reflections there. But I thought it would be just to weird for such a simple effect and probably cause problems cause the players can walk all over that place.

        @yourLittleTeddy:
        I tried around a bit with a specularity map and found it hard to get the effect to my liking. I think its not easy, cause the window itself is already a complex material.

        The reflection does not need to be very sharp, but it should be "somewhat" realistic in regards of position and size. And I have lights left AND right of the glass-floor to reflect! I dont even need the wall itself to be reflected. Its just that the lights are so bright that there must be a reflection of them. I would be happy if just a few bright, white spots are visible on the glass, but at the right places and with the right size!!

        Do you think it is possible to leave the glass material as it is and just add a thin transparent sheet or something over it with the reflection? That way I could use a new material for the sheet. Maybe I could even use two sheets then, one for the left and one for the right lights.

        Can two complex materials be blended into one? I admit I'm quite the noob when it comes to materials

        Looking forward to your materials tutorial Rachel !!!!! Plz cover the reflection of lights in glass-floors

        Comment


          #5
          [EDIT] Dammit, double post. [/EDIT]

          I double posted, so why not use it for information: I updated the pic above to also show the right wall:



          So I need to have reflections of the lights left AND right. And thats tricky I think. As I said it does not have to be a very sharp projection. A few white lights in the right shape and position would do...

          Comment


            #6
            **here is an idea.. i haven't tested it but it should work**

            Photoshop the floor texture.

            Just take a screenie of one of the lights, use photoshop to change the perspective, copy it for as many lights as are in the map- make sure they are lined up where the real lights should be, import it, make it reflective.

            You now have the illusion of a true reflection of the lights.. and a true reflection for the character details as players pass over it.

            It should work.
            At least I'm fairly sure it should.
            Maybe it would.
            I dunno.. hell, give it a shot. It'll only take about 10 minutes of yer life to try it.

            Good Luck!
            -=sneak

            Comment


              #7
              Lol... dunno how much polys you have in along these walls - but if it's a pretty simple structure without anything under it - why not double the room? ...er...
              ___
              1 |__|
              2 |__|

              if that effect is that important.
              To avoid your problem I always use another effct - I generally make my reflections softer to just simulate some kind of reflection and on floors I simulate a plastic like "matt" floor... the reflektion is one of the glow materials and if the floor is bumby I use an additional spec.mask... looks pretty nice - I don't like the cubemaps in UT2k3...

              B.t.w till rachels mat. tut comes out use that tut. - it also introduced me very well in the Ut2k3 material techniques - http://udn.epicgames.com/pub/Content/MaterialTutorial/

              When my ed is installed again I'll tell if I find something to solve your problem... it's just hard for me cuz I cannot play around.

              good luck and show me some screens how it looks like

              Comment


                #8
                Or... if your a little more cuurious,. You could try the
                mirror for the floor by putting a simple
                flat bsp under the glass static mesh
                and apply the mirroring feature
                onto the bsp. But if the detail is high
                in that room... it may get choppy on
                lower end pcs.

                You also may have to have
                Usestencil=True
                on in the ut2003.ini

                Good luck.

                Comment


                  #9
                  Originally posted by Xabora
                  Or... apply the mirroring feature
                  onto the bsp.
                  You also may have to have
                  Usestencil=True
                  on in the ut2003.ini
                  No that sucks, It's not 'might have to enable stencils' you DEFINATLY would have to, and they wouldnt work for people who didnt have it set or have low end systems.
                  They are disabled for good reason. try it out before recomending it foo.

                  B) Using a warpzone to make a fake "reflection" using a hidden room <- this is a good idea but it sucks too because warpzones are fecked in UED3.

                  C) Cubemaps <- this looks good, has a low performance hit, is very controlable and its the way DE or epic would do it. recomended.

                  Comment


                    #10
                    Is the area below the glass player-accessible? I think yourLittleTeddy's idea would work if it isn't. I'm playing around with some other options if it is, I'll post in a bit depending on how well they work out...

                    Comment


                      #11
                      Alright, if the area below isn't player-accessible, you'll like this. I'm impressed with how good it looks. Unless someone posts something like "Oh pweese oh pweese oh pweeeese tew me how it woks!" I'm going to let you figure it out on your own (it's worth it).


                      DM-LightReflectionDemo.zip (52k)

                      Comment


                        #12
                        @inio:
                        "Oh pweese oh pweese oh pweeeese tew me how it woks!"

                        Just kidding, but it looks pretty much like what I need. Only thing that worries me is that the area below in fact IS accessible. The whole purpose of the glass-floor is so ppl can check from up or below where the flag carrier runs or if there is any incoming.

                        @yourLittleTeddy & Xabora:
                        The whole corridor is very low poly so no worries there. I could do almost anything in there without risking major performance drops even on low level machines. That is one of the reasons why I want to add some spice to it. But there IS something under it.

                        Special thx @ inio for even trying something out! It really looks great. But you said "if the area is not accessible"!? So if its not possible like that I think I will try the cubemap thing like FOZZI suggests although I fear its tricky to get it right in such a close environment.

                        But inio's screenshot gives everybody the perfect impression what I need!

                        Thx everybody for helping me out here, I would not waste your time if this wasn't very important to me. I would try and try for weeks until I got it perfect but I don't have the time cause a very important (to me at least) mapping-project that almost lasted a year now nears its end and I want to add some finishing touches to it so the main mapper has more time to concentrate on the "really" important stuff.

                        Comment


                          #13
                          Originally posted by Yakomo
                          The whole purpose of the glass-floor is so ppl can check from up or below where the flag carrier runs or if there is any incoming.
                          If the area below is open, then you don't have to go through the shenanigans I did, but you won't be able to make the reflectiosn quite as convincing

                          That is, if the world-space area where the reflected light would appear to be is open, you can put the reflected actor(s) there and then use a volume to show/hide the actor(s) when the player enters and exits the area which the reflection is visible from. You won't be able to do any of the z-buffer tricks I do to properly clip the reflection though - they would make players disappear behind the reflections. A a result you would need to model the reflection mesh to simlulate being clipped (which, unfortunately, is impossible for the leading corner if you want a square cut-out).

                          The problem is that to do it right, you need to do bizarre things with the z-buffer that rely on the map objects being drawn in a very specific order. Other player pawns get added after any map objects, so they would be drawing into the z-buffer that had already been funkified by drawing the reflection.

                          Comment


                            #14
                            didn't I mention that cube map thing...? problem of it is the inaccurate reflection in the corner cubemaps have.

                            lol... I'm mapping a very long time now - but I really needed time to get a clue how you made it - pretty tricky... am curious why that was not my idea... and it only needs half the space, my idea would need - tell me I'm right!

                            Comment


                              #15
                              Originally posted by yourLittleTeddy
                              didn't I mention that cube map thing...? problem of it is the inaccurate reflection in the corner cubemaps have.
                              Cube-maps wouldn't accurately track the position of the reflected light. Cube maps are good when you have a small reflecting object in a large complex room (like CTF-FaceIII), but don't work well when you are precisely reflecting off a large flat reflective surface.

                              lol... I'm mapping a very long time now - but I really needed time to get a clue how you made it - pretty tricky... am curious why that was not my idea... and it only needs half the space, my idea would need - tell me I'm right!
                              Your idea as stated (as used in many classic games including Mario 64), doesn't allow for there both to be a transmitted (sub-floor) and reflected room. This technique is a derivative of it but allows for the reflection to be properly drawn on top of the transmitted room (without having to worry about the transmitted room having space to hold the reflection.

                              BTW, one bit that might confuse you that I set up incorrectly (it causes significant unnecessary overdraw): the coverz FinalBlend should have bTwoSided=false. Later today I'm gonna put together a new version with a demo of how you could do an over/under walkway setup - it'll have this bug fixed.

                              Comment

                              Working...
                              X