Mario Dance Mix: Dancing All Night - Specialist

Kobe Phan

CPE 471 - Fall 2020

I was sitting in my room one day, scrolling through Reddit as I usually do, when I come across an astronomical amount of memes from the game Persona 4: Dancing All Night. The original game is a spinoff of the JRPG Persona 4, except that it is a rhythm game featuring the characters from the game. Normally, I would just laugh at the meme and move on, but considering that I had a Computer Graphics final project coming up, I decided to tackle the meme but in OpenGL form.

I should probably just show you

How to use:

When the program loads in, press the "P" key to play the animation. Move the camera around with WASD and the mouse. The animation will loop until the program is closed ("ESC").


Process

Blender Mario Blender Mario

This is the Mario MMD model I found online (see References). When you open it in Blender with MMD-Tools, it includes a model complete with bones needed for the VMD file. Since MMD is a file only really used in Japanese Vocaloid music videos, most of the descriptions are in Japanese. These had to be translated with MMD-Tools to work with Assimp, since most Japanese characters will show up as garbled junk in C++. After importing in the model, I used MMD-Tools again to attach the VMD file onto the model. Then, after some additional modifications, I exported it as an FBX file with Blender. Originally, I tried exporting it as a Collada (.dae) file, however those files did not want to cooperate with Assimp, even with the Better Collada Exporter Plugin. So, I moved onto FBX, which I didn't even know Assimp supported since it wasn't anywhere in the documentation that I was looking at, but it easily loaded in FBX files. Figures.

Blender Mario

The hardest part of the program was actually getting Assimp to read in the model. Every other program that could read it normally has the entire file loaded, but for me, Assimp kept loading in this mess. After days of figuring it out, I learned it had to do with the sizes of my bone transform matrices. The Mario model has well over 90 bones, and the matrix was so small that it kept overwriting past bone transforms and led to this creepy mess.

Blender Mario

With a little help from the stock Winmm.lib file, I was able to play my .wav file - specialist.wav - without much trouble. I only had to play 1 song throughout the animation, so I was okay with using Winmm, which will only play the current file in the buffer. Unfortunately, I couldn't get the eyes to work. They wouldn't load in for some reason. If I had extra time, I would have thrown on sunglasses onto Mario to hide his missing eyes. However, hopefully people think that the final product is entertaining enough to make up for the missing eyes.


Technologies Used

- Assimp Library. Allows for importing more than just .obj files, including animation.
- Winmm Library. Allows for the music to play.
- Blender & MMD-Tools. Imports the MMD and VMD models.
- Game camera. Allows the user to look around the model and observe the transforms.
- Bone transforms. The program uses a mix of Matrix Transforms and Quaternions to do the movement and rotation, respectively.
- Timer. Use GetTickCount64() to grab the animation data.
- Skybox. Used skybox technology on the cube.obj file.
- tiny-obj-loader. Used to import the "Stage".



References (Outside of CPE 471)

Assimp Library: https://github.com/assimp/assimp

Coding Man Tutorials for Skeletal Mesh Animation Import: https://www.youtube.com/channel/UC-O8CNK_RaZvDzKUAVdR4Ug

Mario MMD Model: https://www.deviantart.com/sab64/art/MMD-Model-Mario-and-Shadow-Mario-v2-1-Download-633385783

Persona 4: Dancing All Night - Specialist VMD (Animation File): https://www.youtube.com/watch?v=gaQyaGkrZ-M

"Stage" Model: https://www.cgtrader.com/free-3d-models/furniture/table/tv-studio-news-desk-001-301c4695-6791-411b-8603-ae219d959c30

Skybox: http://www.humus.name/index.php?page=Textures&ID=139

Blender MMD Import Tools: https://github.com/powroupi/blender_mmd_tools

StackOverflow: you know why this is here