X files (again hehe)

Started by
5 comments, last by Corillian 22 years, 8 months ago
Me and my artist are having trouble getting textures to work properly on the .x files he creates. He is exporting them in 3d studio max r3 with the .x exporter plugins that came with the DX8 SDK. The texture file itself is a .bmp with dimensions that are a power of 2. Is there a certain way he should texture the models? Should he use conv3ds instead of the x file exporters? For viewing our x files I am using the Mesh program in tutorials for D3D. Is this a good program to use to see if our meshes load correctly? Does anyone know of a good tried and true .x viewer? Thank you for your time, -Corillian
Advertisement
Are the textures not showing up at all?
Are they showing up not as they do in 3dsmax?

I''m using the .X file exporter from Microsoft for 3dsmax3.
ok if they arent showing up at all... I''ve had this problem.
if they are showing up screwed up then i''ve had this problem too.

when u export the .X from 3dsmax sometimes it doesnt save the texture into the file.
ok export the .X file in text format.
Open it up in wordpad and find the Material.
Then just add the texture filename.
Here is an example from a .X file:

Material {
0.639216;0.549020;0.192157;1.000000;;
0.000000;
0.900000;0.900000;0.900000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"MyTexture.bmp";
}

//
ok now if the textures are showing up all crazy.

add a UV map modifier in 3dsmax.
set it to the proper mapping mode (box, cylinder, etc).
collapse the stack to an editable mesh.
export.
Now the mesh will have correct texture coordinates.
The textures aren''t showing up at all. Just the diffuse color. When the x file is exported it saves the texture within the x file? For exporting a txt x file were you using the plugin or the conv3ds program?
quote:Original post by Corillian
He is exporting them in 3d studio max r3 with the .x exporter plugins that came with the DX8 SDK.
-Corillian


The DX8 SDK says these plugins are in the extras directory, but i can't seem to find them. Does anybody knows where they are ???
Plz help !!!

Greetz,
Sephiroth The Third

"Some that live deserve to die and some that are dead deserve to live."


Edited by - sephiroth03 on August 4, 2001 2:11:57 AM
Sephiroth
you can download the .X file exporters from microsoft

http://download.microsoft.com/download/winme/devp7/8.0/W9X2KMe/EN-US/D3DExport.exe

It doesn''t save the actual texture just the texture filename.

I use the Microsoft .X file exporter plugin for 3D Studio MAX.

It allows u to save as text, binary, text/binary.
Im not sure on the differences but I always use text.
When you export a model, it saves the texture co-ords, but you still have to load them in your program.
First declare:
LPDIRECT3DTEXTURE8 g_pMyTexture;

Then, where ever you load your .x files, add the line:
if( FAILED( D3DXCreateTextureFromFile( "your d3d device", "mytexture.bmp", &g_pMyTexture ) ) )
return E_FAIL;

Then where ever you render your model put the line:
"your d3d device"->SetTexture( 0, g_MyTexture );

Then, start up your program behold your beautiful textures.

btw, make sure you put the texture in your project directory.



This topic is closed to new replies.

Advertisement