Rendering Problems Help PLEASE

CodeChic

31-03-2008 00:35:01

Hi i'm having trouble working with this thing....Sooo this is great work but i'm having some problems with this addon.

I'm trying to understand this thing fully, soo i'm trying to run the first tutorial with a tree mesh which i made in 3ds max and exported using lexiexporter. I see the tree fine in lexiviewer but when i try using it with PagedGeo it compiles but then i get an error saying. :

"Runtime Error
This application has requested the runtime to terminate in an unusual way.
Please contact the applications support team for more information. "


My log file is below:

21:15:02: Creating resource group General
21:15:02: Creating resource group Internal
21:15:02: Creating resource group Autodetect
21:15:02: SceneManagerFactory for type 'DefaultSceneManager' registered.
21:15:02: Registering ResourceManager for type Material
21:15:02: Registering ResourceManager for type Mesh
21:15:02: Registering ResourceManager for type Skeleton
21:15:03: MovableObjectFactory for type 'ParticleSystem' registered.
21:15:03: OverlayElementFactory for type Panel registered.
21:15:03: OverlayElementFactory for type BorderPanel registered.
21:15:03: OverlayElementFactory for type TextArea registered.
21:15:03: Registering ResourceManager for type Font
21:15:03: ArchiveFactory for archive type FileSystem registered.
21:15:03: ArchiveFactory for archive type Zip registered.
21:15:03: FreeImage version: 3.10.0
21:15:03: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
21:15:03: 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:15:03: DDS codec registering
21:15:03: Registering ResourceManager for type HighLevelGpuProgram
21:15:03: Registering ResourceManager for type Compositor
21:15:03: MovableObjectFactory for type 'Entity' registered.
21:15:03: MovableObjectFactory for type 'Light' registered.
21:15:03: MovableObjectFactory for type 'BillboardSet' registered.
21:15:03: MovableObjectFactory for type 'ManualObject' registered.
21:15:03: MovableObjectFactory for type 'BillboardChain' registered.
21:15:03: MovableObjectFactory for type 'RibbonTrail' registered.
21:15:03: *-*-* OGRE Initialising
21:15:03: *-*-* Version 1.4.6 (Eihort)
21:15:03: Loading library Plugin_CgProgramManager_d
21:15:03: Installing plugin: Cg Program Manager
21:15:04: Plugin successfully installed
21:15:04: Loading library Plugin_OctreeSceneManager_d
21:15:04: Installing plugin: Octree & Terrain Scene Manager
21:15:04: Plugin successfully installed
21:15:04: Loading library RenderSystem_Direct3D9_d
21:15:05: Installing plugin: D3D9 RenderSystem
21:15:05: D3D9 : Direct3D9 Rendering Subsystem created.
21:15:05: D3D9: Driver Detection Starts
21:15:05: D3D9: Driver Detection Ends
21:15:05: Plugin successfully installed
21:15:05: Loading library RenderSystem_GL_d
21:15:06: Installing plugin: GL RenderSystem
21:15:06: OpenGL Rendering Subsystem created.
21:15:07: Plugin successfully installed
21:15:07: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
21:15:07: D3D9 : RenderSystem Option: Anti aliasing = None
21:15:07: D3D9 : RenderSystem Option: Floating-point mode = Fastest
21:15:07: D3D9 : RenderSystem Option: Full Screen = No
21:15:07: D3D9 : RenderSystem Option: Rendering Device = Mobile Intel(R) 945GM Express Chipset Family
21:15:07: D3D9 : RenderSystem Option: VSync = No
21:15:07: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
21:15:09: CPU Identifier & Features
21:15:09: -------------------------
21:15:09: * CPU ID: GenuineIntel: Intel(R) Core(TM) Duo CPU T2250 @ 1.73GHz
21:15:09: * SSE: yes
21:15:09: * SSE2: yes
21:15:09: * SSE3: yes
21:15:09: * MMX: yes
21:15:09: * MMXEXT: yes
21:15:09: * 3DNOW: no
21:15:09: * 3DNOWEXT: no
21:15:09: * CMOV: yes
21:15:09: * TSC: yes
21:15:09: * FPU: yes
21:15:09: * PRO: yes
21:15:09: * HT: no
21:15:09: -------------------------
21:15:09: D3D9 : Subsystem Initialising
21:15:09: D3D9RenderSystem::createRenderWindow "PagedGeometry Example 2 - TreeLoader2D", 800x600 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 useNVPerfHUD=false vsync=false
21:15:09: D3D9 : Created D3D9 Rendering Window 'PagedGeometry Example 2 - TreeLoader2D' : 800x600, 32bpp
21:15:09: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
21:15:09: Registering ResourceManager for type Texture
21:15:09: Registering ResourceManager for type GpuProgram
21:15:09: RenderSystem capabilities
21:15:09: -------------------------
21:15:09: * Hardware generation of mipmaps: no
21:15:09: * Texture blending: yes
21:15:09: * Anisotropic texture filtering: yes
21:15:09: * Dot product texture operation: yes
21:15:09: * Cube mapping: yes
21:15:09: * Hardware stencil buffer: yes
21:15:09: - Stencil depth: 8
21:15:09: - Two sided stencil support: yes
21:15:09: - Wrap stencil values: yes
21:15:09: * Hardware vertex / index buffers: yes
21:15:09: * Vertex programs: yes
21:15:09: - Max vertex program version: vs_3_0
21:15:09: * Fragment programs: yes
21:15:09: - Max fragment program version: ps_2_0
21:15:09: * Texture Compression: yes
21:15:09: - DXT: yes
21:15:09: - VTC: no
21:15:09: * Scissor Rectangle: yes
21:15:09: * Hardware Occlusion Query: no
21:15:09: * User clip planes: yes
21:15:09: * VET_UBYTE4 vertex element type: yes
21:15:09: * Infinite far plane projection: yes
21:15:09: * Hardware render-to-texture: yes
21:15:09: * Floating point textures: no
21:15:09: * Non-power-of-two textures: yes (limited)
21:15:09: * Volume textures: yes
21:15:09: * Multiple Render Targets: 1
21:15:09: * Point Sprites: yes
21:15:09: * Extended point parameters: yes
21:15:09: * Max Point Size: 256
21:15:09: * Vertex texture fetch: no
21:15:09: ***************************************
21:15:09: *** D3D9 : Subsystem Initialised OK ***
21:15:09: ***************************************
21:15:09: ResourceBackgroundQueue - threading disabled
21:15:09: Particle Renderer Type 'billboard' registered
21:15:09: SceneManagerFactory for type 'OctreeSceneManager' registered.
21:15:09: SceneManagerFactory for type 'TerrainSceneManager' registered.
21:15:09: TerrainSceneManager: Registered a new PageSource for type Heightmap
21:15:09: Creating viewport on target 'PagedGeometry Example 2 - TreeLoader2D', rendering from camera 'MainCamera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
21:15:09: Added resource location '../../media/trees' of type 'FileSystem' to resource group 'General'
21:15:09: Added resource location '../../media/terrains' of type 'FileSystem' to resource group 'General'
21:15:09: Added resource location '../../media/grass' of type 'FileSystem' to resource group 'General'
21:15:09: Parsing scripts for resource group Autodetect
21:15:09: Finished parsing scripts for resource group Autodetect
21:15:09: Parsing scripts for resource group General
21:15:09: Parsing script Shaders.program
21:15:10: Parsing script barkMat.material
21:15:10: Parsing script bbMat.material
21:15:10: Parsing script tree.material
21:15:10: Parsing script grass.material
21:15:10: Finished parsing scripts for resource group General
21:15:10: Parsing scripts for resource group Internal
21:15:10: Finished parsing scripts for resource group Internal
21:15:11: TerrainSceneManager: Activated PageSource Heightmap
21:15:12: Texture: terrain_texture.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 9 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
21:15:12: Texture: terrain_detail.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) with 8 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
21:15:13: Mesh: Loading Horsechestnut.mesh.
21:15:14: Texture: baesca0.png: Loading 1 faces(PF_SHORT_RGBA,64x64x1) with 6 generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
21:15:14: Texture: Horsechestnut-a01_001.png: Loading 1 faces(PF_SHORT_RGBA,256x256x1) with 8 generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
21:15:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called objSpaceLight does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogrenew\ogremain\src\ogregpuprogram.cpp (line 883)
21:15:14: OGRE EXCEPTION(7:InternalErrorException): Error configuring batched geometry transitions. If you're using materials with custom vertex shaders, they will need to implement fade transitions to be compatible with BatchPage. in BatchPage::_updateShaders() at c:\pagedgeometry\source\batchpage.cpp (line 261)




It seems that the problem are in the last two lines of the log file. But i really don't understand it. Moreover when i checked on the forum at

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=5835&highlight=gpuprogramparameters+findnamedconstantdefinition
i found this that the problem in the line before the last might be a bug. If that is really the case i would appreciate if someone could help me out and tell me how to solve that issue. I really need help...i've been at this for way too long.

Thank You in advance

JohnJ

02-04-2008 15:30:02

The important error here I think is:
Error configuring batched geometry transitions. If you're using materials with custom vertex shaders, they will need to implement fade transitions to be compatible with BatchPage.

Since PagedGeometry uses shaders to fade between detail levels, and shaders can't be mixed unfortunately, you either have to disable shaders on your trees, or integrate PagedGeometry's fade functions into your shaders. This isn't very well documented, but you basically have to copy-n-paste the fade shader code from BatchPage.cpp into your own shaders. I wish there was an easier, simpler way to fix this, but unfortunately there isn't any I know of.

Let me know if you have any more questions. I don't know if I explained this very well :). I can help you out with your shaders, etc. if you post them too.

Kenshido

09-09-2009 08:27:04

According to description:

Transitions can be disabled by omitting the transitionLength parameter, or setting it to 0.

If I set second parameters to zero:

trees->addDetailLevel<BatchPage>(100, 0);
trees->addDetailLevel<ImpostorPage>(300, 0);


There won't be any fade transitions at all, no transition shader created via PagedGeometry, and so I don't need to emplement fade transition in my shader also. But that exception still appears.

Kenshido

09-09-2009 09:00:55

Solved, besides fade parametres, all other should have the same names as they are set in BatchPage.cpp