1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

water reflection troubles

Discussion in 'Mapping' started by shadowkiller, Nov 8, 2004.

  1. shadowkiller

    shadowkiller New Member

    Joined:
    Mar 28, 2004
    Messages:
    26
    Likes Received:
    0
    I set up a nice water reflection and i have it set to reflect a bunch of meshes but when every i move around the water reflection doesnt line up with the mesh. Any ideas how to fix that?
     
  2. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Well, if you did it through the cube map method then it should be pretty obvious.
     
  3. shadowkiller

    shadowkiller New Member

    Joined:
    Mar 28, 2004
    Messages:
    26
    Likes Received:
    0
    I did. Im new to water effects. I set up my terrain and then took my 256x256 screenshots and then made the cube map then the texevmap and then the shader. Please help. :(
     
  4. Zxanphorian

    Zxanphorian ( ͡° ͜ʖ ͡°)

    Joined:
    Jul 1, 2002
    Messages:
    4,480
    Likes Received:
    0
    When you move the objects, the cubemap/reflective water surface will stay the same, because the textures remain static.
     
  5. shadowkiller

    shadowkiller New Member

    Joined:
    Mar 28, 2004
    Messages:
    26
    Likes Received:
    0
    I know, i set up the static meshes and took the shots and set it all up but when i played the game the reflection didnt match up. I didnt move any of the meshes or anything. As i walked farther away from the mesh the reflection stayed the same size and somtimes even got bigger but the static mesh (trees) got smaller and it didnt line up. How do i make it so the reflection always lines up with the meshes and terrain? The only way i can make it line up is if i stand in the exact same spot as where i took the screenshots. (center of the water at waterlevel)
     
    Last edited by a moderator: Nov 9, 2004
  6. Radiosity

    Radiosity Minty Fresh!

    Joined:
    Jan 3, 2003
    Messages:
    2,217
    Likes Received:
    0
    You can't, as Zxan already mentioned, the cubemap textures are static, meaning they'll look the same regardless of where you stand. It's a trick, used to give a relatively nice effect on water and shiny surfaces without a huge performance hit you'd get if it was an actual realtime rendered reflection. It's a limitation of the current Unreal Engine, you'll just have to live with it until Unreal Engine 3 is released in 2006 :)
     
  7. Birelli

    Birelli meh...

    Joined:
    Oct 14, 2001
    Messages:
    734
    Likes Received:
    0
    Try looking at an Epic map that implements EnvMaps for water reflections (from memory Antalus has a pool with this). They behave in the same way...yet I imagine you never noticed that it was happening did you? It's one of those little tricks that only show up to the author of the map, everyone else that's not thinking about it doesn't even notice (well, unless they're looking for it) :)
     
  8. T2A`

    T2A` I'm dead.

    Joined:
    Jan 10, 2004
    Messages:
    8,763
    Likes Received:
    0
    Every water reflection in the game uses an EnvMap, so I'm not really sure what you're talking about. The pool in Antalus just uses other textures blended on top of the reflection texture to get that algae look. That is some of the coolest water in the game though, right next to the little stream in Albatross.

    1337noob, like others have said, real-time reflections are not possible in this Engine. The term cubemap should give you a clue of how it works. Basically what it does simulate a whole cube of reflections onto one plane. It's pretty much the same effect as floating in the middle of a textured cube and looking around, all applied to a single surface. That's why as you move around the water, you'll see the "reflections" from a different angle. It is a pseudo-reflection that gets the job done, but is in no way realistic at all. But that's okay because the game is not about that kind of stuff. Trust me, no one will notice that your water doesn't perfectly reflect your level. In fact, people won't care what it reflects at all. If you've noticed, a lot of the stock maps share the same cubemap texture. Check out BridgeOfFate. The little pools leading to the sides of the flag rooms don't reflect the level at all. You'll see that texture in many of the stock maps. People don't look for perfect reflections; they just want it to look like water, so as long as it "reflects" something, you'll be fine.
     
  9. Eyegore

    Eyegore =================

    Joined:
    Sep 4, 2001
    Messages:
    293
    Likes Received:
    0
    If the issue is that they didn't line up, you can check a setting that sets up the coordinates - i can't remember off the top of my head and I'm at work so maybe I shouldn't bother to try, but I'm going to any way.

    When you set up the TexsEnvMap, there is a coordinate flag, that tells the coodinate either to use world or camera coordinates.

    I had a problem like what you're describing and by setting the coordinate to world, everything lined up. This setting is not explained in the tute at UDN, so it was tricky to find...

    EDIT -

    Yeah, I just looked at the tute, it doesn't explain the setting, but the setting is called EnvMapType and you have a couple setting there one being EM_CameraSpace and another for EM_WorldSpace or something like that. Mess with that and see if you get the results you're looking for.

    EDIT II -
    Ah, look - I just re-read the tute and found that it does say this:

    "If the EnvMapType is EM_CameraSpace, the ground will be in front of you, but if you set it to EM_WorldSpace it'll be at the bottom"

    See if that helps
     
    Last edited: Nov 11, 2004
  10. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Actually, you can. It's not as good as a true dx8/dx9 pixel shader emulation but using a texture camera/unrealscripted texture can achieve a reflection. Problem is clarity of texture (They are usually really small textures for performance) or low performance.
     
  11. T2A`

    T2A` I'm dead.

    Joined:
    Jan 10, 2004
    Messages:
    8,763
    Likes Received:
    0
    Well, aside from Rachel's tutorial that I couldn't get to work. ;)
     

Share This Page