Blender mesh textures don't work

Blitz3D Forums/Blitz3D Beginners Area/Blender mesh textures don't work

Nate the Great(Posted 2008) [#1]
I was trying to load a rocket for a game, but the texture doesn't work!

I exported the rocket from blender as a .x and loaded it. When I do the entitytexture command, it makes the rocket a single color rather than give it the texture. In this case the rocket was black with a white tip so instead of giving me a black rocket with a white tip, it gave me a grey rocket.

Graphics3D 640,480,0,2

cam = CreateCamera()
MoveEntity cam,0,0,-5
light = CreateLight()
RotateEntity light,90,0,0

rocket = LoadMesh("rocket.x")
tex = LoadTexture("rocket_tex.png")

EntityTexture rocket,tex
While Not KeyDown(1)
TurnEntity rocket,1,2,1

UpdateWorld()
RenderWorld()
Flip
Wend


Has anyone else had this problem?
Is there something wrong with my programming or is it a bug?


mongia2(Posted 2008) [#2]
use b3d format

http://www.gandaldf.com/


ardee(Posted 2008) [#3]
Hi,

Did you give the mesh any UV co-ords?
Is the texture size to the power of 2?


Nate the Great(Posted 2008) [#4]
What are UV co-ords?

The texture is 512 * 512

@mongia2
How do I use the B3d exporter on that website?


mongia2(Posted 2008) [#5]
in website of gandalf

download a exporter
o in new version of blender is a full exporter for blitz3d


Mortiis(Posted 2008) [#6]
Exporting in B3D doesn't solve your problem. You have to UV map the mesh and texture it accordingly.

http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/UV_Map_Basics


Nate the Great(Posted 2008) [#7]
Thanks!!! :)

The UV mapping Tutorial works!
I have been trying to do this on my own for so long. Now I can actually make games with the blender models I have!