Sign in to follow this  
Shamino

Milkshape 3d and stupid relative texturing issues!!!

Recommended Posts

Shamino    100
Okay, so MS3D has been plagueing me with idiotic relative texture paths!!! How can I automatically path to the model's texture file when no matter what the path stored in the file is relative to where it was saved when it was first created?!?! Do I have to open each of these files individually and redo the paths so they work for me? I mean cmon! I really don't want to switch from MS3D, it has a very nice setup, it doens't repeat vertices, etc etc etc... And it is free! What can I do? Right now I'm getting the texture path this way...
	for ( int i = 0; i < NumMaterials; i++ )
		if ( strlen( Materials[i].TextureFilename ) > 0 )
			Materials[i].Texture = LoadGLTexture( Materials[i].TextureFilename );
		else
			Materials[i].Texture = 0;
This simply doesn't work, because the texture string path I'm getting from the file is always different, such goofy pathing issues!

Share this post


Link to post
Share on other sites
Endar    668
I've written a little filesystem. All it does it actually take in a filename and check a bunch of default directories for a file of the same name. When it gets it, it returns an open file. It wasn't too hard to do.

Share this post


Link to post
Share on other sites
Shamino    100
I'm thinking, since the milkshape file format DOES actually give me a final filename, it just has a ton of pathing attached to it, like so:

C:/adf/aasdf/afdas/dsaf/Sword.bmp

I can just cut off everything before the last / and just attach my own path to it..

So it will be sent to me in the form above

But I will load it in the form

mypath/Sword.bmp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this