need help with texturing in game engine

i am new to blender. been using it for a few weeks and just started messing about with the game engine and the physics now but when i come to preview my game. my objects dont load there textures/materials. there just plane coloured blocks/shapes but when i render its fine:confused:

how do i apply textures to the game engine? i know it can be done because i saw a demonstration of in blender where this ball rolls down a slope and knocks down some crates. i had a look at the objects used but there is no sign of materials or textures. so it looks like its images. if it is this then how do import them onto the faces of the object? or the object its self. a step by step guide to this would be ace as for i am still learning.

thank you very much for reading this and if anybody knows the answer to my problem then i owe you a big kiss :smiley:

http://mediawiki.blender.org/index.php/Tutorials/Links#UV_Mapping

You Have To UV Map It To Use Textures Or In 2.41 in the filebar under the ā€œgameā€ menu click ā€œuse blender materialsā€

The basic idea is this:

  1. Youā€™ll need multiple windows, so start by pressing Ctrl+LeftArrow. (Undo that later with Ctrl+RightArrow)
  2. Select the object to be textured and press F.
  3. In the other window, press Shift+F10. In the menu of the new window, press Image and then Open.
  4. Browse through your computer and pick a picture.
  5. Tweak settings. Iā€™m no good at explaning that kind of stuff, so search the forums for ā€œUV mappingā€.
  6. The textures only appear in textured viewmode, which is activated with Alt+Z.

Iā€™ll pass on the kiss.

EDIT: Man, I gotta start using shorter posts so people donā€™t post while Iā€™m typing.

Did this work for you? My runtime still doesnā€™t show the textures.

Ah, a simple mistake can ruin a great thing. Change the view to ā€œtexturedā€. Youā€™ve got it set to solid.

http://www.savefile.com/files/3299554

hope this helps! it probably wonā€™t make much sense if you dont understand the basic concept of UV mapping. Basically, itā€™s taking a 3D object and slicing it in key places and unwrapping it like and orange. hope it helps!

ok guys thanks alot for that i did what you said and can see my image on the cube. however when i start the game Ā§ the cube is just black so what am i missing out? please help guys. you have been great so far :slight_smile:

PS the picture is all over the cube and is messed up. it was only a tester. but could this be the problem? hope this helps you in helping me :slight_smile:

I have the same problem where everything goes black in the runtime, apart from the floor (see image).

It sounds like you need to ad a lamp to your scene.

to do that:
put your mouse-poiner over the d3 window
press space
select add
select lamp or light or what is it called?
and pick one.
position it so the light shines on the side of the cube you see (if the light is behind the cube it wont help)

about the picture being messed up there are good tutorials on uv mapping that should help you sort that out. (it is unlikely to cause the cube being black)

Good luck
Smitje

cheers for that. the picture is messed up because it is a pic of a rendered cube with lines on lol. i still cannot get this working. here are some pics to show it. its just a quick go. just to get used to texturing s dont expect a work of art. its just a cube and a pic i found on my comp.

http://i53.photobucket.com/albums/g50/Ste_Sp8/screenieofbox.gif

ok this is the box and as u can see the texture is on

http://i53.photobucket.com/albums/g50/Ste_Sp8/screenieingamemode.gif

this one is when i load the game Ā§

please some one help me out, i got a feeling its something stupid that i havent done. lol i feel such a noob :frowning:

and just after i post thatā€¦ i figure it out lol. whoopsy forget to hit texface. incase people are still struggling with this you need to go onto the materials panel and hit texface. and thast it lol. one little thing

thanks alot for the help through this guys. i owe you 1 :slight_smile:

Humā€¦ im a bit concerned about your lights!
if you look at the left of the ā€œUV FACE SELECTā€ mode there is an option called ā€œfaceā€.
try to play around with it to see if the lights influences on them!

Also i read that the fact that the light would be on another LAYER will not light the others elements. So it might be that the floor and the lamp are on the same layer, but the walls no.

Or try to check the normals:
go into edit mode, select everything.
press "ctrol +n and chose ā€œrecalculate normales outisdeā€¦ā€

try to exit and press P.

if nothing changed, go back in edit mode, and select all, and ā€œcontrol SHIFT nā€ in will ā€œrecalculate normals insideā€

then try again. normal moe, press p.