Materials in game engine

I was wondering how some people (like plantPerson demo) put a material on an object in the game engine. When I put a material on an object it turns white when I press play.

This material thing worked for me once but I cant repeat it anymore - dont remember how i did it :-? .

You have to use UV textures (F key, then U to map) or vertex colors. Regular materials don´t show up on the game engine. The only material settings useful for the engine are the Dynamics (and the face (F) settings in F9).

Hi fireside,

You need to apply a texture to your model using the UV/Image window(Shift + F10). I usually have three windows showing, 3d view, uv/image, and buttons.

In the 3d view window, select the model you want to texture and press the “F” key. This activates the UV select mode. Either click on the individual faces you want to assign a texture to or press “A” to select all.

In the UV/Image window, click on the image menu button, click open, and select the image you want to assign to the selected faces. Now a texture is assigned and should show up when you press the “P” key, but it still needs mapping coordinates.

In the 3d view window, press the “U” key to select a mapping calculation option. I usually use “window” with the view in ortho. LSCM is very cool. Note the mapping coordinates in the UV/Image window. You can select the individual nodes of the mapping coordinates like vertices in the 3d view and move them around. It helps to view the model(3d view) in texture mode in order to see the changes in real time.

You can use this technique of texture placement for renderings as well by selecting the UV button in the material buttons.

Well actually, most of the time it isn’t a material but just a painting. If you select an mesh and type “v” you can paint with the paint buttons on the mesh. This will make a mesh solid colored, but remember this painting works on vertices, so how many vertices, the more detail you can create. :slight_smile:

Thanks everyone for your advice. It was the vertex paint that I was interested in, but it all helps.