I thought I would save everyone some hassle and deliver you the WHOLE code needed to create Dynamic Environment Maps. The code produces a result as below:

The FX file used is a simple Reflection.fx effect. The secret is the manipulation of the 6 reflections rendered to RenderTargetCube.faces.
Cubemaps are generated from inside the virtual cube, so looking at these images from the outside of the cube-mesh creates unwanted results, as the UV's and normals are flipped.
It is just like turning your socks inside out !
XNA3.1 PROJECT DOWNLOAD
The regenerated cube-maps will work with any shader.
It would also be very easy to use these 'corrected' maps and blur/filter them to create ambience maps with very little overheads.
Included in the archive are various other shaders that you are free to use.
An XboxPC controller is required to rotate the scene objects. L_Stick for orbiters and R_Stick for the BMW car.
Enjoy!
Any questions?
1 comments:
Hello Darren....
Am really glad with your posts they are very useful to me
Actually am trying to use this demo in simulation of real time car mirrors...and i have some questions
1) In draw of Dynamic Cube map
Camera position is vector3.zero....why?
FOV=90....why?
2) the Eye of the shader is (x,y,120)....why?
3) In my projct am using First person camera inside the car...
actually am very confused about the shots am going to take by camera to the cube.....
I can send u the chasecamera class to u by mail if u dont mind....
this is my mail
"Christine.fgeorge@hotmail.com"
I really need ur help as quick as possible
note:this project is not commercial one
thanks
Christine
Biomedical engineering 2009
System development,information technology institute 2010
Post a Comment
Please ask here