Page 1 of 1
r_mirroralpha models?
Posted: Tue Apr 19, 2011 9:01 am
by behind_you
question of curisosity mostly. im wondering of this has been done or is simple to implement. i read somewhere that you can only apply mirroralpha to surrounding brushes.
for those who dont know what im talking about, mirroralpha makes a brush transparent and reflects stuff. like a mirror.
Posted: Tue Apr 19, 2011 9:52 am
by leileilol
and what? Render an entire scene per polygon on a model?
And that's why it's never done.
Posted: Tue Apr 19, 2011 11:33 am
by mh
No no no no no.
http://www.team5150.com/~andrew/carmack ... rview.html
Glquake has shadows and mirrors, but those are novelty features and not rigorously implemented. The game wasn't designed around them, and we won't exploit them.
First of all fix r_mirroralpha to make it work right. Do a proper generalised implementation of it.
Then start thinking about doing sexy things with it. In that order.
Posted: Sat Apr 23, 2011 9:38 am
by behind_you
i c. possible i guess. is what i said about only surrounding brushes in a world could become mirrors true?
Posted: Sat Apr 23, 2011 10:13 am
by mankrip
This is probably the closest you can achieve. Generate an envmap of the current scene, and apply it to the model.
It sounds easy, but should be a pain. I have no idea of the algorithms for that.
Posted: Sun Apr 24, 2011 5:11 pm
by Sajt
It won't be accurate because an envmap is generated from a single point... (and because regenerating it every frame is kind of dumb, especially if there are multiple mirrors in the scene)
This idea is probably only really feasible with raytracing, at least if you want the mirror-surface to be smooth/curved. Otherwise, if you want faceted reflective models, maybe you could do it if your models are pretty low-poly

But it wouldn't be useful except as a tech demo.
Posted: Sun Apr 24, 2011 5:25 pm
by Spike
I wonder what happens in Q3 if you have a portal surface on a moving object like a door or something. There's no fundamental reason why you can't have the same in glquake, you'd just have to track the mirror's model matrix properly when generating the reflection matrix and doing the alphaed bit.
If you actually meant on mdls... Urm, yeah, that's not going to work too well. Too many different planes, too many different reflections. I wonder what your framerate would be like...