Sign in to follow this  
Bitterman8

Enviroment (cube) mapping problem

Recommended Posts

Please help me! Iam only trying to make some changes in tutor example : Direct3D/EnvMapping/CubeMap (the airplane flying around the teapot, DX9.0 SDK). I noticed one big problem: reflections work properly only if the WORLD MATRIX of teapot (object surrounded by cubemap) is an IDENTITY ATRIX. But I need to scale, rotate and transpose it, and then reflections are corrupted. What am I supposed to do? What should I change (propably some matrices, I tried almost everything, but no result). Thank you...

Share this post


Link to post
Share on other sites
OK, I solved it alone. The problem was not in World matrix of objects but in View matrix of SkyBox. The Skybox is propably meant to be a stationary base of cube map (like sky and ground), so the translation items (.41, .42, .43, .44) of Skybox's View matrix must be zero => all bounding walls remain in same distance form "player" no matter how we move camera. And then the reflections are reflected properly. Why is this fact not written somewhere ?! I spent many hours trying to handle this f..ing problem....

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