water reflection troubles

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

shadowkiller

New Member
Mar 28, 2004
26
0
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?
 

shadowkiller

New Member
Mar 28, 2004
26
0
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. :(
 

shadowkiller

New Member
Mar 28, 2004
26
0
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:

Radiosity

Minty Fresh!
Jan 3, 2003
2,217
0
0
45
UK
www.radiant-studios.net
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 :)
 

Birelli

meh...
Oct 14, 2001
734
0
16
Syracuse, NY
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) :)
 

T2A`

I'm dead.
Jan 10, 2004
8,752
0
36
Richmond, VA
Birelli said:
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) :)
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.
 

Eyegore

=================
Sep 4, 2001
293
0
0
53
Hanover
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:

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
1337noob, like others have said, real-time reflections are not possible in this Engine.
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.