Textures, pictures, models...

Started by
7 comments, last by Jonerri 22 years, 5 months ago
Hey, I''ve seen in ALL 2D/3D games on the market got no pic files or texture files, BUT i''ve seen these huge files which is about 100mb, I think its in this files all the textures and stuff is hided in... So how do i get these files to my own games? And can I use 3D studio max files in c++ as the models so i dont have to place out all the polygons with programming???
Advertisement
LOL! You can''t get those models, unless you got the unpacker from the guys whom made the file.

And you can indeed use these models for your games.
Actually, it is possible... how do you think people mod games like Quake and Half-Life? Sometimes those 100MB files are nothing more than hundreds of little files appended to each other with some type of table defining the file names and breaks. There is a MMORPG called Shattered Galaxy that uses this method, and I actually wrote a VB program to break the resource files into their individual files. Now, you can either search the ''Net to see if someone has already done this (very possible with very popular games) or you can try it yourself. Get a Hex Editor and open the file up, see if there''s any readable text to give you clues, check the first few bytes for offsets and such.... there are also tutorials around the ''Net for this type of thing......
For your first question, I''m moving this to Visual Arts, where folks who might have experience with extracting models and textures might be able to help.

For the second question, I''d suggest posting a message in the Graphics Programming forum.

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
On FPS games there''s usually always a way to get the files, however, while it''s fine to do mods for the same game using the original art it''s normally forbidden (althought nor really persecuted or anything) to use the art on other games regardless if they are just a mod for a different game or completely new game.
http://www.strangefate.com
I have a follow-up question.

How do you exactly make those kind of files? How do you mash together a bunch of images into ONE file and still have controll over them?

}+TITANIUM+{
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
Is only a container. For example

bigfillyuckismorebigthat200megs.dat ->

1)header (aka copyright)
2)linker :image1.jpg is located in 2000-4000, image2.jpg is located in 4000-5000, text1.txt is located in 5000-5020,...
3)data :in fact in 2000 to 4000 bytes, you can find the image1.jpg data, ...



-eng3d.softhome.net-
-----------------------------------------------"Cuando se es peon, la unica salida es la revolución"
Ok... Now I understand how it works. But HOW do I make one? What program do you use? or whatever...?

}+TITANIUM+{
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
Seriema,

It''s only a simple database, you can make one yourself. Simply write out the file in the way that you would like it organised.

You would have a list of items, be they texture or sound data or whatever. Then, write out a header which contains the following information:

1) Some sort of name or identifier
2) Position in the file
3) Length of data block

You will need to keep track of where each item would be in the file based on the size of all the previous items but this isn''t too difficult.

When you are writing the file, think about what you would want to read in when you read the file again. The first thing you want to know is; is the file the correct file? This is why many files have a ''magic number'' at the beginning (eg. MZ for executables).

Then you will probably want to read in the header to get information about the file. This can be done in one go, or one record at a time in which case you want to decide whether to put the size of the header, or the number or records at the beginning of the file. Or you could do both, then decide at runtime whether to load the whole header in or not.

From there you will be able to access any individual resource because you know where in the file it resides, and how much space it takes up.

You can include extra information about the type of resource, whether it is compressed etc. etc. This is up to you.

I hope this helps?
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan

This topic is closed to new replies.

Advertisement