Page 1 of 1

Are reflections this good possible?

Posted: Sun Nov 27, 2005 1:53 am
by Foo
Check out the quality of reflections in this old Q3 preview video:
http://media.pc.ign.com/media/010/010794/vids_1.html

Aside from the mirror on a func_rotating (still works, just tried it!) the reflections being shown in some of those walls is waaaay above the quality of reflections I've seen in Q3 to date. is it via a different technique or am I missing something? Mebbe it was taken out of the game before release?

Posted: Sun Nov 27, 2005 2:01 am
by Hipshot
Didn't really se anything special there. What did you mean? Looked just like a normal mirror to me, and a portal camera behind the Q3 mark on the wall.

Posted: Sun Nov 27, 2005 2:41 am
by cha0s
do you mean the texture with the q3 logo on it? it's just a transparent "window" - i belive it's still available in q3.

Posted: Sun Nov 27, 2005 2:47 am
by Foo
Image

That one. I dont think it's a portal as the player isn't visible in it, and I dont think it's a window through to another area because it's sitting on a 2d texture (no depth to the frame if it was supposed to be a window) and it seems to be reflecting the lights in that room.

All the reflections I've seen done artificially in Q3 (take a picture of the level, write it into the shader) don't move properly in sync with the player's movements.

Posted: Sun Nov 27, 2005 3:18 am
by Hipshot
Its a portal, a camera portal. You don't see the player in those.

Posted: Sun Nov 27, 2005 3:21 am
by Foo
Right. So it's pointing to somewhere else? Thanks. I thought it was a reflection because what was in it looked like the room itself.

Any way to get static reflection textures to move properly with the player?

Posted: Sun Nov 27, 2005 3:32 am
by Hipshot
Hmm, I'm not sure what you mean. Do you mean, if I like faked a reflection with a texture, then a wanted that to move with the player so to say? So that it would move on top of a window?

Posted: Sun Nov 27, 2005 3:37 am
by Hipshot
This is how ID made fake reflections

Code: Select all

textures/base_wall/bluemetal1b_chrome
{
	qer_editorimage textures/base_wall/bluemetal1b_shiny.tga

	{
		map textures/base_wall/chrome_env2.tga
	        rgbGen identity
		tcGen environment
		tcmod scale .25 .25
	}
	
	{
		map textures/base_wall/bluemetal1b_shiny.tga
		blendFunc GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA	
		rgbGen identity
	}
	{
		map $lightmap
		blendfunc gl_dst_color gl_zero
		rgbGen identity
	}
}

Posted: Sun Nov 27, 2005 4:03 am
by Foo
Yeah I've seen and used that kind of shader in the past. The problem is in making a reflective shader which takes a screenshot of the level as its reflection (you compile the level, take the picture, then use that picture as part of the shader)... the end result is a 'true' reflection of the level geometry.. but the proble is that the 'tcGen environment' doesn't cause the overlayed texture to move with the player's perspective... it just kinda makes it skew and wiggle around in an odd manner when the player passes.

Posted: Sun Nov 27, 2005 4:29 am
by Hipshot
I used a pretty good fake reflection on a non-public map, ill try to find it and shoot some screens or something.

Also, alot of games, most notably Unreal and Source based games, does reflections via Cube Maps, where the engine snaps a shot from a given entitiy, and then pasts this to a face. These games of course has real reflections also, but this other method is used to save performance.

Posted: Sun Nov 27, 2005 4:50 am
by Hipshot
View this clip.

http://www.zfight.com/misc/files/q3/reflection.rar
The time here is 4x and I made these reflections with both scroll and normal tcgen env.

Posted: Sun Nov 27, 2005 5:14 am
by Foo
Not bad, Looks quite convincing.

I'll try a few shaders on the small-scale like the one you suggested above. Hopefully I can find something that will stand up to close inspection.

Thanks again. The vid was beyond what I was expecting :)