faking reflection maps

Started by
3 comments, last by sriniatig 18 years, 9 months ago
Hi I want to fake the reflection technique which we see in racing games on cars. The platform that I'm working on does not have support for multi texturing. It does not have support for environmental mapping. Is there a way where we can fake the effect that we see in these racing games ? Plz advice.
Advertisement
Hmm, sounds tough. With no multitexture support you will obviously have to do it in 2 passes, 1 for the car and another for it's reflection. And, I suppose render to texture is out of the question, so you'll have to use something like a cloud texture.

So basicly, just draw the car a second time blended with a cloud texture on it. But so it looks like a reflection, you modify the texture coordinates. Try reflecting the camera direction vector around the vertex normal, and scaling the result until the vertical component is +/- some constant. Then just use the other 2 components as your texture coordinates. The constant is effectively the height of the plane with cloud texture you are reflecting.
___________________________________________________David OlsenIf I've helped you, please vote for PigeonGrape!
Yes, render to texture is out of the option. I'm currently getting 10-15 fps for my rendering process. doing a double pass will decrease the fps. also the support of blending is very limited. it supports additive, subtractive blending.
would it be advisable to have an texture strip which will store the final texture ( actual texture + reflection texture ) as a sequence of images. The strip will act as an animated strip to perform reflection. I do not want to go through this procedure before confirming that i have no option but to do it this way. So is there any other way to do it ?
Oh, that's interesting. Reflections with no multitexturing, no second passes, no RTT, I assume no stenciling...

I experimented a little and found a solution. Assume we have a cloud texture, or a skybox(6 textures). First, clear the buffers and render only the object(s) that are reflective, with textures and all as normal. Now set the depth function into GREATER. Enable additive blending and render a big cube around your camera(big enough to "cover" all the objects) textured with the cloud texture , with frontface culling(that is, you can see the "inside" walls). It's not true reflection of course, but you'll have an effect that looks like it.
that sound very interesting! will try it !

This topic is closed to new replies.

Advertisement