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.
r_mirroralpha models?
-
- Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
No no no no no.
http://www.team5150.com/~andrew/carmack ... rview.html
http://www.team5150.com/~andrew/carmack ... rview.html
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.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.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-
- Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
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.
It sounds easy, but should be a pain. I have no idea of the algorithms for that.
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.
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.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
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...
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...