Home Page
Archive > Updates > 2008 > October
Search:

I finally got around to touching up the paper I wrote in 2003 on how I made the Fractal Landscape, which also includes some theories and stuff. The overview states “The purpose of this paper is to report my discoveries over the last few months from working on my fractal landscape program.”.

I don’t even want to try and relate here how much of a bitch it was converting it from the shit that Microsoft Word outputs into a clean and W3C compliant HTML. But then again, that’s always a problem with Word output, which is why I try to not deal with it often, or convert it to plain text first when possible.


A PDF copy is also available.

Download Content
Updated:10/02/08
The following updates have been made to the Fractal Landscape project, v1.05:
  • DirectX Bug (reported in last update): The water sometimes overlaps solid objects where it shouldn’t. This is due to some alpha blending setting conflicting with the z-buffer.
    • Cause: The problem was my graphics card doesn’t seem to like 16 bit depth buffers much (in this case, the w-buffer, which is mostly the same thing as a z-buffer). Oddly, this wasn’t a problem with any older graphics cards I had tested it on, and OpenGL seems to have no problem with a 16 bit depth buffer.
    • Solution: The code now has the graphics cards choose the highest available depth buffer solution for DirectX using “CheckDepthStencilMatch” (32bit, 24DX8 (24bit), or 16bit).
  • DirectX Bug (reported in last update): The clouds do not show up at most viewing angles when fogging is turned on.
    • Cause: An improper fog rendering setting
    • Solution: “SetRenderState(D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);” has been changed to “SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_LINEAR);”.
  • DirectX Bug (reported in last update): If fogging is turned on while a “Special Effect” is also on, all landscape surfaces show as pure white.
    • Cause/Solution: Same as for the above bug (improper fog rendering setting)
  • DirectX Bug (reported in last update): When leaving full screen mode the window’s title bar is sometimes pushed off the screen.
    • Cause: DirectX does not keep window settings when switching to exclusive video mode.
    • Solution: On resuming from full screen, “WS_BORDER” is added back to the window style.
  • Code Cleanup (OpenGL): The 1bit stencil buffer has been turned off. Not sure why I even had this on in the first place.
  • Code Cleanup (DirectX): Removed “D3DPRESENTFLAG_VIDEO” from the Direct3D present parameters flag and added “D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL”.
  • Code Optimization: Added some floating point optimization in the height position determination when the camera position moves.
  • Engine Feature/Fix: The Engine now makes sure the user does not start underwater when a new fractal is initialized.
    • Solution: The engine detects if the camera starts under the water, and if so, it picks the closest height map point that is above water and sets the camera there.
  • Other: I compiled this one using the normal Microsoft Visual C++ compiler instead of the Intel C++ Compiler, which has resulted in a ~40% decrease in the executable size.
Download Content