KawaseFan.net Forum

Umihara Kawase => Umihara Kawase Shun => Topic started by: Naulahauta on March 31, 2018, 10:18:46 AM

Title: MDL files / level editing
Post by: Naulahauta on March 31, 2018, 10:18:46 AM
If you remember our research (https://kawasefan.net/forum/index.php?topic=43.0) 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
(https://i.imgur.com/F0uanb8.jpg)
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.
Title: Re: MDL files / level editing
Post by: Alc 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?
Title: Re: MDL files / level editing
Post by: Commando125 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.
Title: Re: MDL files / level editing
Post by: Naulahauta on April 27, 2018, 12:19:12 PM
Almost there. Figured out most bytes, just a few UV bytes doing something funny.
(https://i.imgur.com/MUWW5kP.jpg)

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.
Title: Re: MDL files / level editing
Post by: KawaseFan on April 29, 2018, 12:02:36 PM
That's looking good!

Quote from: Naulahauta on April 27, 2018, 12:19:12 PM
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.
Title: Re: MDL files / level editing
Post by: Naulahauta 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.
Title: Re: MDL files / level editing
Post by: Commando125 on May 02, 2018, 04:13:02 AM
Quote from: Naulahauta on May 01, 2018, 11:44:19 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.
Title: Re: MDL files / level editing
Post by: Naulahauta on May 02, 2018, 06:43:43 AM
Quote from: Commando125 on May 02, 2018, 04:13:02 AMAnimated 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?

Quote from: Commando125 on May 02, 2018, 04:13:02 AM.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 (https://twitter.com/vervalkon/status/990310581574959104).