READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

[NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Programs that are related to this or that game.
Post Reply
GameZelda
advanced
Posts: 61
Joined: Wed Nov 14, 2007 5:56 pm
Been thanked: 27 times

[NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by GameZelda » Thu Jun 23, 2011 9:11 pm

DOWNLOAD CURRENT VERSION (r2)
download old version (r1)

First you need to unpack the files you want to view with the F-Zero GX Unpacker and Packer (LZ and ARC)

When you launch the program, it'll ask you for a GMA file, then a TPL file. Just select a pair of those and you'll see the model (unless it's one of the models that doesn't work yet. Some models don't work yet. Remember this is an alpha!).

Remember to read COPYING (GPL v3) and CREDITS!

Questions

I don't see anything meaningful.
You're inside the model. Use the mouse wheel to get out.
OR
Hold the middle button and double click with the right button.

How can I explore the model?
Press H for help.

Why are textures messed up in some models?
Short answer: Because I don't know how to handle them correctly.
Long answer: In the model format, there are between 1 and 3 referenced materials for each "section". I don't know what should be choosen in each case, so I just choose the one that's always set. That's usually right, but of course not always :[

Also, there does seem to be some way to "rotate" textures. In the init/ folder, there are some objects called ring, which I believe that are supposed to make a circle, but they're displayed as 4 quarters of circumference. The non-drivable side of the roads also appears to suffer from the same issue.


The model I've just loaded looks like the intersection of various models.
OR
Why is the map diagram on the origin of coordinates?
A GMA file isn't really a single model, but a model container. For most files, the models are from the same scene, so rendering all models gives the complete scene, but that's not guaranteed. The game can load any model individually.

Currently the built-in model viewer doesn't support displaying individual parts. However, you can export the model to .OBJ, and control which parts of the .OBJ file you want to see in your favourite editor.

I've exported the models to .OBJ, but when I try to see the model without textures, some faces are black.
This is something related to vertex normals (I don't know if it's OK or it's a bug). In the case of GLC-Player, my model viewer, I have to disable Two-Sided Lighting. You may have a similar option in your program.

There are some .tpl files without any model associated. How can I see them?
When you're asked for the .gma file, hit cancel (it'll not close the program). Then export the model, and you'll find the textures in the output directory./

Compilation instructions
Windows
- Install the Qt SDK (use MinGW, because I used a few C++0x features).
- Install libQGLViewer. There's an installer on the web page, but it didn't seem to include the required libraries, so I compiled it (don't worry, it's very simple).
- Open the project in Qt Creator (or you can use the command line tools).
- Open the .pro file and replace the INCLUDEPATH and LIBS with the right paths.
- Compile.

Linux
- Install the Qt and libQGLViewer packages (of course, make sure you have the development files).
- Open the file in Qt creator (or you can use the command line tools).
- Compile.
Last edited by GameZelda on Mon Aug 22, 2011 7:23 pm, edited 2 times in total.

User avatar
Mr.Mouse
Site Admin
Posts: 4040
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 558 times
Contact:

Re: [NGC] F-Zero GX Model Viewer (ALPHA)

Post by Mr.Mouse » Thu Jul 28, 2011 9:56 pm

Posting it at the tools blog now. Do you have examples of such models?

GameZelda
advanced
Posts: 61
Joined: Wed Nov 14, 2007 5:56 pm
Been thanked: 27 times

Re: [NGC] F-Zero GX Model Viewer (ALPHA)

Post by GameZelda » Mon Aug 22, 2011 7:13 pm

Here's a pretty big update. I still haven't fixed the majority of the model loading problems, and there's still some bugs, but I just want to release something :)

Improvements:
  • Texture viewer and editor
  • Option to show / hide specific models
  • Performance improvements
  • Quality improvements
  • All TPL files are now supported.
  • A few more GMA files are now supported.
  • Fixed a HUGE bug in the model exporter, which exported all textures upside down.

molton
ultra-n00b
Posts: 2
Joined: Tue Dec 27, 2011 2:04 pm
Has thanked: 1 time

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by molton » Tue Dec 27, 2011 2:10 pm

GameZelda, excellent work on the model viewer and exporter. I have been trying to modify the models in super monkey ball 2, specifically the monkey target 2 boards for a long time now, and this application is so close to being complete enough to allow me to do that, is it possible to make an import button that does the opposite of the export function and puts the files back into the the .gma .tpl packaging? I tried myself but got nowhere. Thanks 8D

YakuzaDemon
ultra-n00b
Posts: 1
Joined: Sat Jun 22, 2013 12:28 am

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by YakuzaDemon » Sat Jun 22, 2013 1:35 am

The technique doesn't seem entirely clear to me. Is this more efficient than using 3d ripper x with a dolphin emulator? I know you have to play through the game and then "capture" the models and then later clean them up. Does this method allow us to see the protected file structure on the gamecube mini dics and directly download the game's assets? Or would we also have to play through it? Do we need an emulator as well?

Any tips would be greatly appreciated! Thanks. I play on making a 3d animated fan project about F-zero.

StarkNebula
ultra-n00b
Posts: 5
Joined: Thu Jan 24, 2013 5:06 am
Has thanked: 2 times

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by StarkNebula » Wed Mar 19, 2014 9:20 pm

I was looking through the source code of gma.cpp and I noticed this line:

Code: Select all

materials.resize(numMaterials);
	for (size_t i = 0; i < materials.size(); i++)
		materials[i].read(input);

	headerBlob = input.read<uint8_t>(headerBlobCount * 0x30); // TODO figure out

	if (input.base().tellg() != baseOffset + endHeaderOffset)
		throw invalid_binary_data("Gcmf [End Header Offset] mismatch.");
This error is thrown when opening a Super Monkey Ball GMA despite the fact they (appear) to be formatted the same way. I'm no programmer, but I want to say that you can use 0x00000006 to define the endHeaderOffset size (a 2 byte value that indicates the line on which "GCMF" appears. If 0x06 = 0500, GCMF flag is on 0x000000500.)
I just checked again and it works for most GMAs. I should of taken note of what it didn't work with. All I know is that it does not function character models, probabably due to rotation points and whatnot.

Image

The 0x0098 Flag on 0x00 seems present in the SMB GMAs as well. I'm assuming that defines the data type?

Code: Select all

/Excerpt from gma.h/
enum GcmfDataType
{
	GcmfDataType_Float = 0x98,
	GcmfDataType_Uint16 = 0x99
};
If you have a document with your observations on GMA files, would you mind sharing it? I managed to define the TPL format using HxD observations, YAGCD and some of your tpl.cpp source code: https://i.cloudup.com/BiPM9pgn3x-3000x3000.png. (However, if you have TPL notes spare, could you share it as well?) I'm working my way up to C++ but can't parse source code well at this point.

aoba200941
beginner
Posts: 23
Joined: Wed Oct 21, 2015 5:41 am
Has thanked: 6 times
Been thanked: 1 time

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by aoba200941 » Mon Aug 29, 2016 4:41 am

broken link :cry: :cry:

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2392 times
Been thanked: 730 times

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by Acewell » Mon Aug 29, 2016 5:17 am

fear not, its on the tools blog :D
blog/?p=310

aoba200941
beginner
Posts: 23
Joined: Wed Oct 21, 2015 5:41 am
Has thanked: 6 times
Been thanked: 1 time

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by aoba200941 » Mon Aug 29, 2016 6:51 pm

AceWell wrote:fear not, its on the tools blog :D
blog/?p=310
File does not exist. Make sure you specified correct file name. :cry: :cry:

blog/wp-content/plugins/download-protec ... 7%CC%9A%D8

Image

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2392 times
Been thanked: 730 times

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by Acewell » Mon Aug 29, 2016 11:52 pm

its not just that file, it looks like most or all files on the blog are missing
you will have to get Mr.Mouse to see what problem is and hope for a fix :)

Aethr
ultra-n00b
Posts: 5
Joined: Wed Jan 25, 2017 8:19 pm

Re: [NGC] F-Zero GX Model Viewer & Texture Editor (ALPHA)

Post by Aethr » Tue Jan 31, 2017 10:57 pm

When you say texture editor, does this allow for editing the existing textures on the iso? I'm very interested in breaking this game apart to figure out how it works. It'd be fantastic to work out how to edit level models and collisions.

Post Reply