* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
conversion script instead, if they use a lot of math functions
in new code:
http://www.pasteall.org/9052/python
- Size adjustments can be accomplished with warp mesh data now. So we get a free spot in the GUI for a tilt option.
- Tilt option to tilt the camera (for planetarium domes).
Angle is in degree from -180 to +180. It's needed for planetarium domes (as this one http://domejunky.blogspot.com/2009/05/dome-corrected-bge.html ).
- This is the last commit regarding dome code I expected to 2.49. I consider this feature full implemented now. (working on docs now)
Commit 20099 started using a FBO way too big.
According to Paul Bourke this is how it's done in other Engines:
Projectors HD:
1920x1050 - buffersize = 1024; FBO size = 2048
1400x1050 - buffersize = 1024; FBO size = 2048
Projectors XGA:
1024x768 - buffersize = 512; FBO size = 1024
Now in Blender Game Engine we are using:
Projectors HD:
1920x1050 - buffersize = 1050; FBO size = 2048
1400x1050 - buffersize = 1050; FBO size = 2048
Projectors XGA:
1024x768 - buffersize = 768; FBO size = 1024
(I guess I should be committing code to the ge_dome branch instead of the trunk. I feel bad doing all those adjustments in a hurry to 2.49 final release in the trunk. That is ok, right?)
*) a small note:
In the end it turned out that we have upright and downright domes out there.
So I may rearrange the order of the gui later:
(1 = fisheye, 2 = truncated up, 3 = truncated down, 4 = envmap, 5 = spherical panoramic)
I don't plan to do a doVersion() for that, so if you are using it already keep in mind that the modes may change before 249 final release.
After last commit (20099) warping meshes got slower (more quality == less performance). Since we don't need an extra warping for truncated domes, It's better to handle them directly in openGL without the need of warping it.
I'll talk with some Dome owners to see if we need both Upright and Downright modes. I may remove one of them by 2.49 them.
*) also: a proper GLEW_EXT_framebuffer_object check before generating FBO (for warping meshes).
**) next in line (maybe after RC2): tilt option to tilt the camera up to 90º upward.
We are using an image twice as big to render the fisheye before warping.
It'll slow down warping meshes a little, but we get way more resolution.
Therefore I will bring Truncated Dome mode back in order to avoid using warping mesh for that.
The solution is a hack. It's a workaround for another bug (#18655).
Now it's working in all modes: fullscreen, maximized screen and gameplayer.
* small change to always set the perspective mode as true during dome mode.
* Enviroment Map implemented (replacing truncated mode 2).
- Now it's possible to pre-bake animated (or static) EnvMaps to use with Cube Map textures.
* Enabling 2DFilter in Dome mode
- no GL_DEPTH_BUFFER supported though.
* Tweaking GameSettings menu (centralizing buttons)
User guide:
http://wiki.blender.org/index.php/Dev:Source/GameEngine/Fisheye_Dome_Camera
Fixed two bugs from original patch:
- deleting a text will clear the warp field from Game framing settings
- removed spurious black dots along the edge of the cube map in the gameplayer
Known limitation:
- resizing of the screen doesn't work in the gameplayer
Known bugs:
- Texture with reflexion are not rendered correctly
- Spurious problems with light