Sign in to follow this  
sriniatig

faking reflection maps

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this