I wanna make a program to change the file format from
x to y
since i'm quite new and i'm not too sure about how to do it do you know of any tutorials that can explaing to me how to change from one format o another any type of format doesn't really matter

the x and y would be
.mdl to .3ds
but i don't care on the tutorial as any would do i just wanna see how you do it so i can then work from mdl to 3ds

thanks for the website anyway

01-08-2004

DougDbug

This could be REALLY involved...

In general:

1- Read-in the file.
2- Decode (convert) the file into a intermediate format.
3- Convert the data into the new format.
4- Save the new format.

You may be able to skip the intermediate format. (For example, you will need an intermediate format if both formats use different methods of file-compression.)

It may be desirable to convert the file a little at a time, rather than all at once. This may be impossible with some file formats.

I don't know anything about the .mdl or 3ds formats, so the following is very general, and I wouldn't want to discourage anyone from attempting something just because it might be difficult... But, most file formats are rather complex with lots if conditional logic and options (if this... then that). This type of program is going to take more than a few hours to write... I would guess that it would take me at least a couple of weeks of full-time research, study, and programming... maybe much longer!

Depends on the file type...I'm sure changing between two different simple image types wouldn't be that involved (might be a good place to start learning)...The types of files that you want to work with would definitely be complicated and take some time to learn

Its a very good thing to learn different file formats, though (in my opinion)

01-08-2004

WaltP

Quote:

Originally posted by JaWiB Depends on the file type...I'm sure changing between two different simple image types wouldn't be that involved (might be a good place to start learning)...

You've got to be kidding! The header information might be able to be converted to a degree, but the image data for the formats cannot simply be plugged into different headers. .JPG, .GIF, .PNG, etc. all have totally different schemes to store image information and they aren't compatible at all. You'd have to convert from compressed format to uncompressed form (basically a BMP) the recompress to the new form. Not trivial.

01-08-2004

XSquared

He said simple, like BMP<->TGA, for example.

01-09-2004

merlin371

Unfortunatly it won't be anything too easy the file that I wanna transfer are 3d files uno of the the (3ds) is the 3D Studio file format the other one (MDL) is MS Flight Sim Compiled aircraft file is a RIFF file so I heard that is not too hard too handle and also i can convert it into an X file at first, do you think is too hard cause i'm not really an "expert"

01-09-2004

DougDbug

Quote:

do you think is too hard

You'll have to answer that yourself...

If you don't know how to read-in a text file, encrypt it (using some encryption method of your choice), save it, read it back-in and decrypt it... this is too hard for you.

If you read the file format documents, and you don't have a clue what they mean, this is too hard for you. (These types technical specification documents usually require slow-careful reading and re-reading... So, I'm not saying that you need to understand all of it with one quick reading.)

If you study the file format documents, and you understand them (or 90 percent of it) then this project is not too hard for you.

If after studying the file formats, you can read-in a file and mamipulate it in some way (change the size or colors), then this may not be to hard for you.

01-09-2004

merlin371

would you know of any places where I can find some tutorials cause i have a book C++ in 21 days but i don't think is that good since it doesn't even explain how to write a file I had to go and look for that somewhere else, I really wanna do this program no matter how long it takes

Thanks

01-09-2004

Codeplug

I guess fstream's were on the 22nd day :(

gg

01-09-2004

merlin371

Quote:

Originally posted by Codeplug I guess fstream's were on the 22nd day :(

gg

Well you're not that wrong since the fsream are on another book from the same author and the same publishing company

01-10-2004

Salem

If you don't already know C++, and you've just decided that the only reason you need to learn C++ is to complete that task, then you're going about it the wrong way.