How to use the exported material?

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
TrackGuy
Halfling
Posts: 53
Joined: Sun Mar 19, 2006 5:33 pm
Location: Germany, Hannover

How to use the exported material?

Post by TrackGuy »

Hi,

I used the Sketchup Exporter to export the Pickup car delivered together with Sketchup. Export works fine.

But I do not see the textures.

This is my code:

Entity* PickUp;
SceneNode* PickUpNode;
PickUp = mSceneMgr->createEntity ( "PickUp", "PickUp.mesh" );
PickUp->setMaterialName ( "PickUp" );
PickUp->setCastShadows ( true );
PickUpNode = mSceneMgr->getRootSceneNode()->createChildSceneNode ( "PickUp" );
PickUpNode->attachObject ( PickUp );

The material file is named Pickup.material with different materials inside. But all (or a lot) are used for the Pickup ...

I know the problem is in this line:
PickUp->setMaterialName ( "PickUp" );

But I have no idea what to change ...
Found nothing inside Wiki and forum ... :-(
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

What does Ogre.log say? Is it complaining about missing textures? My guess would be they're not in any of your resource paths (resources.cfg).
TrackGuy
Halfling
Posts: 53
Joined: Sun Mar 19, 2006 5:33 pm
Location: Germany, Hannover

Post by TrackGuy »

Hello,

thanks for the fast reply.
I dont see any problems in the logfile.

The "pickup.material" is inside media/materials/scripts, which is in the resources.cfg

Code: Select all

[General]
FileSystem=./
FileSystem=../../Media/GUI/schemes
FileSystem=../../Media/GUI/imagesets
FileSystem=../../Media/GUI/fonts
FileSystem=../../Media/fonts
FileSystem=../../Media/materials/scripts
FileSystem=../../Media/materials/textures
FileSystem=../../Media/models
FileSystem=../../Media/overlays
FileSystem=../../Media/primitives

Zip=../../Media/packs/OgreCore.zip
Zip=../../Media/packs/cubemapsJS.zip

Code: Select all

14:40:03: Creating resource group General
14:40:03: Creating resource group Internal
14:40:03: Creating resource group Autodetect
14:40:03: Registering ResourceManager for type Material
14:40:03: Registering ResourceManager for type Mesh
14:40:03: Registering ResourceManager for type Skeleton
14:40:03: MovableObjectFactory for type 'ParticleSystem' registered.
14:40:03: Loading library OgrePlatform.dll
14:40:03: OverlayElementFactory for type Panel registered.
14:40:03: OverlayElementFactory for type BorderPanel registered.
14:40:03: OverlayElementFactory for type TextArea registered.
14:40:03: Registering ResourceManager for type Font
14:40:03: ArchiveFactory for archive type FileSystem registered.
14:40:03: ArchiveFactory for archive type Zip registered.
14:40:03: DevIL version: Developer's Image Library (DevIL) 1.6.7 Oct 28 2005
14:40:03: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw 
14:40:03: Registering ResourceManager for type HighLevelGpuProgram
14:40:03: Registering ResourceManager for type Compositor
14:40:03: MovableObjectFactory for type 'Entity' registered.
14:40:03: MovableObjectFactory for type 'Light' registered.
14:40:03: MovableObjectFactory for type 'BillboardSet' registered.
14:40:03: MovableObjectFactory for type 'ManualObject' registered.
14:40:03: MovableObjectFactory for type 'BillboardChain' registered.
14:40:03: MovableObjectFactory for type 'RibbonTrail' registered.
14:40:03: Loading library .\RenderSystem_Direct3D9
14:40:03: D3D9 : Direct3D9 Rendering Subsystem created.
14:40:03: D3D9: Driver Detection Starts
14:40:03: D3D9: Driver Detection Ends
14:40:03: Loading library .\RenderSystem_GL
14:40:04: OpenGL Rendering Subsystem created.
14:40:04: *-*-* OGRE Initialising
14:40:04: *-*-* Version 1.2.0 (Dagon)
14:40:04: Added resource location './' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/GUI/schemes' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/GUI/imagesets' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/GUI/fonts' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/fonts' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/materials/scripts' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/materials/textures' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/models' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/overlays' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/primitives' of type 'FileSystem' to resource group 'General'
14:40:04: Added resource location '../../Media/packs/OgreCore.zip' of type 'Zip' to resource group 'General'
14:40:04: Added resource location '../../Media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
14:40:04: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
14:40:04: D3D9 : RenderSystem Option: Anti aliasing = None
14:40:04: D3D9 : RenderSystem Option: Floating-point mode = Fastest
14:40:04: D3D9 : RenderSystem Option: Full Screen = No
14:40:04: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce4 Ti 4200 with AGP8X
14:40:04: D3D9 : RenderSystem Option: VSync = No
14:40:04: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
14:40:06: D3D9 : Subsystem Initialising
14:40:06: D3D9RenderSystem::createRenderWindow "OGRE Render Window", 800x600 windowed  miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 useNVPerfHUD=false vsync=false 
14:40:06: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 800x600, 32bpp
14:40:06: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
14:40:06: Registering ResourceManager for type Texture
14:40:06: Registering ResourceManager for type GpuProgram
14:40:06: RenderSystem capabilities
14:40:06: -------------------------
14:40:06:  * Hardware generation of mipmaps: yes
14:40:06:  * Texture blending: yes
14:40:06:  * Anisotropic texture filtering: yes
14:40:06:  * Dot product texture operation: yes
14:40:06:  * Cube mapping: yes
14:40:06:  * Hardware stencil buffer: yes
14:40:06:    - Stencil depth: 8
14:40:06:    - Two sided stencil support: no
14:40:06:    - Wrap stencil values: yes
14:40:06:  * Hardware vertex / index buffers: yes
14:40:06:  * Vertex programs: yes
14:40:06:    - Max vertex program version: vs_1_1
14:40:06:  * Fragment programs: yes
14:40:06:    - Max fragment program version: ps_1_3
14:40:06:  * Texture Compression: yes
14:40:06:    - DXT: yes
14:40:06:    - VTC: no
14:40:06:  * Scissor Rectangle: yes
14:40:06:  * Hardware Occlusion Query: yes
14:40:06:  * User clip planes: no
14:40:06:  * VET_UBYTE4 vertex element type: no
14:40:06:  * Infinite far plane projection: no
14:40:06:  * Hardware render-to-texture: yes
14:40:06:  * Floating point textures: no
14:40:06:  * Non-power-of-two textures: yes
14:40:06:  * Volume textures: yes
14:40:06:  * Multiple Render Targets: 1
14:40:06:  * Point Sprites: yes
14:40:06:  * Extended point parameters: yes
14:40:06:  * Max Point Size: 8192
14:40:06: ***************************************
14:40:06: *** D3D9 : Subsystem Initialised OK ***
14:40:06: ***************************************
14:40:06: ResourceBackgroundQueue - threading disabled
14:40:06: Particle Renderer Type 'billboard' registered
14:40:06: Creating viewport on target 'OGRE Render Window', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
14:40:06: Viewport for camera 'PlayerCam', actual dimensions L: 0 T: 0 W: 800 H: 600
14:40:06: Parsing scripts for resource group Autodetect
14:40:06: Finished parsing scripts for resource group Autodetect
14:40:06: Parsing scripts for resource group General
14:40:06: Parsing script Example.material
14:40:06: Parsing script PickUp.material
14:40:06: Parsing script zombie.material
14:40:06: Parsing script OgreCore.material
14:40:06: Parsing script OgreProfiler.material
14:40:06: Parsing script sample.fontdef
14:40:06: Bad attribute line: glyph	 	0.152344	0.125	0.160156	0.1875 in font Ogre
14:40:06: Parsing script Ogre.fontdef
14:40:06: Parsing script OgreDebugPanel.overlay
14:40:06: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8B8G8R8,256x128x1) with  hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
14:40:06: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8B8G8R8,256x256x1) with  hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
14:40:06: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8B8G8R8,32x32x1) with  hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
14:40:06: Font TrebuchetMSBoldusing texture size 512x512
14:40:06: Info: Freetype returned null for character 160 in font TrebuchetMSBold
14:40:06: Texture: TrebuchetMSBoldTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
14:40:06: Texture: ogretext.png: Loading 1 faces(PF_A8B8G8R8,256x128x1) with  hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
14:40:06: Parsing script OgreLoadingPanel.overlay
14:40:06: Finished parsing scripts for resource group General
14:40:06: Parsing scripts for resource group Internal
14:40:06: Finished parsing scripts for resource group Internal
14:40:06: Texture: cloudy_noon_fr.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:40:06: Texture: cloudy_noon_bk.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:40:06: Texture: cloudy_noon_lf.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:40:06: Texture: cloudy_noon_rt.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:40:06: Texture: cloudy_noon_up.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:40:06: Texture: cloudy_noon_dn.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:40:06: Texture: RustySteel.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
14:40:06: Mesh: Loading PickUp.mesh.
14:40:06: Mesh: Loading box.mesh.
14:40:06: Texture: NoLimit.jpg: Loading 1 faces(PF_B8G8R8,512x512x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
14:40:06: Win32Input8: DirectInput Activation Starts
14:40:07: Win32Input8: Establishing keyboard input.
14:40:07: Win32Input8: Keyboard input established.
14:40:07: Win32Input8: Initializing mouse input in immediate mode.
14:40:07: Win32Input8: Mouse input in immediate mode initialized.
14:40:07: Win32Input8: DirectInput OK.
14:40:07: Win32Input8: DirectInput Activation Starts
14:40:07: Win32Input8: Establishing keyboard input.
14:40:07: Win32Input8: Keyboard input established.
14:40:07: Win32Input8: Initializing mouse input in immediate mode.
14:40:07: Win32Input8: Mouse input in immediate mode initialized.
14:40:07: Win32Input8: DirectInput OK.
14:40:07:    Newton Frame Listener... m_elapsed: 0  m_update:0.0166667
14:40:07:    Newton updates this loop: 0
14:40:07: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with  hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
14:40:07:    Newton Frame Listener... m_elapsed: 0.068  m_update:0.0166667
TrackGuy
Halfling
Posts: 53
Joined: Sun Mar 19, 2006 5:33 pm
Location: Germany, Hannover

Post by TrackGuy »

Hi,

I cant figure it out :-(
More ideas to this?

regards
User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm
x 1

Post by HexiDave »

Can you post "pickup.material" ? Make sure the material inside is named Pickup and that all your braces are closed.
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Post by Mikachu »

Why do you manually set material? If you don't need anything else than the default material of the mesh, then you don't have to write this line :

Code: Select all

 PickUp->setMaterialName ( "PickUp" ); 
[/quote]
OgreProcedural - Procedural Geometry for Ogre3D
TrackGuy
Halfling
Posts: 53
Joined: Sun Mar 19, 2006 5:33 pm
Location: Germany, Hannover

Post by TrackGuy »

It makes no difference if I set the material with

PickUp->setMaterialName ( "PickUp" );

or not. The Pickup Mesh will stay in grey.

The Pickup.material is right out of the Sketchup Exporter. Not touched by me.

Code: Select all

material jean_blue
{
   technique
   {
      pass
      {
         diffuse 0.141176470588235 0.184313725490196 0.258823529411765 1.0
      }
   }
}
material <Beige>1
{
   technique
   {
      pass
      {
         diffuse 0.827450980392157 0.741176470588235 0.564705882352941 1.0
      }
   }
}
material GrassGreen
{
   technique
   {
      pass
      {
         diffuse 0.243137254901961 0.356862745098039 0.0196078431372549 1.0
      }
   }
}
material Olive
{
   technique
   {
      pass
      {
         diffuse 0.501960784313725 0.501960784313725 0.0 1.0
      }
   }
}
material Chipboard
{
   technique
   {
      pass
      {
         diffuse 0.662745098039216 0.6 0.443137254901961 1.0
      }
   }
}
material <Gold>1
{
   technique
   {
      pass
      {
         diffuse 0.690196078431373 0.619607843137255 0.0980392156862745 1.0
      }
   }
}
material Dark_Brown
{
   technique
   {
      pass
      {
         diffuse 0.305882352941176 0.247058823529412 0.168627450980392 1.0
      }
   }
}
material <Dark_Brown>1
{
   technique
   {
      pass
      {
         diffuse 0.203921568627451 0.168627450980392 0.0745098039215686 1.0
      }
   }
}
material Dark_Olive
{
   technique
   {
      pass
      {
         diffuse 0.384313725490196 0.392156862745098 0.266666666666667 1.0
      }
   }
}
material YellowGreen
{
   technique
   {
      pass
      {
         diffuse 0.603921568627451 0.803921568627451 0.196078431372549 1.0
      }
   }
}
material <Gray_Glass>1
{
   technique
   {
      pass
      {
         scene_blend alpha_blend
         depth_check on
         depth_write off
         diffuse 0.156862745098039 0.156862745098039 0.156862745098039 0.79
      }
   }
}
material Gray
{
   technique
   {
      pass
      {
         diffuse 0.501960784313725 0.501960784313725 0.501960784313725 1.0
      }
   }
}
material Charcoal
{
   technique
   {
      pass
      {
         diffuse 0.137254901960784 0.137254901960784 0.137254901960784 1.0
      }
   }
}
material DarkGray
{
   technique
   {
      pass
      {
         diffuse 0.317647058823529 0.317647058823529 0.317647058823529 1.0
      }
   }
}
material Black
{
   technique
   {
      pass
      {
         diffuse 0.0 0.0 0.0 1.0
      }
   }
}
material Maroon
{
   technique
   {
      pass
      {
         diffuse 0.501960784313725 0.0 0.0 1.0
      }
   }
}
material WhiteSmoke
{
   technique
   {
      pass
      {
         diffuse 0.96078431372549 0.96078431372549 0.96078431372549 1.0
      }
   }
}
material Gray_Glass
{
   technique
   {
      pass
      {
         scene_blend alpha_blend
         depth_check on
         depth_write off
         diffuse 0.156862745098039 0.156862745098039 0.156862745098039 0.8
      }
   }
}
material Brake-Light_Red
{
   technique
   {
      pass
      {
         diffuse 0.709803921568627 0.149019607843137 0.149019607843137 1.0
      }
   }
}
material Backfaces
{
   technique
   {
      pass
      {
         diffuse 1.0 0.188235294117647 0.784313725490196 1.0
      }
   }
}
material SketchupDefault
{
   technique
   {
      pass
      {
         diffuse 1.0 1.0 1.0
      }
   }
}
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

Now that explains why you have no textures. There are no texture_units at all in your materials! ;)

Maybe the Sketchup exporter doesn't implement this yet, I don't know.
TrackGuy
Halfling
Posts: 53
Joined: Sun Mar 19, 2006 5:33 pm
Location: Germany, Hannover

Post by TrackGuy »

Hi,

thank you. But when there is no texture information, maybe the Sketchup Pickup Model only uses some colors. But my pickup.mesh is grey.
In the pickup.mesh.xml file there are references to the names of the pickup.material file.

Codefragment from pickup.mesh.xml

Code: Select all

<mesh>
   <submeshes>
      <submesh material = "Charcoal" usesharedvertices="false" use32bitindexes="false">
         <faces count="344">
            <face v1="0" v2="1" v3="2" />
            <face v1="1" v2="0" v3="3" />
            <face v1="3" v2="0" v3="4" />
            <face v1="3" v2="4" v3="5" />
Is the use of colors different from using textures in orge?
User avatar
Jerky
Orc Shaman
Posts: 791
Joined: Wed Mar 02, 2005 4:13 am
Location: Springville, Utah
Contact:

Post by Jerky »

What is happening is that Sketchup uses its internal texturing, using color values to generate the texture on that. There is no actual texture like a 3d engine (like Ogre) would need. You either need to make a texture and export it, or export it to blender and then add a texture map to it. The paint tool in Sketchup will allow you to color things, but that is not what happens in a 3d engine, at least as far as looking for a texture.

What you want to do it something on your own. Kojack's exporter works exactly how it should (thanks for that btw Kojack, it rocks!). For example, if I was to sketch, say, a shrine, it would look like this:
Image
When I add textures (in sketchup), it would come out like this:
Image

What happens when it exports is that it creates as many submeshes as are textures of my model. In this case, 4. I could use then use the Blender Mesh importer and import the meshes back into blender if I want to do real UV mapping. Sketchup is capable of doing this to an extent, but not the same as a modeling tool could.

What your model lacks are actual texture maps. That means there are no actual jpg (or gif, png, tga, etc) images that your model is looking for. Ogre is expecting something like that. If you do it that way, you exported material would look like:

Code: Select all

material Concrete-rough
{
   technique
   {
      pass
      {
         24.0, 24.0
         diffuse 1 1 1 1.0
         texture_unit
         {
            texture Concrete-rough.jpg
         }
      }
   }
}
material Spanish_Tile
{
   technique
   {
      pass
      {
         28.0, 17.0
         diffuse 1 1 1 1.0
         texture_unit
         {
            texture spanishtile2-lo.jpg
         }
      }
   }
}
material <Spanish_Tile>1
{
   technique
   {
      pass
      {
         28.0, 17.828125
         diffuse 1 1 1 1.0
         texture_unit
         {
            texture spanishtile2-lo.jpg
         }
      }
   }
}
material Carpet-DiamondGold
{
   technique
   {
      pass
      {
         12.0, 15.6
         diffuse 1 1 1 1.0
         texture_unit
         {
            texture Carpet-DiamondGold.jpg
         }
      }
   }
}
material Paver_Hex
{
   technique
   {
      pass
      {
         36.0, 20.671875
         diffuse 1 1 1 1.0
         texture_unit
         {
            texture CeramicPaver-Hex01.jpg
         }
      }
   }
}
material Smooth_Face_Concrete_Block
{
   technique
   {
      pass
      {
         48.0, 32.0
         diffuse 1 1 1 1.0
         texture_unit
         {
            texture Smooth Face Concrete Block.jpg
         }
      }
   }
}
material Backfaces
{
   technique
   {
      pass
      {
         diffuse 1.0 0.188235294117647 0.784313725490196 1.0
      }
   }
}
material SketchupDefault
{
   technique
   {
      pass
      {
         diffuse 1.0 1.0 1.0
      }
   }
}
You will notice that there is a lot of excess (waste) in the material. The materials "SketchupDefault" and "Backfaces" are not used in Ogre, so they are useless. Those are things sketchup uses, but I do not need for Ogre. What you want to do is open your paintbucket tool and click on the "In Model" tab and remove all the materials you dont need in Ogre, and then export. The exporter will then export the model, material and copy the texture maps to your export directory. Only when you have all that do you then get to see it correctly inside Ogre.

For example, this simple shrine, exported as you see it will look like this:
Image

You will want to remember that backfaces (2-sided polygons) are not supported with this, so plan accordingly. It helps if you have some basic knowledge of texturing and UV mapping to do it correctly, so you can get the result you want.

For your truck, try this. Create a jpg in microsoft Paint where you dump red in. Make it low res (like 128x128px) and save it (as red.jpg) then put it in sketchup's materials directory (C:\Program Files\Google\Google SketchUp\Materials by default). Then, redo the textures on the truck to use your new map. Use the Paint Bucket tool in Sketchup to dump this new texture onto all the faces on the truck that you want red. Then, when you export, make sure that texture is the only one you leave in the list, and you will be good to go. You will notice that your exported directory will now have red.jpg and your material will contain some lines that say:

Code: Select all

         texture_unit 
         { 
            texture red.jpg 
         }
If you do all that, you will have a red truck in Ogre.

Hope this helps you grasp what you are missing.
Erik Briggs (Jerky)
My Blog
Project Wish
Image
TrackGuy
Halfling
Posts: 53
Joined: Sun Mar 19, 2006 5:33 pm
Location: Germany, Hannover

Post by TrackGuy »

Hi Jerky,

thanks a lot for this detailed information. I think your explanation is worth to make it into the wiki.

Until now I thought that it is possible to apply a colour value to an node without using a texture. I will try your solution in a few minutes but I am sure that it will work :wink:
Jerky wrote:What is happening is that Sketchup uses its internal texturing, using color values to generate the texture on that. There is no actual texture like a 3d engine (like Ogre) would need. You either need to make a texture and export it, or export it to blender and then add a texture map to it. The paint tool in Sketchup will allow you to color things, but that is not what happens in a 3d engine, at least as far as looking for a texture.

...

Hope this helps you grasp what you are missing.
Thank you very much. It made many things clear to me.

regards
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

TrackGuy wrote:Until now I thought that it is possible to apply a colour value to an node without using a texture.
It is (to a material, not a node), no idea why it doesn't just work in your case. :?
TrackGuy
Halfling
Posts: 53
Joined: Sun Mar 19, 2006 5:33 pm
Location: Germany, Hannover

Post by TrackGuy »

Hi DWORD,
DWORD wrote:
TrackGuy wrote:Until now I thought that it is possible to apply a colour value to an node without using a texture.
It is (to a material, not a node), no idea why it doesn't just work in your case. :?
Now I am a little bit confused again ....
Is it possible for you to give Sketchup a try and export the pickup model from the components and export it to ogre to get an idea what maybe goes wrong?

I could also send you the files which the OgreXMLExporter has produced.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Post by Kojack »

Here's the pickup truck exported and loaded in ogre:
Image

Hmm, there's a lot of materials in there which aren't even used by the pickup. I checked in sketchup and even a blank scene has 10 materials (besides the default material) in use. Strange. It must be the newer version of sketchup, the "In Model" material panel should only show the materials in the current model, which is how the previous beta version always worked. I'll do some tests...


You shouldn't do setMaterialName unless you have a single material you want to apply to all of the model. It will cover the tires, windows, everything. The pickup uses 7 different materials, but doing setMaterialName to the entity will replace all 7 with a single material.
Post Reply