FIX: Diffuse Texture DDS format fails on player
by Steve Acaster · in Torque Game Engine Advanced · 04/29/2009 (9:28 am) · 10 replies
DDS diffuse/base textures don't appear to work on the player. Player model shows up white, even if the player model is placed in-game as a static model. They work fine in jpg/png.
DDS diffuse textures work fine on other static models. Work fine on weapons. It's just the player models.
DDS diffuse textures work fine on other static models. Work fine on weapons. It's just the player models.
About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#2
new Material(pants1)
{
mapTo = "pants1";
basetex[0] = "pants1";
bumptex[0] = "pants1_nm";
pixelSpecular[0] = true;
specular[0] = "0.3 0.3 0.3 1.0";
specularPower[0] = 1.0;
};
As I say, if I use png it works and it's only with the player (as player or as a static).
EDIT: And there's no missing material warnings in the console. It just doesn't show.
04/29/2009 (10:14 am)
I've no custom code in 1.8.1 yet, just the bugfixes - unless I screwed one up.new Material(pants1)
{
mapTo = "pants1";
basetex[0] = "pants1";
bumptex[0] = "pants1_nm";
pixelSpecular[0] = true;
specular[0] = "0.3 0.3 0.3 1.0";
specularPower[0] = 1.0;
};
As I say, if I use png it works and it's only with the player (as player or as a static).
EDIT: And there's no missing material warnings in the console. It just doesn't show.
#3
04/29/2009 (12:03 pm)
Can you send me the model and textures?
#4
04/29/2009 (12:27 pm)
@Steve - I had this happen to me once also. I'm not sure how it was exported (I purchased it), but when I looked in the model I saw that the material name had the extension hardcoded on it. I had to change the mapto to include the extension.
#5
edit:
@ Jaimi, already tried that and it didn't work.
04/29/2009 (12:28 pm)
Emailed to your work/GG address.edit:
@ Jaimi, already tried that and it didn't work.
#6
Having to put the address in the basetex field sorted it out.
Even though it's all in the same directory, it just doesn't want to load up the DDS unless the path is given explicitly. the file extension doesn't matter.
Timothy Taylor's Pale Ale to celebrate and on to the next 171/181 porting issue
04/29/2009 (12:58 pm)
Cracked it! Variations on a theme of Jaimi's suggestion.Having to put the address in the basetex field sorted it out.
basetex[0] = "~/data/shapes/player/pants1";
Even though it's all in the same directory, it just doesn't want to load up the DDS unless the path is given explicitly. the file extension doesn't matter.
Timothy Taylor's Pale Ale to celebrate and on to the next 171/181 porting issue
#7
04/29/2009 (3:30 pm)
I've been trying to reproduce this without any luck. :(
#8
04/29/2009 (3:31 pm)
reproduce the problem or reproduce the fix?
#9
I have another folder in the player directory full of WIP images and older stuff, and also another materials.cs file. That's the one being read by the engine but the textures are in the directory above, hence not showing.
So the moral of this story is when there's a problem with your materials, do a better search for extra material files.
05/05/2009 (5:38 am)
And the answer to this conundrum is I messed up.I have another folder in the player directory full of WIP images and older stuff, and also another materials.cs file. That's the one being read by the engine but the textures are in the directory above, hence not showing.
So the moral of this story is when there's a problem with your materials, do a better search for extra material files.
#10
05/05/2009 (10:09 am)
I recently added a nifty bit of logging to the material system such that when it fails to find a texture it will say so, along with the full path that it tried (minus the various extensions). I bet that simple bit of reporting would've helped you catch this issue a while ago :).
Associate Alex Scarborough