Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe

Exanima 3D models, unknown format

Post questions about game models here, or help out others!
Corus
ultra-n00b
Posts: 8
Joined: Wed Jul 28, 2021 8:20 am
Has thanked: 3 times

Exanima 3D models, unknown format

Post by Corus »

Hello everyone, this is my first post. I've lurked this website for a while but I think i hit a roadblock with my current project.
I want to make a full set of extraction tools for this game, a hard task since this is an engine made from the ground up with OpenGL.

First I used the existing bms to open the .rpk archives, and it still works perfectly after years of game updates.
You can find it here: http://aluigi.altervista.org/bms/exanima.bms
This left me with various files, the first issue being that there are no extensions to be found inside the archive, but its usually pretty clear.

Textures were confusing at first, but i realized that they are simple DDS, the header data was simply misplaced. I made a quick script to rebuild it to the correct codecs.

I also took a quick look at the other assets, but I'm not that interested right now as my current focus is on 3D models.

So after studying a bit the 3D model files, I started to work on a blender script to import them. For this thread i will use the model in the attachment called "hammer01", with no exension I'm aware of.

The file starts quite simple. You can see that there is a string that represents the name of the asset. The array of bytes that i selected is where the vertices start, while the hex number 29 is the 41 (42) vertices that make up the mesh.
Image
I already managed to import the vertices into blender with no issue, they are a simple list of floats that contain the XYZ coordinates.

After the lists of vertex i encountered another block, its possible that this is the UV maps, but how the floats are structured seems strange to me and couldn't make much sense of it. However you can still see the number that identifies how long the list is going to be.
Image

I skipped some of the data, as it seems like its just material references I'm not interested in.

What seems to be what identifies the triangles is what truly confuses me, as it starts quite normal, but the numbers go much higher than the max vertex index, and ends with repeated numbers. Even if i just select the data that could create some triangles I cant fill the whole mesh and some triangles look misplaced. I tried different configurations and nothing makes sense to me.
Image

Do you know how the triangles could be configured? Can anything be done? Thank you very much in advance.
You do not have the required permissions to view the files attached to this post.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4300
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1152 times
Been thanked: 3962 times

Re: Exanima 3D models, unknown format

Post by shakotay2 »

Like vertices the uvs seem to make sense:
.
hammer01.png
(We'd need the texture to maybe tell more.)
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Corus
ultra-n00b
Posts: 8
Joined: Wed Jul 28, 2021 8:20 am
Has thanked: 3 times

Re: Exanima 3D models, unknown format

Post by Corus »

Hi, this is the diffuse textures.
It seems like it's lazily mapped over generic textures, but this is one of the oldest models in the game. Maybe i can upload another model.
mtliron04
Image
wodod02
Image
Corus
ultra-n00b
Posts: 8
Joined: Wed Jul 28, 2021 8:20 am
Has thanked: 3 times

Re: Exanima 3D models, unknown format

Post by Corus »

I upload another model. The texture here is much better.
Yes the UVs arent hard to read, but i have no idea how where they are related to the vertices, and i still dont understand how to read the faces.
It's almost like the vertices aren't indexed at all since the number goes much higher than the vertex count.
Help would be greatly appreciated.
You do not have the required permissions to view the files attached to this post.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4300
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1152 times
Been thanked: 3962 times

Re: Exanima 3D models, unknown format

Post by shakotay2 »

well, doesn't look too bad:
.
2h_axe.png
Guess you need to use a lesser face index count (15?) for the first sub mesh, then find the start of the next face indices block for the mesh. (For the uvs it's different, max FI is 116 there. )

edit: nope, it's indexed vertices (or to say, there's an additional FIs' block (indices fInd) which is used to create "new" FIs such like FIs[fInd], where FIs is an array of face indices for the vertices for example). Yeah, noobish explanation, but worked for me. :D
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Thu Jul 29, 2021 10:28 pm, edited 1 time in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4300
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1152 times
Been thanked: 3962 times

Re: Exanima 3D models, unknown format

Post by shakotay2 »

Maybe for uvs are indexed are something like that?
Point cloud looks ok:
.
2h_axe_tex.png
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Corus
ultra-n00b
Posts: 8
Joined: Wed Jul 28, 2021 8:20 am
Has thanked: 3 times

Re: Exanima 3D models, unknown format

Post by Corus »

Thank you, but how do i know which vertex the UV point is supposed to be?
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1031
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 32 times
Been thanked: 1887 times

Re: Exanima 3D models, unknown format

Post by Bigchillghost »

Using AXE:
2haxe a.png
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
Corus
ultra-n00b
Posts: 8
Joined: Wed Jul 28, 2021 8:20 am
Has thanked: 3 times

Re: Exanima 3D models, unknown format

Post by Corus »

Wow, thank you very much dude. That looks perfect. I just need a moment to understand all of that data!
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1031
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 32 times
Been thanked: 1887 times

Re: Exanima 3D models, unknown format

Post by Bigchillghost »

With texture applied:
tex_applied.png

Edit: darn! I've just realized that I was using AXE to actually extract an axe! What a coincidence! :D
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4300
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1152 times
Been thanked: 3962 times

Re: Exanima 3D models, unknown format

Post by shakotay2 »

shakotay2 wrote: Thu Jul 29, 2021 1:00 pmMaybe for uvs are indexed are something like that?
Yep, newbie, and the vertices, too. :roll:

Well, indexed indices. "Data Reorganizer" of AXE is a good idea but too complex for me (and hex2obj - guess I will create/hold all the data in its memory. But no idea how to keep this simple for pos AND uv indexing.)
.
2h_axe_indexed.png
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Corus
ultra-n00b
Posts: 8
Joined: Wed Jul 28, 2021 8:20 am
Has thanked: 3 times

Re: Exanima 3D models, unknown format

Post by Corus »

Yeah, looked impossible at first but the indexing makes sense to me now. It assigns the uv maps to each actual 3d vertex, and the triangles are created on the uvs and geometry at the same time.
Im currently making my own blender importer. Later i will try more complicated models, but should be easy now that I've figured it out.
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1031
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 32 times
Been thanked: 1887 times

Re: Exanima 3D models, unknown format

Post by Bigchillghost »

shakotay2 wrote: Thu Jul 29, 2021 10:01 pmguess I will create/hold all the data in its memory. But no idea how to keep this simple for pos AND uv indexing.
The overall layout of the geo data is as following:

Code: Select all

long       maxPositionIdx
byte       positions[(maxPositionIdx+1)*12]
long       maxUvIdx
byte       uvs[(maxUvIdx+1)*8]
long       maxVertexIdx
word       posIndices[maxVertexIdx+1]
word       uvIndices[maxVertexIdx+1]
word       posIndices_instance2[maxVertexIdx+1]

long       maxFaceIdx
word       faceIndices[(maxFaceIdx+1)*3]
When you have position and texture coordinates optimized they definitely require individual channels of face indices so if you're writing the coordinate data directly to an obj file, you just need to create the direct position/uv indices respectively. The formula would be

Code: Select all

directPosIdx[i] = posIndices[ faceIndices[i] ]
directUvIdx[i] = uvIndices[ faceIndices[i] ]
Or you just recreate the position and uv buffer to use the face indices directly:

Code: Select all

directPosCoord[i] = positions[ posIndices[i] ]
directUvCoord[i] = uvs[ uvIndices[i] ]
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4300
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1152 times
Been thanked: 3962 times

Re: Exanima 3D models, unknown format

Post by shakotay2 »

Bigchillghost wrote: Fri Jul 30, 2021 1:57 am The formula would be

Code: Select all

directPosIdx[i] = posIndices[ faceIndices[i] ]
...
yeah, that's what I used in my last posted picture.
Or you just recreate the position and uv buffer to use the face indices directly:

Code: Select all

directPosCoord[i] = positions[ posIndices[i] ]
directUvCoord[i] = uvs[ uvIndices[i] ]
That's what you do when creating xxx.out by the "Data Reorganizer", right?
(I'd prefer maintaining the original order of vertices to not lose my overview, ... if any.)

btw: very impressive, your AXE tool. :)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1031
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 32 times
Been thanked: 1887 times

Re: Exanima 3D models, unknown format

Post by Bigchillghost »

shakotay2 wrote: Fri Jul 30, 2021 8:29 am yeah, that's what I used in my last posted picture.
So what's it about keeping things simple? :D
shakotay2 wrote: Fri Jul 30, 2021 8:29 am That's what you do when creating xxx.out by the "Data Reorganizer", right?
(I'd prefer maintaining the original order of vertices to not lose my overview, ... if any.)
Yes. It's just that it'd be a complete disaster to introduce
individual indices channels for all vertex attributes, not just for the GUI. Instead, an additional "data reorganizer" will serve well in maintaining the simple and old-fashioned workflow. Besides, it can also be be applied in scenarios like converting a paletted image to ordinary RGBA format.
shakotay2 wrote: Fri Jul 30, 2021 8:29 am btw: very impressive, your AXE tool. :)
Thanks. That's cool. :)
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
Post Reply