Forum

r_mirroralpha models?

Discuss the creation of various model formats for Quake engines, and related matters to modeling.

Moderator: InsideQC Admins

r_mirroralpha models?

Postby behind_you » Tue Apr 19, 2011 9:01 am

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.
User avatar
behind_you
 
Posts: 237
Joined: Sat Feb 05, 2011 6:57 am
Location: Tripoli, Libya

Postby leileilol » Tue Apr 19, 2011 9:52 am

and what? Render an entire scene per polygon on a model?

And that's why it's never done.
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby mh » Tue Apr 19, 2011 11:33 am

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.
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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby behind_you » Sat Apr 23, 2011 9:38 am

i c. possible i guess. is what i said about only surrounding brushes in a world could become mirrors true?
User avatar
behind_you
 
Posts: 237
Joined: Sat Feb 05, 2011 6:57 am
Location: Tripoli, Libya

Postby mankrip » Sat Apr 23, 2011 10:13 am

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.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Postby Sajt » Sun Apr 24, 2011 5:11 pm

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 :P 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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Spike » Sun Apr 24, 2011 5:25 pm

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...
Spike
 
Posts: 2911
Joined: Fri Nov 05, 2004 3:12 am
Location: UK


Return to Modeling

Who is online

Users browsing this forum: No registered users and 1 guest