Jump to content
  • Advertisement
Sign in to follow this  
sriniatig

faking reflection maps

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!