.gfx files

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Ishamael
Gnoblar
Posts: 5
Joined: Fri Apr 22, 2005 2:38 pm

.gfx files

Post by Ishamael » Fri Apr 22, 2005 2:40 pm

Hi
how can i import this kind of files to Ogre? or do you know a tool that can convert it to a format that ogre can handle.

/Ishamael
0 x

User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands

Post by :wumpus: » Fri Apr 22, 2005 2:53 pm

Please explain what kind of files it are and what program produces them, I have no clue.
0 x

Ishamael
Gnoblar
Posts: 5
Joined: Fri Apr 22, 2005 2:38 pm

Post by Ishamael » Fri Apr 22, 2005 3:05 pm

the files are from an old DOS game. i dont know much about them. i dont realy think they are any 3d models. hope this little info can help you.
0 x

User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands

Post by :wumpus: » Fri Apr 22, 2005 3:07 pm

Probably you will need to write your own parser/converter then, unless someone already made one.. But this is not exactly ogre specific, try google :)
0 x

Imperil

Post by Imperil » Fri Apr 22, 2005 5:30 pm

There isn't a standard .gfx format.. I know warcraft II used a .gfx extention as well as many other games.

Therefore you will have to write your own parser because there is no standard.. but if it is from a DOS game that should be relatively easy as it won't be very complicated.
0 x

User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands

Post by :wumpus: » Fri Apr 22, 2005 5:45 pm

Imperil wrote: Therefore you will have to write your own parser because there is no standard.. but if it is from a DOS game that should be relatively easy as it won't be very complicated.
I wouldn't count on that. Whereas nowadays games generally use standard formats for images or simple uncompressed (fast to load) custom formats, back in the DOS times some games used some tricky compression and optimization schemes like grouping per image plane (ModeX etc), compiled sprites, seperate mask bitmaps instead of alpha.. those were the times :-)
0 x

Imperil

Post by Imperil » Fri Apr 22, 2005 6:17 pm

Yeah I guess I shouldn't have said that.. I know that my own files in DOS were very simple but there were some with pretty heavy compression.
0 x

Ishamael
Gnoblar
Posts: 5
Joined: Fri Apr 22, 2005 2:38 pm

Post by Ishamael » Fri Apr 22, 2005 6:32 pm

build a parser, right... how do i do that now :P i would like u to give me an nice explnation of what to do :)
0 x

Imperil

Post by Imperil » Fri Apr 22, 2005 7:53 pm

Ishamael wrote:build a parser, right... how do i do that now :P i would like u to give me an nice explnation of what to do :)
1.) Reverse engineer the file.
2.) Look at the source for other exporters/converters.
3.) Write a parser to get the data from the file you know how to reverse engineer.
4.) Write a converter for the data you pull out using the parser.

:)
0 x

Ishamael
Gnoblar
Posts: 5
Joined: Fri Apr 22, 2005 2:38 pm

Post by Ishamael » Fri Apr 22, 2005 7:58 pm

I have done some reversed engineering, but only on program, how can i do that on i file that i dont know anything about?
0 x

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos » Tue Apr 26, 2005 5:53 am

Ishamael wrote:how can i do that on i file that i dont know anything about?
The short answer is: you can't

Obviously you have to know something about the files (if nothing else, the name of the files might be your only clue). Reversing the format could also be done by disassembling/debugging the program in question to see how it reads the files. Pretty non-trivial stuff.

Before you attempt to reverse engineer the format, I'd recommend doing a lot of searches to see if anyone else has. I have no idea what game you're talking about, but perhaps seeing if anyone ever wrote mods or tools for that game would be a better start.

What are you trying to use these (2D you think?) graphics for? Legal issues aside, perhaps it would be easier to somehow screenshot these using a DOS emulator or something (if it's REALLY a DOS game).
0 x

Post Reply