Author Topic: MDL files / level editing  (Read 606 times)

Offline Naulahauta

  • Member
  • Posts: 56
  • Hands across the water. Heads across the sky.
MDL files / level editing
« on: March 31, 2018, 10:18:46 AM »
If you remember our research regarding the umires.arc found in Umihara Kawase Steam Edition, you know that the level files come in MDL/ATR pairs. I did a spec on the ATR format back then, but now I've been working on a MDL to OBJ converter for a few days now

Here's a video:
https://youtu.be/91PBrXLY_rc

Theres still a few things left to figure out but mostly this isn't too complex of a format to understand. My primary objective is to make a 1:1 exporter so we can host 3D models of the fields onsite, but maybe we could make an OBJ > MDL converter eventually as well.
I'll try to update this thread as I progress.

Offline Alc

  • Member
  • Posts: 135
Re: MDL files / level editing
« Reply #1 on: April 14, 2018, 06:10:30 PM »
Nice work!

That's Cinema 4D, right? I never did anything other than dabble with 3D stuff, little bit of Maya, Lightwave. How easy is it to work with it?

Offline Commando125

  • Member
  • Posts: 78
Re: MDL files / level editing
« Reply #2 on: April 15, 2018, 02:02:02 AM »
We really need a way to re-compress the .arc file that is a 1:1 conversion. All we know how to do at the moment is decompress it.

Offline Naulahauta

  • Member
  • Posts: 56
  • Hands across the water. Heads across the sky.
Re: MDL files / level editing
« Reply #3 on: April 27, 2018, 12:19:12 PM »
Almost there. Figured out most bytes, just a few UV bytes doing something funny.


KawaseFan, is implementing an in-browser Javascript OBJ viewer to the site within the realm of your expertise? If all else fails, PNG maps will do fine too, I guess.

Offline KawaseFan

  • Member
  • Posts: 368
    • KawaseFan.net
Re: MDL files / level editing
« Reply #4 on: April 29, 2018, 12:02:36 PM »
That's looking good!

KawaseFan, is implementing an in-browser Javascript OBJ viewer to the site within the realm of your expertise? If all else fails, PNG maps will do fine too, I guess.

I can get that done, sure.  Great idea for new site content; pretty much the Shun equivalent of your field maps for the first game.

Offline Naulahauta

  • Member
  • Posts: 56
  • Hands across the water. Heads across the sky.
Re: MDL files / level editing
« Reply #5 on: May 01, 2018, 11:44:19 AM »
Quote from: KawaseFan
I can get that done, sure.  Great idea for new site content; pretty much the Shun equivalent of your field maps for the first game.
Glad to hear that!
Unfortunately, it appears that OBJ doesn't support animated UV maps or vertex colors. I might have to look into other formats or devise a strictly webGL-optimised solution.

I'm also confident that ripping the Sayonara maps is totally possible, but I'll get back to that later.

Offline Commando125

  • Member
  • Posts: 78
Re: MDL files / level editing
« Reply #6 on: May 02, 2018, 04:13:02 AM »
Glad to hear that!
Unfortunately, it appears that OBJ doesn't support animated UV maps or vertex colors. I might have to look into other formats or devise a strictly webGL-optimised solution.

I'm also confident that ripping the Sayonara maps is totally possible, but I'll get back to that later.

Animated UV maps? That's a thing? I don't see why the UV map itself would be modified in real time. The texture itself might be the one changing to give the impression of animation.
.obj can support vertex color for some graphics renderers; It's a set of three floating point numbers after you define the position of a vertex. Another way is to use one material for one color and apply each material to a group(s) of meshes.
« Last Edit: May 02, 2018, 04:15:55 AM by Commando125 »

Offline Naulahauta

  • Member
  • Posts: 56
  • Hands across the water. Heads across the sky.
Re: MDL files / level editing
« Reply #7 on: May 02, 2018, 06:43:43 AM »
Animated UV maps? That's a thing? I don't see why the UV map itself would be modified in real time. The texture itself might be the one changing to give the impression of animation.
To be perfectly honest, I actually don't know if the UV map is animated, I just assumed the UV coords move along the texture because the conveyor movement is so smooth. Could be animated textures, too, though. Even animated palettes for all I know, much like the first game. Maybe animated GIFs would work as the textures if all else fails?

.obj can support vertex color for some graphics renderers; It's a set of three floating point numbers after you define the position of a vertex. Another way is to use one material for one color and apply each material to a group(s) of meshes.
I know, but it's not in the standard so it's more of a hack really. Also, I use Cinema 4D for my modeling stuff which unfortunately does not support this implementation of vert colors in OBJs.

There are still three big unsolved problems regarding the models:
• Animated parts in level geometry. How they work, and how to implement them in the web viewer (OBJ doesn't support animation, right?)
• Enemies and objects. How do they work?
• Z-fighting. There are multiple cases where triangles share the exact same Z value but have separate textures, usually the "top" one having a texture with an alpha channel. See my tweet.