Game Development Community

Textures not working (solved)

by Jeremiah Moss · in Artist Corner · 03/22/2005 (2:48 pm) · 5 replies

I'm having problems using textures in my models - I'm pretty sure I'm doing the right thing - using UV mapping, making the texture .PNG name the same as the material name (mlrsBody.png for the mlrsBody material), etc. It renders nicely in Blender, and I get this MLRS.log:

Torque Exporter 0.87
Using blender, version 236
**************************
Loaded Preferences.
Processing Scene...
Cleaning Preference Keys
Exporting...
> Shape C:\Torque\SDK\example\powerlords\Design\MLRS.dts
Writing script C:\Torque\SDK\example\powerlords\Design\MLRS.cs
>Collision Level
Mesh Object: ColCube
Type: Standard
>Detail (size 32)
Mesh Object: Body
Type: Standard
Mesh Object: Left Leg
Type: Standard
Mesh Object: Rear Leg
Type: Standard
Mesh Object: Right Leg
Type: Standard
Mesh Object: Swivel Mount
Type: Standard
Mesh Object: Left Gun
Type: Standard
Mesh Object: Right Gun
Type: Standard
Mesh Object: Left Gun
Type: Standard
Mesh Object: Right Gun
Type: Standard
>Materials added
mlrsBody
>Detail Levels
Detail-0
Collision-1
Smallest : Detail-0 (size : 32)
Writing out DTS...
Finished.

(It's a funny MechWarrior-like thing, hence the legs ;))

The funny thing is it appears the material is added! However, it does not appear on the model in the game :( Anybody have any ideas? I'm compiling Torque using the Torque Build Environment, I'm using the latest stable versions of Blender and Python (and I've experimented with older versions, to no avail), and I'm running it on Windows XP Pro SP2.

#1
03/22/2005 (4:42 pm)
OK, found out that the Windows version of Blender reverts to an internal version of Python when it can't find any. So, I set up my Python path - BUT I'm still getting errors.

PYTHONPATH:
C:\Program Files\Blender\.blender\scripts;C:\Python24;C:\Python24\Lib;C:\PYTHON23\DLLS;C:\PYTHON23\LIB\LIB-TK

ERROR:
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "", line 37, in ?
File "C:\Program Files\Blender\.blender\scripts\DTSPython\__init__.py", line 3
0, in ?
from Torque_Util import *
File "C:\Program Files\Blender\.blender\scripts\DTSPython\Torque_Util.py", lin
e 26, in ?
import struct, array, math, string
File "C:\Python24\Lib\string.py", line 83, in ?
import re as _re
File "C:\Python24\Lib\re.py", line 5, in ?
from sre import *
File "C:\Python24\Lib\sre.py", line 97, in ?
import sre_compile
File "C:\Python24\Lib\sre_compile.py", line 13, in ?
import _sre, sys
ImportError: No module named _sre
#2
03/22/2005 (5:03 pm)
OK, downgraded to earlier version of Python - to no avail. No errors again, but no textures either :(.
#3
03/22/2005 (5:38 pm)
Um,
Is mipmap turned off?
Is the png in the same folder as the dts when you place it into torque?
Does it show up in the show tool?
Is your model split up into seperate objects? I've only tried exporting a single contiguous mesh.

I'm still learning the exportation of textures and those are a few things I have run into. If you post the file I could see if it works for me in order to eliminate the possibilty of whether it is your setup or not.

Scott
#4
03/22/2005 (5:48 pm)
It was the mipmapping. Any idea why mipmapping doesn't work?
#5
03/23/2005 (1:18 am)
Cool. Glad it worked. All I know is that the example file that came with the script download didn't work and I clicked buttons on and off for a few days until I stumbled on it.

Scott