How do I import materials to a game ?

the gameengine doesn’t use materials, u must use uv mapped textures and/or vertex colors
the only things that materials are used for is collisions

I’ve heard that there is a python script or something to convert materials into a uv mapped texture that can be used on your models. Never used or looking much into it though.


With the brand new 2.36 RC version, you can use the the difuse colour
of a Material in the game engine, even if you don’t assign faces with the UV editor.

To get some shading, add lamp(s) press V then W and V again.

once your mesh is uv mapped, you can bake most procedural textures using either my script or jms’s [which I believe is included with blender, in the in the scripts menu of the image window]

however, it isn’t possible to keep all of the functionality of procedural materials in the game engine. Some notable things are global or object mapped textures, [which will not stay on the mesh in the same spot as it moves], and anything using displacement or modifications of the normal of a texture [bump maps and displacement maps]

I started modifying my script to uvmap a mesh [it will be better for lightmaps than organic meshes though], and will probably not have this completed or usuable for some time [finals start in a week]

This is actually all I needed. To just be able to put a solid color on a game model. I know I could do that by setting the face to “light” in the face/paint buttons and pressing the Vertex color button in the object button window, but I have heard that that method cause a slow down in the engine becase of the calculations that need to be done.

NEVERMIND. I found it.

Oto do you have a url for the “2.36RC” for release notes and features?
I looked on and could not find anything.

Be my guest! :slight_smile:

This is REALLY cool. On thing though. I suggest you install the 2.36RC in addition to your already installed 2.35 and not OVER 2.35 as I did. I broke at least on python script that way. But being able to use materials in the game engine is something that I have wanted ever since I started using blender. Now I can make a game and concentrate on the logic,physics and gameplay then go back and do the actual texturing. This is great for prototyping a game.

One thing I did notice is that you cannot do multimaterial meshes and it does not shade the meshes even in the Shift-Z or Alt-Z mode. You just get a solid color. But thats fine. Its probably makes the prototype run faster anyway.