Problems with this awesome libary.

scratchyrice

12-01-2009 22:21:51

Basicly, The demo runs fine at a nice 50fps. As soon as i implement hydrax into my own skeleton Ogre framework, For some reason it renders at 8fps, no matter what resolution etc.
It may be to do with the fact that im using the following as a test solution to update hydrax (Im just learning how to use hydrax, Then i will put it into my main engine):
mHydrax->update(0.01);

Now, I thought that would be the reason, But no matter what value i put in, Its always 8fps.

Question: How do i get the time since the last frame update, without the use of combersome framelisteners?

Here is my ogre log file, Just in case it's helpful:
21:49:58: Creating resource group General
21:49:58: Creating resource group Internal
21:49:58: Creating resource group Autodetect
21:49:58: SceneManagerFactory for type 'DefaultSceneManager' registered.
21:49:58: Registering ResourceManager for type Material
21:49:58: Registering ResourceManager for type Mesh
21:49:58: Registering ResourceManager for type Skeleton
21:49:58: MovableObjectFactory for type 'ParticleSystem' registered.
21:49:58: OverlayElementFactory for type Panel registered.
21:49:58: OverlayElementFactory for type BorderPanel registered.
21:49:58: OverlayElementFactory for type TextArea registered.
21:49:58: Registering ResourceManager for type Font
21:49:58: ArchiveFactory for archive type FileSystem registered.
21:49:58: ArchiveFactory for archive type Zip registered.
21:49:58: FreeImage version: 3.10.0
21:49:58: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
21:49:58: 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:49:58: DDS codec registering
21:49:58: Registering ResourceManager for type HighLevelGpuProgram
21:49:58: Registering ResourceManager for type Compositor
21:49:58: MovableObjectFactory for type 'Entity' registered.
21:49:58: MovableObjectFactory for type 'Light' registered.
21:49:58: MovableObjectFactory for type 'BillboardSet' registered.
21:49:58: MovableObjectFactory for type 'ManualObject' registered.
21:49:58: MovableObjectFactory for type 'BillboardChain' registered.
21:49:58: MovableObjectFactory for type 'RibbonTrail' registered.
21:49:58: OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in ConfigFile::load at g:\ogresrc\ogremain\src\ogreconfigfile.cpp (line 84)
21:49:58: plugins.cfg not found, automatic plugin loading disabled.
21:49:58: *-*-* OGRE Initialising
21:49:58: *-*-* Version 1.6.0 (Shoggoth)
21:49:58: Added resource location '../media/fonts' of type 'FileSystem' to resource group 'General'
21:49:58: Added resource location '../media/gui' of type 'FileSystem' to resource group 'General'
21:49:58: Added resource location '../Media/materials/programs' of type 'FileSystem' to resource group 'General'
21:49:58: Added resource location '../Media/materials/scripts' of type 'FileSystem' to resource group 'General'
21:49:58: Added resource location '../Media/materials/textures' of type 'FileSystem' to resource group 'General'
21:49:58: Added resource location '../Media/packs/SkyBoxes.zip' of type 'Zip' to resource group 'General'
21:49:58: Creating resource group Hydrax
21:49:58: Added resource location '../Media/Hydrax' of type 'FileSystem' to resource group 'Hydrax'
21:49:58: Creating resource group Mesh
21:49:58: Added resource location '../media/models' of type 'FileSystem' to resource group 'Mesh'
21:49:58: Loading library RenderSystem_Direct3D9_d
21:49:58: Installing plugin: D3D9 RenderSystem
21:49:58: D3D9 : Direct3D9 Rendering Subsystem created.
21:49:58: D3D9: Driver Detection Starts
21:49:58: D3D9: Driver Detection Ends
21:49:58: Plugin successfully installed
21:49:58: Loading library RenderSystem_GL_d
21:49:58: Installing plugin: GL RenderSystem
21:49:58: OpenGL Rendering Subsystem created.
21:49:59: Plugin successfully installed
21:49:59: Loading library Plugin_ParticleFX_d
21:49:59: Installing plugin: ParticleFX
21:49:59: Particle Emitter Type 'Point' registered
21:49:59: Particle Emitter Type 'Box' registered
21:49:59: Particle Emitter Type 'Ellipsoid' registered
21:49:59: Particle Emitter Type 'Cylinder' registered
21:49:59: Particle Emitter Type 'Ring' registered
21:49:59: Particle Emitter Type 'HollowEllipsoid' registered
21:49:59: Particle Affector Type 'LinearForce' registered
21:49:59: Particle Affector Type 'ColourFader' registered
21:49:59: Particle Affector Type 'ColourFader2' registered
21:49:59: Particle Affector Type 'ColourImage' registered
21:49:59: Particle Affector Type 'ColourInterpolator' registered
21:49:59: Particle Affector Type 'Scaler' registered
21:49:59: Particle Affector Type 'Rotator' registered
21:49:59: Particle Affector Type 'DirectionRandomiser' registered
21:49:59: Particle Affector Type 'DeflectorPlane' registered
21:49:59: Plugin successfully installed
21:49:59: Loading library Plugin_BSPSceneManager_d
21:49:59: Installing plugin: BSP Scene Manager
21:49:59: Plugin successfully installed
21:49:59: Loading library Plugin_CgProgramManager_d
21:49:59: Installing plugin: Cg Program Manager
21:50:00: Plugin successfully installed
21:50:00: Loading library Plugin_OctreeSceneManager_d
21:50:00: Installing plugin: Octree & Terrain Scene Manager
21:50:00: Plugin successfully installed
21:50:00: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
21:50:00: D3D9 : RenderSystem Option: Anti aliasing = No
21:50:00: D3D9 : RenderSystem Option: Floating-point mode = Fastest
21:50:00: D3D9 : RenderSystem Option: Full Screen = No
21:50:00: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce 8800 GTS
21:50:00: D3D9 : RenderSystem Option: VSync = No
21:50:00: D3D9 : RenderSystem Option: Video Mode = 1054 x 768 @ 32-bit colour
21:50:00: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
21:50:00: CPU Identifier & Features
21:50:00: -------------------------
21:50:00: * CPU ID: AuthenticAMD: AMD Athlon(tm) 64 X2 Dual Core Processor 5200+
21:50:00: * SSE: yes
21:50:00: * SSE2: yes
21:50:00: * SSE3: yes
21:50:00: * MMX: yes
21:50:00: * MMXEXT: yes
21:50:00: * 3DNOW: yes
21:50:00: * 3DNOWEXT: yes
21:50:00: * CMOV: yes
21:50:00: * TSC: yes
21:50:00: * FPU: yes
21:50:00: * PRO: yes
21:50:00: * HT: no
21:50:00: -------------------------
21:50:00: D3D9 : Subsystem Initialising
21:50:00: D3D9RenderSystem::_createRenderWindow "Chavkill: The Beginning", 1054x768 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 gamma=false useNVPerfHUD=false vsync=false
21:50:00: D3D9 : Created D3D9 Rendering Window 'Chavkill: The Beginning' : 1054x768, 32bpp
21:50:00: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
21:50:00: Registering ResourceManager for type Texture
21:50:00: Registering ResourceManager for type GpuProgram
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT16_R
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT32_R
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT16_GR
21:50:00: D3D9: Vertex texture format supported - PF_FLOAT32_GR
21:50:00: RenderSystem capabilities
21:50:00: -------------------------
21:50:00: RenderSystem Name: Direct3D9 Rendering Subsystem
21:50:00: GPU Vendor: nvidia
21:50:00: Device Name: NVIDIA GeForce 8800 GTS
21:50:00: Driver Version: 6.14.11.8084
21:50:00: * Fixed function pipeline: yes
21:50:00: * Hardware generation of mipmaps: yes
21:50:00: * Texture blending: yes
21:50:00: * Anisotropic texture filtering: yes
21:50:00: * Dot product texture operation: yes
21:50:00: * Cube mapping: yes
21:50:00: * Hardware stencil buffer: yes
21:50:00: - Stencil depth: 8
21:50:00: - Two sided stencil support: yes
21:50:00: - Wrap stencil values: yes
21:50:00: * Hardware vertex / index buffers: yes
21:50:00: * Vertex programs: yes
21:50:00: * Fragment programs: yes
21:50:00: * Geometry programs: no
21:50:00: * 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:50:00: * Texture Compression: yes
21:50:00: - DXT: yes
21:50:00: - VTC: no
21:50:00: * Scissor Rectangle: yes
21:50:00: * Hardware Occlusion Query: yes
21:50:00: * User clip planes: yes
21:50:00: * VET_UBYTE4 vertex element type: yes
21:50:00: * Infinite far plane projection: yes
21:50:00: * Hardware render-to-texture: yes
21:50:00: * Floating point textures: yes
21:50:00: * Non-power-of-two textures: yes
21:50:00: * Volume textures: yes
21:50:00: * Multiple Render Targets: 4
21:50:00: - With different bit depths: yes
21:50:00: * Point Sprites: yes
21:50:00: * Extended point parameters: yes
21:50:00: * Max Point Size: 8192
21:50:00: * Vertex texture fetch: yes
21:50:00: - Max vertex textures: 4
21:50:00: - Vertex textures shared: no
21:50:00: * Render to Vertex Buffer : no
21:50:00: * DirectX per stage constants: yes
21:50:00: ***************************************
21:50:00: *** D3D9 : Subsystem Initialised OK ***
21:50:00: ***************************************
21:50:00: ResourceBackgroundQueue - threading enabled, starting own thread
21:50:00: ResourceBackgroundQueue - thread starting.
21:50:00: Particle Renderer Type 'billboard' registered
21:50:00: SceneManagerFactory for type 'BspSceneManager' registered.
21:50:00: Registering ResourceManager for type BspLevel
21:50:00: SceneManagerFactory for type 'OctreeSceneManager' registered.
21:50:00: SceneManagerFactory for type 'TerrainSceneManager' registered.
21:50:00: TerrainSceneManager: Registered a new PageSource for type Heightmap
21:50:00: [Hydrax] Hydrax created.
21:50:00: [Hydrax] HydraxDemo.hdx loaded.
21:50:00: [Hydrax] Creating module...
21:50:00: [Hydrax] Creating ProjectedGridVertex module.
21:50:00: [Hydrax] ProjectedGridVertex created.
21:50:00: [Hydrax] Module created.
21:50:00: [Hydrax] Initializating RTT Manager...
21:50:00: [Hydrax] RTT manager initialized.
21:50:00: [Hydrax] Registring device restored listener...
21:50:00: [Hydrax] Device restored listener registred.
21:50:00: [Hydrax] Creating materials...
21:50:00: [Hydrax] Creating water material...
21:50:00: Texture: Fresnel.bmp: Loading 1 faces(PF_L8,256x1x1) with 8 generated mipmaps from Image. Internal format is PF_L8,256x1x1.
21:50:00: Texture: Foam.png: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
21:50:00: [Hydrax] Water material created.
21:50:00: [Hydrax] Creating depth material...
21:50:00: Texture: Caustics_0.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_1.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_2.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_3.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_4.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_5.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_6.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_7.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_8.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_9.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_10.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_11.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_12.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_13.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_14.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_15.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_16.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_17.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_18.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_19.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_20.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_21.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_22.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_23.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_24.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_25.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_26.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_27.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_28.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_29.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_30.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: Texture: Caustics_31.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
21:50:00: [Hydrax] Depth material created.
21:50:00: [Hydrax] Creating underwater material...
21:50:00: Texture: UnderwaterDistortion.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
21:50:00: [Hydrax] Underwater material created.
21:50:00: [Hydrax] Materials created.
21:50:00: [Hydrax] Creating god rays...
21:50:00: [Hydrax] Perlin destroyed.
21:50:00: [Hydrax] God rays created.
21:50:00: [Hydrax] Creating water mesh...
21:50:00: [Hydrax] Water mesh created.
21:50:00: Parsing scripts for resource group Autodetect
21:50:00: Finished parsing scripts for resource group Autodetect
21:50:00: Parsing scripts for resource group General
21:50:00: Parsing script Island.material
21:50:00: Parsing script Palm.material
21:50:00: Parsing script SkyBox.material
21:50:00: Parsing script sample.fontdef
21:50:00: Finished parsing scripts for resource group General
21:50:00: Parsing scripts for resource group Hydrax
21:50:00: Finished parsing scripts for resource group Hydrax
21:50:00: Parsing scripts for resource group Internal
21:50:00: Finished parsing scripts for resource group Internal
21:50:00: Parsing scripts for resource group Mesh
21:50:00: Finished parsing scripts for resource group Mesh
21:50:00: Texture: TaharezLook.tga: Loading 1 faces(PF_A8R8G8B8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
21:50:01: Texture: _cegui_ogre_0: Loading 1 faces(PF_A8R8G8B8,128x128x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x128x1.
21:50:01: Texture: _cegui_ogre_1: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
21:50:01: Texture: _cegui_ogre_2: Loading 1 faces(PF_A8R8G8B8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.


Any help is greatly appreciated.

Cheers, Scratchyrice.

Edit: Also, theres a weird blue "strip" on the horizon, And ive noticed that with the demo the following lines in the log are present:
21:54:29: Creating viewport on target 'rtt/2383392', rendering from camera 'PlayerCam', relative dimensions L: 0 T: 0 W: 1 H: 1 ZOrder: 0
21:54:29: Creating viewport on target 'rtt/2410912', rendering from camera 'PlayerCam', relative dimensions L: 0 T: 0 W: 1 H: 1 ZOrder: 0
21:54:29: Creating viewport on target 'rtt/2403040', rendering from camera 'PlayerCam', relative dimensions L: 0 T: 0 W: 1 H: 1 ZOrder: 0

This indicates that some render cameras are not being created, which probably has something to do with the blue strip of blankness at the top, But as for the slowness, it may be my update method, But i dont know any other way (Other than creating a framelistener which is just awkward, and unnessecery for this test)

scratchyrice

13-01-2009 02:27:24

Ok, I cant even compile the demo for some reason (ive been using the precompiled).
I get the following error:
The procedutre entry point ?setMaterialName@SubEntity@Ogre@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z could not be located in the dynamic link libary OgreMain.dll.

Can someone shed some light on this? Thanks.

scratchyrice

13-01-2009 05:52:26

Ok, Ive got it all working, Apart from one small thing, It still renders at 7fps. Its not my system, as the demo renders at 50fps. Am i missing something? I am using my own ogre framework, Not the example framework, So is there something im missing from the example framework, that hydrax requires?

Cheers in advance,
Scratchy.

scratchyrice

13-01-2009 15:18:25

Heh, Is hydrax even alive anymore?

Fish

13-01-2009 16:49:49

Is that 9fps in debug mode or release mode?

scratchyrice

13-01-2009 18:27:20

Debug, I havent tried in release actualy lol.

It should not make a diffrence of 40fps should it?

scratchyrice

13-01-2009 19:05:43

Thanks dude, Release mode works like a dream. I never realised quite how much speed diffrence there is between release and debug, Ive always got good framerates in the past in debug until i started utilizing this pluggin. Thanks anyway.

Fish

14-01-2009 03:29:17

You're welcome. Debug in MSVC is really slow. I typically see the frame rate drop by about 70% to 90% in debug mode, and I'm not even using Hydrax.