Custom Made Object - Textures not loading

Started by GangstaRas, Aug 25, 2017, 01:02 PM

Previous topic - Next topic

GangstaRas

So I've made a custom object from scratch in Blender 2.78c, textures and all. DFF file and the TXD files were made and everything was set correctly in the xml metadata of the xml files. This the concept of the object from Blender:




Note that I'm using textures with some transparency as well if that affects things.



In-game however, I noticed two things happening.

  • My textures aren't loading, so you just get this big beige-ish grey object. This is it in-game.



  • 'Autogenerate' on the collision settings doesn't work either for this object. It's no real issue, I can make the necessary COL file but seeing that it doesn't work for this model is suspicious to me that something might be up Distance was too high, setting it under 300 solved this issue

Any help on what's going on? And how I can map my texture so that it associates with the DFF file properly?


vito1

1) wrong texturing

2) about no collision:
 2.1) too many polygon mesh
 2.2) draw distance in object's xml is above 300m

GangstaRas

Quote from: vito1 on Aug 25, 2017, 06:02 PM1) wrong texturing
Is there any specifics about how to texture the model for VC?

.

#3
The texture name that you assigned to the material in blender does not match the one that you assigned in the TXD file. Sometimes, 3D modeling software generate names for the added textures. Like 3DS Max, which does it in the form of Material ## (<- some digits). That's what the expected name will be and not the file name.

The other issue is that the texture name might be too long. I think less than 20 characters is the limit. I can't remember the exact number but it's small. Enable debugging in VCMP and see what the client reports in the console. That should give you (or us) some hints as to what's wrong.

Also, make sure that the texture resolution is a power of 2.
.

GangstaRas

Quote from: . on Aug 25, 2017, 06:08 PMThe texture name that you assigned to the material in blender does not match the one that you assigned in the TXD file. Sometimes, 3D modeling software generate names for the added textures. Like 3DS Max, which does it in the form of Material ## (<- some digits). That's what the expected name will be and not the file name.

This piece of your advice did the trick. Thank you, cuz I've been looking around for ages before I posted here.

Texture loaded flawlessly, but as you saw in the previous pic, I basically need to setup my double faces now for an open object like this. That's no biggie though. Thanks again  ;D

Sebastian

#5
Quote from: GangstaRas on Aug 25, 2017, 07:49 PMI basically need to setup my double faces now for an open object like this.

Try SetBackfaceCullingDisabled( true );.
It should do the trick.

I will add the function to the wiki asap. It's weird it is missing ...
wiki: SetBackfaceCullingDisabled