[Solved] Rendering is working but there's no material

Problems building or running the engine, queries about how to use features etc.
Post Reply
jblecanard
Gnoblar
Posts: 21
Joined: Thu May 21, 2009 10:37 am

[Solved] Rendering is working but there's no material

Post by jblecanard »

Hello everyone

I'm currently learning to use Ogre and I juts got a little problem with it. I'm sure the solution is quite simple, but I can't find it by myself.

Edit : I'm using Ogre 1.6.2

So I'm using Ogre with SDL, as this tutorial explains, and it seems to work great. I loaded a mesh and placed a camera, and it's ok. Now, I want my mesh (in fact, a sphere) to be red. So I used a material script such as this one :

Code: Select all

material Material
{
	receive_shadows on
	technique
	{
		pass
		{
			ambient(0.5,0.0,0.0,1.0)
			diffuse(0.640000,0.016345,0.000000,1.000000)
			specular(0.500000,0.500000,0.500000,1.000000,12.500000)
			emissive(0.000000,0.000000,0.000000,1.000000)
		}
	}
}
There's only ambient light in my scene so the diffuse and specular components may be useless for the moment. But... My sphere is still completely white. My material seems to be correctly loaded :

Code: Select all

Parsing scripts for resource group General
Parsing script Sphere.material
Finished parsing scripts for resource group General
And I DO NOT have the following error message :

Code: Select all

Mesh: Loading Sphere.mesh.
Can't assign material Material to SubEntity of Ball because this Material does not exist. Have you forgotten to define it in a .material script?
I tried to add another light than the ambient one, but the problem is still the same.

Here is the source code of my Renderer class. All of my calls to Ogre are in this file :

Code: Select all

/*
 * Renderer.cpp
 *
 *  Created on: 27 avr. 2009
 *      Author: canard
 */

#include "Renderer.h"

#include <World.h>

#include <GL/glut.h>
#include <SDL.h>
#include <iostream>


Renderer::Renderer(World * _world) {
	m_world = _world;
}

Renderer::~Renderer() {
	delete m_world;
}

void Renderer::init(){
	createRoot();
	defineResources();
	setupRenderSystem();
	createRenderWindow();
	initializeResourceGroups();

	m_sceneManager = m_root->createSceneManager(Ogre::ST_GENERIC, Ogre::String("MainSceneManager"));
	m_sceneManager->setAmbientLight(Ogre::ColourValue(1,1,1));

	m_camera = m_sceneManager->createCamera(Ogre::String("Camera"));

	m_camera->setPosition(-3,-3,3);
	m_camera->lookAt(0,0,0);
	m_camera->setNearClipDistance(1.0f);
	m_camera->setFarClipDistance(5000.0f);
	m_camera->setAspectRatio((double)640/(double)480);


	Ogre::Viewport* mViewport = m_renderWindow->addViewport(m_camera);
	mViewport->setBackgroundColour(Ogre::ColourValue(0.0f,0.0f,0.0f));

	Ogre::Entity * sphere = m_sceneManager->createEntity("Ball","Sphere.mesh");

	Ogre::SceneNode * node1 = m_sceneManager->getRootSceneNode()->createChildSceneNode("BallNode");
	node1->attachObject(sphere);
	node1->setPosition(0,0,1);

	Ogre::Light * light = m_sceneManager->createLight( "Light1" );
    light->setType( Ogre::Light::LT_POINT );
    light->setPosition( Ogre::Vector3(-3, -3, 3) );
    light->setDiffuseColour( 1.0, 0.0, 0.0 );
    light->setSpecularColour( 1.0, 0.0, 0.0 );

    m_root->renderOneFrame();
}

void Renderer::render(){
	m_root->renderOneFrame();
	SDL_GL_SwapBuffers();
}

void Renderer::createRoot(){
	m_root = new Ogre::Root("plugins.cfg", "ogre.cfg", "ogre.log");
	m_root->restoreConfig();
	m_root->initialise(false);
}

void Renderer::defineResources(){
	Ogre::String secName, typeName, archName;
	Ogre::ConfigFile cf;
	cf.load("resources.cfg");

	Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
	while (seci.hasMoreElements()){
		secName = seci.peekNextKey();
		Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
		Ogre::ConfigFile::SettingsMultiMap::iterator i;
		for (i = settings->begin(); i != settings->end(); ++i){
			typeName = i->first;
			archName = i->second;
			Ogre::ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, secName);
		}
	}
}

void Renderer::setupRenderSystem(){
}

void Renderer::createRenderWindow(){
	Ogre::NameValuePairList misc;

#ifdef WINDOWS
	SDL_SysWMinfo wmInfo;
	SDL_VERSION(&wmInfo.version);
	SDL_GetWMInfo(&wmInfo);

	size_t winHandle = reinterpret_cast<size_t>(wmInfo.window);
	size_t winGlContext = reinterpret_cast<size_t>(wmInfo.hglrc);

	misc["externalWindowHandle"] = StringConverter::toString(winHandle);
	misc["externalGLContext"] = StringConverter::toString(winGlContext);
#else
	misc[Ogre::String("currentGLContext")] = Ogre::String("True");
#endif

	Ogre::String windowName("MainRenderWindow");
	m_renderWindow = m_root->createRenderWindow(windowName, 640, 480, false,&misc);
	m_renderWindow->setVisible(true);
}

void Renderer::initializeResourceGroups(){
    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
}
I may be forgotting the activation of something, but what ?

Thanks very much for any help.
Last edited by jblecanard on Thu May 21, 2009 10:47 pm, edited 3 times in total.

AYYAN
Greenskin
Posts: 117
Joined: Wed May 09, 2007 8:55 am

Re: Rendering is working but there's no material

Post by AYYAN »

Hi, your material script format is wrong. plz see here for material script.
http://www.ogre3d.org/docs/manual/manual_14.html#SEC23

jblecanard
Gnoblar
Posts: 21
Joined: Thu May 21, 2009 10:37 am

Re: Rendering is working but there's no material

Post by jblecanard »

The problem is that if I use the syntax of the manual, I've got the following error message :
Parsing script Sphere.material
Compiler error: invalid parameters in Sphere.material(8): ambient requires 3 or 4 colour arguments, or a "vertexcolour" directive
Finished parsing scripts for resource group General
My first material script whs written by the Blender plugin and I got this syntax error messages. So I assumed that it was a change of the 1.6.2 release. But I can't see any thing about that in the shoggoth changelog. So the "ambient 1.0 0.0 0.0 1.0" syntax produces error and the syntax "ambien(1.0,0.0,0.0,1.0)" does not on my computer. That's weird. WTH ? Do you think it can be a problem of blank characters format ? I'm coding on linux.

Edit : I checked and my Ogre version is really 1.6.2. Such a weird bug.

jblecanard
Gnoblar
Posts: 21
Joined: Thu May 21, 2009 10:37 am

Re: Rendering is working but there's no material

Post by jblecanard »

Okay, I figured out the problem

The correct syntax is :

Code: Select all

ambient 1,0 0,0 0,0 1,0
instead of

Code: Select all

ambient 1.0 0.0 0.0 1.0
As described in the manual. May the manual should be updated ? The blender plugin should be updated in order to generate valid .material scripts.

Anyway, problem solved.

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4293
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 127
Contact:

Re: Rendering is working but there's no material

Post by spacegaier »

jblecanard wrote:Okay, I figured out the problem

The correct syntax is :

Code: Select all

ambient 1,0 0,0 0,0 1,0
instead of

Code: Select all

ambient 1.0 0.0 0.0 1.0
As described in the manual. May the manual should be updated ? The blender plugin should be updated in order to generate valid .material scripts.

Anyway, problem solved.
Wrong, wrong, wrong! The correct syntax is:

Code: Select all

ambient 1.0 0.0 0.0 1.0
And the blender exporter DOES generate valid material scripts. Your problems must lie somewhere else.

Please post your material script again. There must a mistake somewhere...
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

jblecanard
Gnoblar
Posts: 21
Joined: Thu May 21, 2009 10:37 am

Re: [Solved] Rendering is working but there's no material

Post by jblecanard »

Okay... so here is the version which works fine :

Code: Select all

material Material
{
	technique
	{
		pass
		{
			ambient 0,5 0,0 0,0 1,0
			diffuse 0,640000 0,016345 0,000000 1,000000
			specular 0,500000 0,500000 0,500000 1,000000 12,500000 
			emissive 0,000000 0,000000 0,000000 1,000000
		}
	}
}
And the version which does not :

Code: Select all

material Material
{
	technique
	{
		pass
		{
			ambient 0.5 0.0 0.0 1.0
			diffuse 0.640000 0.016345 0.000000 1.000000
			specular 0.500000 0.500000 0.500000 1.000000 12.500000 
			emissive 0.000000 0.000000 0.000000 1.000000
		}
	}
}
This last one produces this messages :

Code: Select all

Parsing script Sphere.material
Compiler error: invalid parameters in Sphere.material(7): ambient requires 3 or 4 colour arguments, or a "vertexcolour" directive
Compiler error: invalid parameters in Sphere.material(8): diffuse requires 3 or 4 colour arguments, or a "vertexcolour" directive
Compiler error: invalid parameters in Sphere.material(9): specular must have first 3 arguments be a valid colour
Compiler error: invalid parameters in Sphere.material(10): emissive requires 3 or 4 colour arguments, or a "vertexcolour" directive
Sounds strange huh ?

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4293
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 127
Contact:

Re: Rendering is working but there's no material

Post by spacegaier »

And you still get the same error message as some posts ago?

EDIT: Your material (with the dots) works perfectly for me here on Windows!
Last edited by spacegaier on Thu May 21, 2009 1:10 pm, edited 2 times in total.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

jblecanard
Gnoblar
Posts: 21
Joined: Thu May 21, 2009 10:37 am

Re: Rendering is working but there's no material

Post by jblecanard »

If you're talking about the "Can't assign material" error messages, the answer is no. The script with commas works and creates a beautiful red sphere and the script with dots produces the sytax error messages (and no material on the sphere, obviously). Everything else is fine.

Since I'm not an Ogre expert, the complete log may give you some other clues. Here is the log, when I'm using the guilty comma version (which results in a good display) :

Code: Select all

Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
FreeImage version: 3.12.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
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,pfm
DDS codec registering
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
Loading library /usr/lib/OGRE/RenderSystem_GL
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/lib/OGRE/Plugin_BSPSceneManager
Installing plugin: BSP Scene Manager
Plugin successfully installed
Loading library /usr/lib/OGRE/Plugin_OctreeSceneManager
Installing plugin: Octree & Terrain Scene Manager
Plugin successfully installed
*-*-* OGRE Initialising
*-*-* Version 1.6.2 (Shoggoth)
CPU Identifier & Features
-------------------------
 *   CPU ID: GenuineIntel: Intel(R) Pentium(R) D  CPU 2.66GHz
 *      SSE: yes
 *     SSE2: yes
 *     SSE3: yes
 *      MMX: yes
 *   MMXEXT: yes
 *    3DNOW: no
 * 3DNOWEXT: no
 *     CMOV: yes
 *      TSC: yes
 *      FPU: yes
 *      PRO: yes
 *       HT: yes
-------------------------
******************************
*** Starting GLX Subsystem ***
******************************
Added resource location '/home/canard/workspace/FreeBalance/media' of type 'FileSystem' to resource group 'General'
Added resource location '/home/canard/workspace/FreeBalance/media/textures' of type 'FileSystem' to resource group 'General'
Added resource location '/home/canard/workspace/FreeBalance/media/models' of type 'FileSystem' to resource group 'General'
GLRenderSystem::_createRenderWindow "MainRenderWindow", 640x480 windowed  miscParams: currentGLContext=True 
GLXWindow::create used FBConfigID = 162
GL_VERSION = 2.1.2 NVIDIA 180.44
GL_VENDOR = NVIDIA Corporation
GL_RENDERER = GeForce 6600 GT/PCI/SSE2
GL_EXTENSIONS = GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_framebuffer_object GL_ARB_imaging GL_ARB_map_buffer_range GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_array_object GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_direct_state_access GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum 
Supported GLX extensions: GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync GLX_SGI_swap_control GLX_EXT_texture_from_pixmap GLX_ARB_create_context GLX_ARB_multisample GLX_NV_float_buffer GLX_ARB_fbconfig_float GLX_ARB_get_proc_address 
***************************
*** GL Renderer Started ***
***************************
Registering ResourceManager for type GpuProgram
GLSL support detected
GL: Using GL_EXT_framebuffer_object for rendering to textures (best)
FBO PF_UNKNOWN depth/stencil support: D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R5G6B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B5G6R5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B8G8R8A8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A2R10G10B10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A2B10G10R10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_X8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_X8B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_SHORT_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R3G3B2 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_SHORT_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
[GL] : Valid FBO targets PF_UNKNOWN PF_R5G6B5 PF_B5G6R5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_SHORT_RGBA PF_R3G3B2 PF_SHORT_RGB 
RenderSystem capabilities
-------------------------
RenderSystem Name: OpenGL Rendering Subsystem
GPU Vendor: nvidia
Device Name: GeForce 6600 GT/PCI/SSE2
Driver Version: 2.1.2.0
 * Fixed function pipeline: yes
 * Hardware generation of mipmaps: yes
 * Texture blending: yes
 * Anisotropic texture filtering: yes
 * Dot product texture operation: yes
 * Cube mapping: yes
 * Hardware stencil buffer: no
 * Hardware vertex / index buffers: yes
 * Vertex programs: yes
 * Fragment programs: yes
 * Geometry programs: no
 * Supported Shader Profiles: arbfp1 arbvp1 fp20 fp30 fp40 glsl vp30 vp40
 * Texture Compression: yes
   - DXT: yes
   - VTC: yes
 * Scissor Rectangle: yes
 * Hardware Occlusion Query: yes
 * User clip planes: yes
 * VET_UBYTE4 vertex element type: yes
 * Infinite far plane projection: yes
 * Hardware render-to-texture: yes
 * Floating point textures: yes
 * Non-power-of-two textures: yes
 * Volume textures: yes
 * Multiple Render Targets: 4
   - With different bit depths: yes
 * Point Sprites: yes
 * Extended point parameters: yes
 * Max Point Size: 63,375
 * Vertex texture fetch: yes
   - Max vertex textures: 4
   - Vertex textures shared: yes
 * Render to Vertex Buffer : no
 * GL 1.5 without VBO workaround: no
 * Frame Buffer objects: yes
 * Frame Buffer objects (ARB extension): no
 * Frame Buffer objects (ATI extension): no
 * PBuffer suppport: no
 * GL 1.5 without HW-occlusion workaround: no
Registering ResourceManager for type Texture
ResourceBackgroundQueue - threading disabled
Particle Renderer Type 'billboard' registered
SceneManagerFactory for type 'BspSceneManager' registered.
Registering ResourceManager for type BspLevel
SceneManagerFactory for type 'OctreeSceneManager' registered.
SceneManagerFactory for type 'TerrainSceneManager' registered.
Parsing scripts for resource group Autodetect
Finished parsing scripts for resource group Autodetect
Parsing scripts for resource group General
Parsing script Sphere.material
Finished parsing scripts for resource group General
Parsing scripts for resource group Internal
Finished parsing scripts for resource group Internal
Mesh: Loading Sphere.mesh.
Edit : I'm quite sure the problem is about the linux version. Maybe its a micmac in the linux compilation pipeline, but its strange beacause the dot and the comma are not special characters. I'm using unicode. Should it be a problem ?
Last edited by jblecanard on Thu May 21, 2009 1:17 pm, edited 1 time in total.

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4293
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 127
Contact:

Re: Rendering is working but there's no material

Post by spacegaier »

Okay, then I have to give up. Run out of ideas.

Your script works here and seems correct. However, if I replace the dots with commas, I get the same error as you:

Code: Select all

14:25:12: Compiler error: invalid parameters in blub.material(7): ambient requires 3 or 4 colour arguments, or a "vertexcolour" directive
Curious what the experts here will say...
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

jblecanard
Gnoblar
Posts: 21
Joined: Thu May 21, 2009 10:37 am

Re: Rendering is working but there's no material

Post by jblecanard »

That's what I though and thats why I posted in the developper section :). Let's wait and see.

jblecanard
Gnoblar
Posts: 21
Joined: Thu May 21, 2009 10:37 am

Re: Rendering is working but there's no material

Post by jblecanard »


Post Reply