NxOgre [BloodyMess1.5.5] Spacegaier Tutorial 2.

xekon

23-07-2009 01:22:09

I just completed the Spacegaier Tutorial 2: http://www.ogre3d.org/wiki/index.php/Bl ... Tutorial_2

I did a quick search first and as far as I can tell I am the first this has happened to?

Everything compiled, and the meshes are there... but no textures, everything is white...
I just copy and pasted the complete code: http://www.ogre3d.org/wiki/index.php/Bl ... l_2_Source
so I am not sure what I have done wrong...


should be:

spacegaier

23-07-2009 07:02:38

You probably don't have the texture files lying in your media folder (or not specified it in resources.cfg as a path Ogre should look for resources). Also check the Ogre log (or post it here).

xekon

23-07-2009 11:38:09

The textures for the cube are working... I copied these from the BloodyCake Example... I am not sure where to get the stuff for the Plane though....

Ive been experimenting with renaming files and trying things out, I am sure the main problem is my lack of experience with Ogre in general.

its this line right?
03:51:05: Can't assign material PlaneMat to SubEntity of PlaneEntity because this Material does not exist. Have you forgotten to define it in a .material script?

full ogre log:
03:50:56: Creating resource group General
03:50:56: Creating resource group Internal
03:50:56: Creating resource group Autodetect
03:50:56: SceneManagerFactory for type 'DefaultSceneManager' registered.
03:50:56: Registering ResourceManager for type Material
03:50:56: Registering ResourceManager for type Mesh
03:50:56: Registering ResourceManager for type Skeleton
03:50:56: MovableObjectFactory for type 'ParticleSystem' registered.
03:50:56: OverlayElementFactory for type Panel registered.
03:50:56: OverlayElementFactory for type BorderPanel registered.
03:50:56: OverlayElementFactory for type TextArea registered.
03:50:56: Registering ResourceManager for type Font
03:50:56: ArchiveFactory for archive type FileSystem registered.
03:50:56: ArchiveFactory for archive type Zip registered.
03:50:56: FreeImage version: 3.10.0
03:50:56: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
03:50:56: 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
03:50:56: DDS codec registering
03:50:56: Registering ResourceManager for type HighLevelGpuProgram
03:50:56: Registering ResourceManager for type Compositor
03:50:56: MovableObjectFactory for type 'Entity' registered.
03:50:56: MovableObjectFactory for type 'Light' registered.
03:50:56: MovableObjectFactory for type 'BillboardSet' registered.
03:50:56: MovableObjectFactory for type 'ManualObject' registered.
03:50:56: MovableObjectFactory for type 'BillboardChain' registered.
03:50:56: MovableObjectFactory for type 'RibbonTrail' registered.
03:50:56: Loading library .\RenderSystem_Direct3D9_d
03:50:56: Installing plugin: D3D9 RenderSystem
03:50:56: D3D9 : Direct3D9 Rendering Subsystem created.
03:50:56: D3D9: Driver Detection Starts
03:50:56: D3D9: Driver Detection Ends
03:50:56: Plugin successfully installed
03:50:56: Loading library .\RenderSystem_GL_d
03:50:56: Installing plugin: GL RenderSystem
03:50:56: OpenGL Rendering Subsystem created.
03:50:57: Plugin successfully installed
03:50:57: Loading library .\Plugin_CgProgramManager_d
03:50:57: Installing plugin: Cg Program Manager
03:50:57: Plugin successfully installed
03:50:57: Loading library .\Plugin_PCZSceneManager_d.dll
03:50:57: Installing plugin: Portal Connected Zone Scene Manager
03:50:57: PCZone Factory Type 'ZoneType_Default' registered
03:50:57: Plugin successfully installed
03:50:57: Loading library .\Plugin_OctreeSceneManager_d
03:50:57: Installing plugin: Octree & Terrain Scene Manager
03:50:57: Plugin successfully installed
03:50:57: *-*-* OGRE Initialising
03:50:57: *-*-* Version 1.6.2 (Shoggoth)
03:50:57: Creating resource group Bootstrap
03:50:57: Added resource location '../../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
03:50:57: Added resource location '../../media' of type 'FileSystem' to resource group 'General'
03:50:57: Added resource location '../../media/materials/programs' of type 'FileSystem' to resource group 'General'
03:50:57: Added resource location '../../media/materials/scripts' of type 'FileSystem' to resource group 'General'
03:50:57: Added resource location '../../media/materials/textures' of type 'FileSystem' to resource group 'General'
03:50:57: Added resource location '../../media/models' of type 'FileSystem' to resource group 'General'
03:50:57: OGRE EXCEPTION(6:FileNotFoundException): 'ogre.cfg' file not found! in ConfigFile::load at f:\codingextra\ogre\shoggoth_vc9\ogre\ogremain\src\ogreconfigfile.cpp (line 84)
03:51:02: D3D9 : RenderSystem Option: Full Screen = No
03:51:03: CPU Identifier & Features
03:51:03: -------------------------
03:51:03: * CPU ID: GenuineIntel: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
03:51:03: * SSE: yes
03:51:03: * SSE2: yes
03:51:03: * SSE3: yes
03:51:03: * MMX: yes
03:51:03: * MMXEXT: yes
03:51:03: * 3DNOW: no
03:51:03: * 3DNOWEXT: no
03:51:03: * CMOV: yes
03:51:03: * TSC: yes
03:51:03: * FPU: yes
03:51:03: * PRO: yes
03:51:03: * HT: no
03:51:03: -------------------------
03:51:03: D3D9 : Subsystem Initialising
03:51:03: D3D9RenderSystem::_createRenderWindow "OGRE Render Window", 800x600 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 gamma=false useNVPerfHUD=false vsync=false
03:51:03: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 800x600, 32bpp
03:51:03: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
03:51:04: Registering ResourceManager for type Texture
03:51:04: Registering ResourceManager for type GpuProgram
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT16_R
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT32_R
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT16_GR
03:51:04: D3D9: Vertex texture format supported - PF_FLOAT32_GR
03:51:04: RenderSystem capabilities
03:51:04: -------------------------
03:51:04: RenderSystem Name: Direct3D9 Rendering Subsystem
03:51:04: GPU Vendor: nvidia
03:51:04: Device Name: NVIDIA GeForce 9800 GTX+
03:51:04: Driver Version: 8.15.11.8618
03:51:04: * Fixed function pipeline: yes
03:51:04: * Hardware generation of mipmaps: yes
03:51:04: * Texture blending: yes
03:51:04: * Anisotropic texture filtering: yes
03:51:04: * Dot product texture operation: yes
03:51:04: * Cube mapping: yes
03:51:04: * Hardware stencil buffer: yes
03:51:04: - Stencil depth: 8
03:51:04: - Two sided stencil support: yes
03:51:04: - Wrap stencil values: yes
03:51:04: * Hardware vertex / index buffers: yes
03:51:04: * Vertex programs: yes
03:51:04: * Fragment programs: yes
03:51:04: * Geometry programs: no
03:51:04: * 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
03:51:04: * Texture Compression: yes
03:51:04: - DXT: yes
03:51:04: - VTC: no
03:51:04: * Scissor Rectangle: yes
03:51:04: * Hardware Occlusion Query: yes
03:51:04: * User clip planes: yes
03:51:04: * VET_UBYTE4 vertex element type: yes
03:51:04: * Infinite far plane projection: yes
03:51:04: * Hardware render-to-texture: yes
03:51:04: * Floating point textures: yes
03:51:04: * Non-power-of-two textures: yes
03:51:04: * Volume textures: yes
03:51:04: * Multiple Render Targets: 4
03:51:04: - With different bit depths: yes
03:51:04: * Point Sprites: yes
03:51:04: * Extended point parameters: yes
03:51:04: * Max Point Size: 8192
03:51:04: * Vertex texture fetch: yes
03:51:04: - Max vertex textures: 4
03:51:04: - Vertex textures shared: no
03:51:04: * Render to Vertex Buffer : no
03:51:04: * DirectX per stage constants: yes
03:51:04: ***************************************
03:51:04: *** D3D9 : Subsystem Initialised OK ***
03:51:04: ***************************************
03:51:04: ResourceBackgroundQueue - threading disabled
03:51:04: Particle Renderer Type 'billboard' registered
03:51:04: SceneManagerFactory for type 'PCZSceneManager' registered.
03:51:04: MovableObjectFactory for type 'PCZLight' registered.
03:51:04: SceneManagerFactory for type 'OctreeSceneManager' registered.
03:51:04: SceneManagerFactory for type 'TerrainSceneManager' registered.
03:51:04: Parsing scripts for resource group Autodetect
03:51:04: Finished parsing scripts for resource group Autodetect
03:51:04: Parsing scripts for resource group Bootstrap
03:51:04: Parsing script OgreCore.material
03:51:04: Parsing script OgreProfiler.material
03:51:04: Parsing script Ogre.fontdef
03:51:04: Parsing script OgreDebugPanel.overlay
03:51:04: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
03:51:04: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
03:51:04: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
03:51:04: Font BlueHighwayusing texture size 512x512
03:51:04: Info: Freetype returned null for character 127 in font BlueHighway
03:51:04: Info: Freetype returned null for character 128 in font BlueHighway
03:51:04: Info: Freetype returned null for character 129 in font BlueHighway
03:51:04: Info: Freetype returned null for character 130 in font BlueHighway
03:51:04: Info: Freetype returned null for character 131 in font BlueHighway
03:51:04: Info: Freetype returned null for character 132 in font BlueHighway
03:51:04: Info: Freetype returned null for character 133 in font BlueHighway
03:51:04: Info: Freetype returned null for character 134 in font BlueHighway
03:51:04: Info: Freetype returned null for character 135 in font BlueHighway
03:51:04: Info: Freetype returned null for character 136 in font BlueHighway
03:51:04: Info: Freetype returned null for character 137 in font BlueHighway
03:51:04: Info: Freetype returned null for character 138 in font BlueHighway
03:51:04: Info: Freetype returned null for character 139 in font BlueHighway
03:51:04: Info: Freetype returned null for character 140 in font BlueHighway
03:51:04: Info: Freetype returned null for character 141 in font BlueHighway
03:51:04: Info: Freetype returned null for character 142 in font BlueHighway
03:51:04: Info: Freetype returned null for character 143 in font BlueHighway
03:51:04: Info: Freetype returned null for character 144 in font BlueHighway
03:51:04: Info: Freetype returned null for character 145 in font BlueHighway
03:51:04: Info: Freetype returned null for character 146 in font BlueHighway
03:51:04: Info: Freetype returned null for character 147 in font BlueHighway
03:51:04: Info: Freetype returned null for character 148 in font BlueHighway
03:51:04: Info: Freetype returned null for character 149 in font BlueHighway
03:51:04: Info: Freetype returned null for character 150 in font BlueHighway
03:51:04: Info: Freetype returned null for character 151 in font BlueHighway
03:51:04: Info: Freetype returned null for character 152 in font BlueHighway
03:51:04: Info: Freetype returned null for character 153 in font BlueHighway
03:51:04: Info: Freetype returned null for character 154 in font BlueHighway
03:51:04: Info: Freetype returned null for character 155 in font BlueHighway
03:51:04: Info: Freetype returned null for character 156 in font BlueHighway
03:51:04: Info: Freetype returned null for character 157 in font BlueHighway
03:51:04: Info: Freetype returned null for character 158 in font BlueHighway
03:51:04: Info: Freetype returned null for character 159 in font BlueHighway
03:51:04: Info: Freetype returned null for character 160 in font BlueHighway
03:51:04: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
03:51:04: Texture: ogretext.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
03:51:04: Parsing script OgreLoadingPanel.overlay
03:51:04: Finished parsing scripts for resource group Bootstrap
03:51:04: Parsing scripts for resource group General
03:51:04: Parsing script 00ambient.material
03:51:04: Parsing script 00diffuse.material
03:51:04: Parsing script cc.material
03:51:04: Finished parsing scripts for resource group General
03:51:04: Parsing scripts for resource group Internal
03:51:04: Finished parsing scripts for resource group Internal
03:51:05: Mesh: Loading cube.1m.mesh.
03:51:05: Texture: cube.png: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
03:51:05: Can't assign material PlaneMat to SubEntity of PlaneEntity because this Material does not exist. Have you forgotten to define it in a .material script?
03:51:05: *** Initializing OIS ***
03:51:13: *-*-* OGRE Shutdown
03:51:13: Unregistering ResourceManager for type Compositor
03:51:13: Unregistering ResourceManager for type Font
03:51:13: Unregistering ResourceManager for type Skeleton
03:51:13: Unregistering ResourceManager for type Mesh
03:51:13: Unregistering ResourceManager for type HighLevelGpuProgram
03:51:13: Uninstalling plugin: Octree & Terrain Scene Manager
03:51:13: Plugin successfully uninstalled
03:51:13: Unloading library .\Plugin_OctreeSceneManager_d
03:51:13: Uninstalling plugin: Portal Connected Zone Scene Manager
03:51:13: Plugin successfully uninstalled
03:51:13: Unloading library .\Plugin_PCZSceneManager_d.dll
03:51:13: Uninstalling plugin: Cg Program Manager
03:51:13: Plugin successfully uninstalled
03:51:13: Unloading library .\Plugin_CgProgramManager_d
03:51:13: Uninstalling plugin: GL RenderSystem
03:51:13: *** Stopping Win32GL Subsystem ***
03:51:13: Plugin successfully uninstalled
03:51:13: Unloading library .\RenderSystem_GL_d
03:51:13: Uninstalling plugin: D3D9 RenderSystem
03:51:13: D3D9 : Shutting down cleanly.
03:51:13: Unregistering ResourceManager for type Texture
03:51:13: Unregistering ResourceManager for type GpuProgram
03:51:13: D3D9 : Direct3D9 Rendering Subsystem destroyed.
03:51:13: Plugin successfully uninstalled
03:51:13: Unloading library .\RenderSystem_Direct3D9_d
03:51:13: Unregistering ResourceManager for type Material

spacegaier

23-07-2009 12:32:08

Well, your Ogre log tells you everything:

First, ogre.cfg is missing (not relevant here, but still an error). Should be in the same folder as your application (.EXE).

There is no material named PlaneMat. Just create one or take another existing from the Ogre SDK. It had just a simple texture in it.

xekon

23-07-2009 19:39:28

sweet, took your advice and just used a texture from the OgreSdk and added an entry for it into the .material file.

It was the first time I used a .material file...

spacegaier

23-07-2009 19:59:50

Glad you made it :) .

xekon

24-07-2009 04:33:42

I have another quick question related to the materials, in this tutorial we use:
mCube = mRenderSystem->createBody(new NxOgre::Box(1, 1, 1), NxOgre::Real3(0, 40, 0), "cube.1m.mesh");

this is to use the cube.1m.mesh mesh for our cube meshes... now in the .material script that specifies which file to use for the texture we have:

material cube-from-nxogre.org : diffuse_template
{
set_texture_alias ambient_tex cube.png
set_texture_alias diffuse_tex cube.png
}


where does it get set to use cube-from-nxogre.org as the resource name in the .material file... I cannot find a refernece to this in any of the code.

spacegaier

24-07-2009 08:34:30

betajaen uses some quite complex materials (with inheritance?). AFAIK there are some program files or such that are used. Not sure though, don't have them hee right now.