Game Development Community

2 different texture using same name in different folder cause problem

by vincent kway · in Torque Game Engine Advanced · 02/14/2011 (8:28 pm) · 2 replies

Hi guys,

I'm facing a problem with 2 different textures using the same name in different folder. When I start my game, the texture of 2 objects is not map correctly.

The second object always map with the texture from other folder (because they are same name?).

I've solved this problem by changing different texture's name for different object.

Is there a way to use same name for different texture in different folder ? I think I saw some one fixed this problem but I can't find it now.

Please help. Thanks.

#1
02/15/2011 (12:20 am)
No each material name should be unique, think of it as you have a pool of materials and this model just happens to use these 5 of them. Bit like you'd keep a texture library on your pc for use when modelling.

I personally like to keep all materials in one folder so I can keep an eye on the names and easily re-use the same texture across models
#2
02/15/2011 (1:35 am)
Hi Andy, thanks for the reply.

example like:

male folder: body.png, head.png, leg.png

female folder: body.png, head.png, leg.png (same name with male folder's textures, but actually are different textures)

but inside the game, both male and female using the same texture, the female using male's texture ...

Is there a way to fix that ?