Archived

This topic is now archived and is closed to further replies.

Corillian

X files (again hehe)

Recommended Posts

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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you can download the .X file exporters from microsoft

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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.



Share this post


Link to post
Share on other sites