Caelum and Hydrax together in Python

Raygoe

08-02-2009 03:39:30

Well, I searched both Caelum and Hydrax boards but it seems my strange problem (probably my mistake) wasn't present.

import sys
sys.path.insert(0,'..')
import PythonOgreConfig
import ogre.renderer.OGRE as ogre
import SampleFramework as sf
import random as random

import ogre.addons.caelum as caelum
import ogre.addons.hydrax as Hydrax
import ogre.io.OIS as OIS

_def_SkyBoxNum = 3
_def_PGComplexity = 256

mSkyBoxes = [ "Sky/ClubTropicana",
"Sky/EarlyMorning",
"Sky/Clouds"]

mSunPosition = [ ogre.Vector3(0,10000,0),
ogre.Vector3(0,10000,90000),
ogre.Vector3(0,10000,0)
]

mSunColor = [ogre.Vector3(1, 0.9, 0.6),
ogre.Vector3(1,0.6,0.4),
ogre.Vector3(0.45,0.45,0.45)]

mCurrentSkyBox = 0

class CaelumSampleFrameListener(sf.FrameListener):
def __init__(self, win, cam, app ):
sf.FrameListener.__init__(self, win, cam)
self.sceneManager = cam.getSceneManager()
self.window = win
self.camera = cam
self.paused=False
self.app = app

# Pick components to create in the demo.
# You can comment any of those and it should still work
# Trying to disable one of these can be useful in finding problems.
componentMask = caelum.CaelumSystem.CaelumComponent (
caelum.CaelumSystem.CAELUM_COMPONENT_SUN |
caelum.CaelumSystem.CAELUM_COMPONENT_MOON |
caelum.CaelumSystem.CAELUM_COMPONENT_SKY_DOME |
## caelum.CaelumSystem.CAELUM_COMPONENT_IMAGE_STARFIELD |
caelum.CaelumSystem.CAELUM_COMPONENT_POINT_STARFIELD |
caelum.CaelumSystem.CAELUM_COMPONENT_CLOUDS |
0);
componentMask = caelum.CaelumSystem.CAELUM_COMPONENTS_DEFAULT

## Initialise CaelumSystem.
self.mCaelumSystem = caelum.CaelumSystem (ogre.Root.getSingletonPtr(), self.sceneManager, componentMask)

## Set time acceleration.
self.mCaelumSystem.getUniversalClock ().setTimeScale (512)

## Register caelum as a listener.
self.app.renderWindow.addListener (self.mCaelumSystem)
ogre.Root.getSingletonPtr().addFrameListener (self.mCaelumSystem)

self.UpdateSpeedFactor(self.mCaelumSystem.getUniversalClock ().getTimeScale ())
self.timeTillNextUpdate = 0

## Update speed factors.
def UpdateSpeedFactor(self, factor):
self.speedFactor = factor;
if self.paused:
self.mCaelumSystem.getUniversalClock ().setTimeScale (0)
else:
self.mCaelumSystem.getUniversalClock ().setTimeScale (self.speedFactor)


def frameEnded(self, evt):
if not sf.FrameListener.frameEnded(self, evt):
return False

## Stop key repeat for these keys.
## keyboard input
self.timeTillNextUpdate -= evt.timeSinceLastFrame
if (self.timeTillNextUpdate<= 0):
if (self.Keyboard.isKeyDown (ois.KC_SPACE)):
self.timeTillNextUpdate = 1
self.paused = not self.paused
self.UpdateSpeedFactor(self.speedFactor)

if (self.Keyboard.isKeyDown(ois.KC_X)):
self.timeTillNextUpdate = 0.25
self.UpdateSpeedFactor(self.speedFactor/2)

if (self.Keyboard.isKeyDown(ois.KC_C)):
self.timeTillNextUpdate = 0.25
self.UpdateSpeedFactor(self.speedFactor*2)

if (self.Keyboard.isKeyDown(ois.KC_Z)):
self.timeTillNextUpdate = 1
self.UpdateSpeedFactor(self.speedFactor * -1)
return True

## Event handler to add ability to alter subdivision
class HydraxListener(sf.FrameListener):
def __init__(self, rw, cam, sm , app):
sf.FrameListener.__init__(self, rw, cam)
self.sceneManager=sm
self.renderWindow =rw
self.camera=cam
self.app = app
self.mKeyBuffer=-1
self.raySceneQuery = self.sceneManager.createRayQuery(ogre.Ray(self.camera.getPosition(),
ogre.Vector3().NEGATIVE_UNIT_Y))

def frameStarted(self, e):
global mCurrentSkyBox
if sf.FrameListener.frameStarted(self, e) == False:
return False

# Check camera height
# this is the code from the Hydrax demo -- stops you going too low...
raySceneQuery = self.sceneManager.createRayQuery(ogre.Ray(self.camera.getPosition() + ogre.Vector3(0,1000000,0),
ogre.Vector3().NEGATIVE_UNIT_Y));
qryResult = raySceneQuery.execute()
for i in qryResult:
if (i.worldFragment):
if (self.camera.getPosition().y < i.worldFragment.singleIntersection.y + 30):
self.camera.setPosition(self.camera.getPosition().x,
i.worldFragment.singleIntersection.y + 30,
self.camera.getPosition().z);

## this code will clamp the camera at a fixed position above the ground
# updateRay = ogre.Ray()
# updateRay.setOrigin (self.camera.getPosition() + ogre.Vector3(0.0, 10.0, 0.0))
# updateRay.setDirection (ogre.Vector3().NEGATIVE_UNIT_Y)
# self.raySceneQuery.Ray = updateRay
# for queryResult in self.raySceneQuery.execute():
# if queryResult.worldFragment:
# pos = self.camera.getPosition()
# self.camera.setPosition (pos.x, pos.y - queryResult.distance + 30.0, pos.z)
# break

self.app.hydrax.update(e.timeSinceLastFrame)
if self._isToggleKeyDown(OIS.KC_M, 0.5):
mCurrentSkyBox+=1

if mCurrentSkyBox > (_def_SkyBoxNum-1):
mCurrentSkyBox = 0

self.changeSkyBox()

return True

def changeSkyBox( self ):
# Change skybox
#self.sceneManager.setSkyBox(True, mSkyBoxes[mCurrentSkyBox], 99999*3, True)

# Update Hydrax sun position and colour
#self.app.hydrax.setSunPosition(mSunPosition[mCurrentSkyBox])
#self.app.hydrax.setSunColor(mSunColor[mCurrentSkyBox])

# Update light 0 light position and colour
#self.sceneManager.getLight("Light0").setPosition(mSunPosition[mCurrentSkyBox])
#self.sceneManager.getLight("Light0").setSpecularColour(mSunColor[mCurrentSkyBox].x,mSunColor[mCurrentSkyBox].y,mSunColor[mCurrentSkyBox].z)
pass

### Just to locate palmiers with a pseudo-random algoritm

seed_ = 801;

def rnd_1(min, max):
global seed_
seed_ += ogre.Math.PI*2.8574 + seed_*(0.3424 - 0.12434 + 0.452345)
if (seed_ > 10000000000): seed_ -= 10000000000
i= float(ogre.Math.Sin(ogre.Radian(seed_)))
k = ((max-min)*abs(i) + min) # this is a float !!!
return (k)

def rnd_(min, max):
return random.uniform (min, max )

def createPalms(mSceneMgr):
NumberOfPalms = 14;

mPalmsSceneNode = mSceneMgr.getRootSceneNode().createChildSceneNode();
for k in range (NumberOfPalms):
RandomPos = ogre.Vector3(rnd_(500,2500),0, rnd_(500,2500))
raySceneQuery = mSceneMgr.createRayQuery(ogre.Ray(RandomPos + ogre.Vector3(0,1000000,0), ogre.Vector3().NEGATIVE_UNIT_Y));
qryResult = raySceneQuery.execute()
for i in qryResult:
if (i.worldFragment):
if (i.worldFragment.singleIntersection.y>105 or i.worldFragment.singleIntersection.y<20):
k-=1
continue
RandomPos.y = i.worldFragment.singleIntersection.y
else:
k-=1
continue

mPalmEnt = mSceneMgr.createEntity("Palm"+str(k), "Palm.mesh")
mPalmSN = mPalmsSceneNode.createChildSceneNode()

mPalmSN.rotate(ogre.Vector3(-1,0,rnd_(-0.3,0.3)), ogre.Degree(90));
mPalmSN.attachObject(mPalmEnt)
Scale = rnd_(50,75)
mPalmSN.scale(Scale,Scale,Scale)
mPalmSN.setPosition(RandomPos)


class HydraxApplication(sf.Application):
def _chooseSceneManager(self):
# Create the SceneManager
self.sceneManager = self.root.createSceneManager("TerrainSceneManager")

def _createScene(self):
sceneManager = self.sceneManager
camera = self.camera

sceneManager.setAmbientLight ( ogre.ColourValue(1.0,1.0,1.0 ))

# Create the SkyBox
#sceneManager.setSkyBox(True, mSkyBoxes[mCurrentSkyBox], 99999*3, True)

# Set some camera params
camera.setFarClipDistance(9999*6)
camera.setPosition(312.902,206.419,1524.02)
camera.setOrientation(ogre.Quaternion(0.998, -0.0121, -0.0608, -0.00074))

# Light
mLight = sceneManager.createLight("Light0")
mLight.setPosition(mSunPosition[mCurrentSkyBox])
mLight.setDiffuseColour(1, 1, 1)
mLight.setSpecularColour(mSunColor[mCurrentSkyBox].x,
mSunColor[mCurrentSkyBox].y,
mSunColor[mCurrentSkyBox].z)


# Create Hydrax object
self.hydrax = Hydrax.Hydrax(sceneManager, camera, self.renderWindow.getViewport(0))

# Create our projected grid module
self.noise= Hydrax.Perlin() ## Default options (8, 0.085, 0.49, 1.4, 1.27f)
self.Module = Hydrax.ProjectedGrid(# Hydrax parent pointer
self.hydrax,
# Noise module
self.noise,
# Base plane
ogre.Plane(ogre.Vector3(0,1,0), ogre.Vector3(0,0,0)),
Hydrax.MaterialManager.NM_VERTEX,
# Projected grid options (Can be updated each frame . setOptions(...))
Hydrax.ProjectedGrid.Options(264 ))

# Set our module
self.hydrax.setModule(self.Module)

# Load all parameters from config file
# Remarks: The config file must be in Hydrax resource group.
# All parameters can be set/updated directly by code(Like previous versions),
# but due to the high number of customizable parameters, Hydrax 0.4 allows save/load config files.
self.hydrax.loadCfg("HydraxDemo.hdx");

# Create water
self.hydrax.create()

# Load island
sceneManager.setWorldGeometry("Island.cfg")

# Add our hydrax depth technique to island material
# (Because the terrain mesh is not an ogre.Entity)
self.hydrax.getMaterialManager().addDepthTechnique(
ogre.MaterialManager.getSingleton().getByName("Island").createTechnique())

# Create palmiers
createPalms(sceneManager );


def _createFrameListener(self):
self.frameListener = HydraxListener(self.renderWindow, self.camera, self.sceneManager, self)
self.frameListener2 = CaelumSampleFrameListener(self.renderWindow, self.camera, self)
self.root.addFrameListener(self.frameListener)



if __name__ == '__main__':
application = HydraxApplication()
application.go()


Here's the Log:
21:29:19: Creating resource group General
21:29:19: Creating resource group Internal
21:29:19: Creating resource group Autodetect
21:29:19: SceneManagerFactory for type 'DefaultSceneManager' registered.
21:29:19: Registering ResourceManager for type Material
21:29:19: Registering ResourceManager for type Mesh
21:29:19: Registering ResourceManager for type Skeleton
21:29:19: MovableObjectFactory for type 'ParticleSystem' registered.
21:29:19: OverlayElementFactory for type Panel registered.
21:29:19: OverlayElementFactory for type BorderPanel registered.
21:29:19: OverlayElementFactory for type TextArea registered.
21:29:19: Registering ResourceManager for type Font
21:29:19: ArchiveFactory for archive type FileSystem registered.
21:29:19: ArchiveFactory for archive type Zip registered.
21:29:19: FreeImage version: 3.10.0
21:29:19: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
21:29:19: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
21:29:19: DDS codec registering
21:29:19: Registering ResourceManager for type HighLevelGpuProgram
21:29:19: Registering ResourceManager for type Compositor
21:29:19: MovableObjectFactory for type 'Entity' registered.
21:29:19: MovableObjectFactory for type 'Light' registered.
21:29:19: MovableObjectFactory for type 'BillboardSet' registered.
21:29:19: MovableObjectFactory for type 'ManualObject' registered.
21:29:19: MovableObjectFactory for type 'BillboardChain' registered.
21:29:19: MovableObjectFactory for type 'RibbonTrail' registered.
21:29:19: Loading library ../../plugins\RenderSystem_GL.dll
21:29:19: Installing plugin: GL RenderSystem
21:29:19: OpenGL Rendering Subsystem created.
21:29:19: Plugin successfully installed
21:29:19: Loading library ../../plugins\RenderSystem_Direct3D9.dll
21:29:19: Installing plugin: D3D9 RenderSystem
21:29:19: D3D9 : Direct3D9 Rendering Subsystem created.
21:29:19: D3D9: Driver Detection Starts
21:29:19: D3D9: Driver Detection Ends
21:29:19: Plugin successfully installed
21:29:19: Loading library ../../plugins\Plugin_ParticleFX.dll
21:29:19: Installing plugin: ParticleFX
21:29:19: Particle Emitter Type 'Point' registered
21:29:19: Particle Emitter Type 'Box' registered
21:29:19: Particle Emitter Type 'Ellipsoid' registered
21:29:19: Particle Emitter Type 'Cylinder' registered
21:29:19: Particle Emitter Type 'Ring' registered
21:29:19: Particle Emitter Type 'HollowEllipsoid' registered
21:29:19: Particle Affector Type 'LinearForce' registered
21:29:19: Particle Affector Type 'ColourFader' registered
21:29:19: Particle Affector Type 'ColourFader2' registered
21:29:19: Particle Affector Type 'ColourImage' registered
21:29:19: Particle Affector Type 'ColourInterpolator' registered
21:29:19: Particle Affector Type 'Scaler' registered
21:29:19: Particle Affector Type 'Rotator' registered
21:29:19: Particle Affector Type 'DirectionRandomiser' registered
21:29:19: Particle Affector Type 'DeflectorPlane' registered
21:29:19: Plugin successfully installed
21:29:19: Loading library ../../plugins\Plugin_BSPSceneManager.dll
21:29:19: Installing plugin: BSP Scene Manager
21:29:19: Plugin successfully installed
21:29:19: Loading library ../../plugins\Plugin_OctreeSceneManager.dll
21:29:19: Installing plugin: Octree & Terrain Scene Manager
21:29:19: Plugin successfully installed
21:29:19: Loading library ../../plugins\Plugin_CgProgramManager.dll
21:29:19: Installing plugin: Cg Program Manager
21:29:19: Plugin successfully installed
21:29:19: *-*-* OGRE Initialising
21:29:19: *-*-* Version 1.6.1 (Shoggoth)
21:29:19: Creating resource group Bootstrap
21:29:19: Added resource location './media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
21:29:19: Creating resource group Caelum
21:29:19: Added resource location './media/Caelum' of type 'FileSystem' to resource group 'Caelum'
21:29:19: Added resource location '../media/overlays' of type 'FileSystem' to resource group 'General'
21:29:19: Added resource location './media' of type 'FileSystem' to resource group 'General'
21:29:19: Added resource location './media/materials/programs' of type 'FileSystem' to resource group 'General'
21:29:19: Added resource location './media/materials/scripts' of type 'FileSystem' to resource group 'General'
21:29:19: Added resource location './media/materials/textures' of type 'FileSystem' to resource group 'General'
21:29:19: Added resource location './media/models' of type 'FileSystem' to resource group 'General'
21:29:19: Added resource location './media/packs/SkyBoxes.zip' of type 'Zip' to resource group 'General'
21:29:19: Creating resource group Hydrax
21:29:19: Added resource location './media/Hydrax' of type 'FileSystem' to resource group 'Hydrax'
21:29:19: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
21:29:19: D3D9 : RenderSystem Option: Anti aliasing = None
21:29:19: D3D9 : RenderSystem Option: Floating-point mode = Fastest
21:29:19: D3D9 : RenderSystem Option: Full Screen = Yes
21:29:19: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce 8600 GT
21:29:19: D3D9 : RenderSystem Option: VSync = No
21:29:19: D3D9 : RenderSystem Option: Video Mode = 1920 x 1200 @ 32-bit colour
21:29:19: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
21:29:21: CPU Identifier & Features
21:29:21: -------------------------
21:29:21: * CPU ID: GenuineIntel: Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
21:29:21: * SSE: yes
21:29:21: * SSE2: yes
21:29:21: * SSE3: yes
21:29:21: * MMX: yes
21:29:21: * MMXEXT: yes
21:29:21: * 3DNOW: no
21:29:21: * 3DNOWEXT: no
21:29:21: * CMOV: yes
21:29:21: * TSC: yes
21:29:21: * FPU: yes
21:29:21: * PRO: yes
21:29:21: * HT: no
21:29:21: -------------------------
21:29:21: D3D9 : Subsystem Initialising
21:29:21: D3D9RenderSystem::_createRenderWindow "c:\PythonOgre\demos\hydrax\Demo_Hydrax01.py", 1920x1200 fullscreen miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 gamma=false useNVPerfHUD=false vsync=false
21:29:21: D3D9 : Created D3D9 Rendering Window 'c:\PythonOgre\demos\hydrax\Demo_Hydrax01.py' : 1920x1200, 32bpp
21:29:21: Registering ResourceManager for type Texture
21:29:21: Registering ResourceManager for type GpuProgram
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT16_R
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT32_R
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT16_GR
21:29:21: D3D9: Vertex texture format supported - PF_FLOAT32_GR
21:29:21: RenderSystem capabilities
21:29:21: -------------------------
21:29:21: RenderSystem Name: Direct3D9 Rendering Subsystem
21:29:21: GPU Vendor: nvidia
21:29:21: Device Name: NVIDIA GeForce 8600 GT
21:29:21: Driver Version: 7.15.11.5828
21:29:21: * Fixed function pipeline: yes
21:29:21: * Hardware generation of mipmaps: yes
21:29:21: * Texture blending: yes
21:29:21: * Anisotropic texture filtering: yes
21:29:21: * Dot product texture operation: yes
21:29:22: * Cube mapping: yes
21:29:22: * Hardware stencil buffer: yes
21:29:22: - Stencil depth: 8
21:29:22: - Two sided stencil support: yes
21:29:22: - Wrap stencil values: yes
21:29:22: * Hardware vertex / index buffers: yes
21:29:22: * Vertex programs: yes
21:29:22: * Fragment programs: yes
21:29:22: * Geometry programs: no
21:29:22: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
21:29:22: * Texture Compression: yes
21:29:22: - DXT: yes
21:29:22: - VTC: no
21:29:22: * Scissor Rectangle: yes
21:29:22: * Hardware Occlusion Query: yes
21:29:22: * User clip planes: yes
21:29:22: * VET_UBYTE4 vertex element type: yes
21:29:22: * Infinite far plane projection: yes
21:29:22: * Hardware render-to-texture: yes
21:29:22: * Floating point textures: yes
21:29:22: * Non-power-of-two textures: yes
21:29:22: * Volume textures: yes
21:29:22: * Multiple Render Targets: 4
21:29:22: - With different bit depths: yes
21:29:22: * Point Sprites: yes
21:29:22: * Extended point parameters: yes
21:29:22: * Max Point Size: 8192
21:29:22: * Vertex texture fetch: yes
21:29:22: - Max vertex textures: 4
21:29:22: - Vertex textures shared: no
21:29:22: * Render to Vertex Buffer : no
21:29:22: * DirectX per stage constants: yes
21:29:22: ***************************************
21:29:22: *** D3D9 : Subsystem Initialised OK ***
21:29:22: ***************************************
21:29:22: ResourceBackgroundQueue - threading disabled
21:29:22: Particle Renderer Type 'billboard' registered
21:29:22: SceneManagerFactory for type 'BspSceneManager' registered.
21:29:22: Registering ResourceManager for type BspLevel
21:29:22: SceneManagerFactory for type 'OctreeSceneManager' registered.
21:29:22: SceneManagerFactory for type 'TerrainSceneManager' registered.
21:29:22: TerrainSceneManager: Registered a new PageSource for type Heightmap
21:29:22: Parsing scripts for resource group Autodetect
21:29:22: Finished parsing scripts for resource group Autodetect
21:29:22: Parsing scripts for resource group Bootstrap
21:29:22: Parsing script OgreCore.material
21:29:22: Parsing script OgreProfiler.material
21:29:22: Parsing script Ogre.fontdef
21:29:22: Parsing script OgreDebugPanel.overlay
21:29:22: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
21:29:22: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
21:29:22: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
21:29:22: Font BlueHighwayusing texture size 512x512
21:29:22: Info: Freetype returned null for character 127 in font BlueHighway
21:29:22: Info: Freetype returned null for character 128 in font BlueHighway
21:29:22: Info: Freetype returned null for character 129 in font BlueHighway
21:29:22: Info: Freetype returned null for character 130 in font BlueHighway
21:29:22: Info: Freetype returned null for character 131 in font BlueHighway
21:29:22: Info: Freetype returned null for character 132 in font BlueHighway
21:29:22: Info: Freetype returned null for character 133 in font BlueHighway
21:29:22: Info: Freetype returned null for character 134 in font BlueHighway
21:29:22: Info: Freetype returned null for character 135 in font BlueHighway
21:29:22: Info: Freetype returned null for character 136 in font BlueHighway
21:29:22: Info: Freetype returned null for character 137 in font BlueHighway
21:29:22: Info: Freetype returned null for character 138 in font BlueHighway
21:29:22: Info: Freetype returned null for character 139 in font BlueHighway
21:29:22: Info: Freetype returned null for character 140 in font BlueHighway
21:29:22: Info: Freetype returned null for character 141 in font BlueHighway
21:29:22: Info: Freetype returned null for character 142 in font BlueHighway
21:29:22: Info: Freetype returned null for character 143 in font BlueHighway
21:29:22: Info: Freetype returned null for character 144 in font BlueHighway
21:29:22: Info: Freetype returned null for character 145 in font BlueHighway
21:29:22: Info: Freetype returned null for character 146 in font BlueHighway
21:29:22: Info: Freetype returned null for character 147 in font BlueHighway
21:29:22: Info: Freetype returned null for character 148 in font BlueHighway
21:29:22: Info: Freetype returned null for character 149 in font BlueHighway
21:29:22: Info: Freetype returned null for character 150 in font BlueHighway
21:29:22: Info: Freetype returned null for character 151 in font BlueHighway
21:29:22: Info: Freetype returned null for character 152 in font BlueHighway
21:29:22: Info: Freetype returned null for character 153 in font BlueHighway
21:29:22: Info: Freetype returned null for character 154 in font BlueHighway
21:29:22: Info: Freetype returned null for character 155 in font BlueHighway
21:29:22: Info: Freetype returned null for character 156 in font BlueHighway
21:29:22: Info: Freetype returned null for character 157 in font BlueHighway
21:29:22: Info: Freetype returned null for character 158 in font BlueHighway
21:29:22: Info: Freetype returned null for character 159 in font BlueHighway
21:29:22: Info: Freetype returned null for character 160 in font BlueHighway
21:29:22: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
21:29:22: Texture: ogretext.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
21:29:22: Parsing script OgreLoadingPanel.overlay
21:29:22: Finished parsing scripts for resource group Bootstrap
21:29:22: Parsing scripts for resource group Caelum
21:29:22: Parsing script GroundFog.program
21:29:22: Parsing script Haze.program
21:29:22: Parsing script MinimalCompositorVP.program
21:29:22: Parsing script CaelumSample.material
21:29:22: Parsing script DepthComposer.material
21:29:23: Parsing script GroundFog.material
21:29:23: Parsing script LayeredClouds.material
21:29:23: Parsing script moon.material
21:29:23: Parsing script PointStarfield.material
21:29:23: Parsing script Precipitation.material
21:29:23: Parsing script SkyDome.material
21:29:23: Parsing script Starfield.material
21:29:23: Parsing script Sun.material
21:29:23: Parsing script DepthComposer.compositor
21:29:23: Parsing script Precipitation.compositor
21:29:23: Finished parsing scripts for resource group Caelum
21:29:23: Parsing scripts for resource group General
21:29:23: Parsing script PythonOgreDebugPanel.material
21:29:23: Parsing script Island.material
21:29:23: Parsing script OffsetMapping.material
21:29:23: Parsing script Palm.material
21:29:23: Parsing script SkyBox.material
21:29:23: Parsing script Compositor.overlay
21:29:23: Parsing script DP3.overlay
21:29:23: Parsing script Example-CubeMapping.overlay
21:29:23: Parsing script Example-DynTex.overlay
21:29:23: Parsing script Example-Water.overlay
21:29:23: Parsing script PythonOgreDebugPanel.overlay
21:29:23: Texture: popanel.png: Loading 1 faces(PF_A8R8G8B8,638x90x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,638x90x1.
21:29:23: Parsing script Shadows.overlay
21:29:23: Finished parsing scripts for resource group General
21:29:23: Parsing scripts for resource group Hydrax
21:29:23: Finished parsing scripts for resource group Hydrax
21:29:23: Parsing scripts for resource group Internal
21:29:23: Finished parsing scripts for resource group Internal
21:29:23: [Hydrax] Hydrax created.
21:29:23: [Hydrax] HydraxDemo.hdx loaded.
21:29:23: [Hydrax] Creating module...
21:29:23: [Hydrax] Creating ProjectedGridVertex module.
21:29:23: [Hydrax] ProjectedGridVertex created.
21:29:23: [Hydrax] Module created.
21:29:23: [Hydrax] Initializating RTT Manager...
21:29:23: [Hydrax] RTT manager initialized.
21:29:23: [Hydrax] Registring device restored listener...
21:29:23: [Hydrax] Device restored listener registred.
21:29:23: [Hydrax] Creating materials...
21:29:23: [Hydrax] Creating water material...
21:29:23: Texture: Fresnel.bmp: Loading 1 faces(PF_L8,256x1x1) with 5 generated mipmaps from Image. Internal format is PF_L8,256x1x1.
21:29:23: Texture: Foam.png: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
21:29:23: [Hydrax] Water material created.
21:29:23: [Hydrax] Creating depth material...
21:29:23: Texture: Caustics_0.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_1.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_2.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_3.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_4.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_5.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_6.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_7.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_8.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_9.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_10.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_11.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_12.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_13.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_14.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_15.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_16.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_17.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_18.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_19.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_20.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_21.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_22.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_23.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_24.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_25.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_26.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_27.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_28.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_29.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_30.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: Texture: Caustics_31.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:29:23: [Hydrax] Depth material created.
21:29:23: [Hydrax] Creating underwater material...
21:29:23: Texture: UnderwaterDistortion.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
21:29:23: [Hydrax] Underwater material created.
21:29:23: [Hydrax] Materials created.
21:29:23: [Hydrax] Creating god rays...
21:29:23: [Hydrax] Perlin destroyed.
21:29:23: [Hydrax] God rays created.
21:29:23: [Hydrax] Creating water mesh...
21:29:23: [Hydrax] Water mesh created.
21:29:23: TerrainSceneManager: Activated PageSource Heightmap
21:29:23: Texture: Sand.tga: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
21:29:23: Texture: Sand.png: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
21:29:23: Texture: SandGrass.tga: Loading 1 faces(PF_A8R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,1024x1024x1.
21:29:23: Texture: SandGrass.png: Loading 1 faces(PF_R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
21:29:23: Mesh: Loading Palm.mesh.
21:29:23: Texture: Palm.tga: Loading 1 faces(PF_A8R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,512x512x1.
21:29:23: Caelum: Initialising Caelum system...
21:29:23: Caelum: Plugin not installed; installing now.
21:29:23: Caelum plugin version 0.4.0 installed
21:29:23: Registering ResourceManager for type PropertyScript
21:29:23: Caelum: Creating caelum sub-components.
21:29:23: Texture: EarthClearSky2.png: Loading 1 faces(PF_A8R8G8B8,64x64x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
21:29:23: Texture: AtmosphereDepth.png: Loading 1 faces(PF_R8G8B8,32x1x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,32x1x1.
21:29:23: Caelum: Creating CaelumSphericDome sphere mesh resource...
21:29:23: Caelum: generateSphericDome DONE
21:29:23: Texture: sun_disc.png: Loading 1 faces(PF_A8R8G8B8,128x128x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x128x1.
21:29:23: D3D9 : Loading 2D Texture, image name : 'moon_disc.dds' with 5 mip map levels
21:29:23: D3D9 : Loading 2D Texture, image name : 'noise1.dds' with 5 mip map levels
21:29:24: D3D9 : Loading 2D Texture, image name : 'noise2.dds' with 5 mip map levels
21:29:24: D3D9 : Loading 2D Texture, image name : 'noise4.dds' with 5 mip map levels
21:29:24: Caelum: DONE initializing
21:29:26: !!! Direct3D Device Lost!
21:29:27: Releasing D3D9 default pool texture: HydraxReflectionMap
21:29:27: Released D3D9 default pool texture: HydraxReflectionMap
21:29:27: Releasing D3D9 default pool texture: HydraxRefractionMap
21:29:27: Released D3D9 default pool texture: HydraxRefractionMap
21:29:27: Releasing D3D9 default pool texture: HydraxDepthMap
21:29:27: Released D3D9 default pool texture: HydraxDepthMap
21:29:27: D3D9TextureManager released:
21:29:27: 3 unmanaged textures
21:29:27: D3D9HardwareBufferManager released:
21:29:27: 3 unmanaged vertex buffers
21:29:27: 0 unmanaged index buffers
21:29:27: Reset device ok w:1920 h:1200
21:29:27: Recreating D3D9 default pool texture: HydraxReflectionMap
21:29:27: Recreated D3D9 default pool texture: HydraxReflectionMap
21:29:27: Recreating D3D9 default pool texture: HydraxRefractionMap
21:29:27: Recreated D3D9 default pool texture: HydraxRefractionMap
21:29:27: Recreating D3D9 default pool texture: HydraxDepthMap
21:29:27: Recreated D3D9 default pool texture: HydraxDepthMap
21:29:27: D3D9TextureManager recreated:
21:29:27: 3 unmanaged textures
21:29:27: D3D9HardwareBufferManager recreated:
21:29:27: 3 unmanaged vertex buffers
21:29:27: 0 unmanaged index buffers
21:29:27: !!! Direct3D Device successfully restored.
21:29:27: [Hydrax] Restoring water mesh...
21:29:27: [Hydrax] Updating water mesh...
21:29:27: [Hydrax] Deleting water mesh...
21:29:27: [Hydrax] Water mesh deleted.
21:29:27: [Hydrax] Creating water mesh...
21:29:27: [Hydrax] Water mesh created.
21:29:27: [Hydrax] Water mesh restored.


I noticed the D3D Device fails every time... Strange... I am not alt+tabbing or anything like that.

Everything except the sky was gray.

I'd get a screenshot but as soon as a loaded it up again this error happened:
21:37:42: OGRE EXCEPTION(3:RenderingAPIException): Cannot lock D3D9 vertex buffer: n/a in D3D9HardwareVertexBuffer::lock at ..\src\OgreD3D9HardwareVertexBuffer.cpp (line 88)

Also what happened is my Display Driver crashed.

I have an NVidia GeForce 8600 and normally it works but I am probably doing something bad when combining them.

Sorry for the trouble, anyone have any ideas?