# Any one CanHelp me

This topic is 4601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a question: how can i,get mutitexture info from .x file,i want to get specular tex filepath to blend.how to do it~? forgive my pool english : (

##### Share on other sites
You are going to have to set up your material information in your model editor so that it will export all of your textures (ie the diffuse texture, specular texture, ect...). Doing things like this with X can be tricky, so you are going to have to work around it.

The easiest approach would be to make a simple file separate from your X file, describing its material properties (since X's material info is somewhat lacking). Something like this maybe:

(X Material Description File)DIFFUSE_TEXTURE:  myDiffuseTexture.tgaSPECULAR_TEXTURE:  mySpecularTexture.tgaAMBIENT_COLOR: (255,255,255,255)CONSTANT_VALUE1:  15CONSTANT_VALUE2:  0.5023

I have done this in the past, and it worked pretty well for me.

##### Share on other sites
Another, very hacky way of doing this, would be to adopt a naming convention in your application. Many of the SDK samples do this.

Say you call your original diffuse texture "house.bmp". You could adopt the convention that the name of the specular map to go along with this texture would just append "_specular" to the end. So the file name would be "house_specular.bmp". You could have "house_bumpmap.bmp", and so on. So the texture name you read from your .x model would just have different tags appended to the end to signify different textures.

Granted, this is not very flexible at all but if you're just doing a small applicaiton for your own purposes, it will work just fine.

neneboricua

##### Share on other sites
Quote:
 Original post by circlesoftYou are going to have to set up your material information in your model editor so that it will export all of your textures (ie the diffuse texture, specular texture, ect...). Doing things like this with X can be tricky, so you are going to have to work around it.The easiest approach would be to make a simple file separate from your X file, describing its material properties (since X's material info is somewhat lacking). Something like this maybe:(X Material Description File)DIFFUSE_TEXTURE: myDiffuseTexture.tgaSPECULAR_TEXTURE: mySpecularTexture.tgaAMBIENT_COLOR: (255,255,255,255)CONSTANT_VALUE1: 15CONSTANT_VALUE2: 0.5023I have done this in the past, and it worked pretty well for me.

circlesoft : )
thanks ~,your means i must write a exporter to exporter the .x file and a (X Material Description File)?
i exporter the model from max by panda~

##### Share on other sites
Quote:
 Original post by neneboricua19Another, very hacky way of doing this, would be to adopt a naming convention in your application. Many of the SDK samples do this.Say you call your original diffuse texture "house.bmp". You could adopt the convention that the name of the specular map to go along with this texture would just append "_specular" to the end. So the file name would be "house_specular.bmp". You could have "house_bumpmap.bmp", and so on. So the texture name you read from your .x model would just have different tags appended to the end to signify different textures.Granted, this is not very flexible at all but if you're just doing a small applicaiton for your own purposes, it will work just fine.neneboricua

thanks neneboricua19 too,: )
very tricky way : p ,i will try this ,
because i don't want to write a plugin at present :p~
by the way, i'm a chinese beginner ,and have pool english .so don't laught at my
solecism~ : p.

##### Share on other sites
Quote:
 Original post by inkcomiccirclesoft : )thanks ~,your means i must write a exporter to exporter the .x file and a (X Material Description File)?i exporter the model from max by panda~

Actually, I just write it out by hand. When I was doing things like that, I didn't have a lot of art content, so when I wanted to use a model, I would just write up a new text file like that. It's a simple solution, but it worked (and it let me store a lot of extra data that Max didn't take care of).

Nene's way works quite well too, I recommend that if you only need to texture semantic + filename stuff.

##### Share on other sites
Quote:
Original post by circlesoft
Quote:
 Original post by inkcomiccirclesoft : )thanks ~,your means i must write a exporter to exporter the .x file and a (X Material Description File)?i exporter the model from max by panda~

Actually, I just write it out by hand. When I was doing things like that, I didn't have a lot of art content, so when I wanted to use a model, I would just write up a new text file like that. It's a simple solution, but it worked (and it let me store a lot of extra data that Max didn't take care of).

Nene's way works quite well too, I recommend that if you only need to texture semantic + filename stuff.

i want to bind item model to a animation model ,do you know how can i do from .x?

##### Share on other sites
Can i get binding info form .x mesh file?

• 10
• 16
• 14
• 18
• 15