Tuesday, July 24, 2012

Concertroid! Engine - on a translucent screen! (courtesy of Re:VB-P)

Re:VB-P, developer of the similar VOCALOID-inspired concert animation software AniMiku, has agreed to do a test run of my software on his own translucent screen and projection system!

Collaborating with him on this project, I'm learning a lot of things about 3D modeling and animation that I would've probably never understood otherwise. While he demoed his projection system running my software, I took a couple of pictures to see the difference between his software, my software, and the official concert renderings used by Crypton Future Media, in order to better understand where my program needs improvement.

Here's what I will be working on in the near future:

  • Cleaner edges (antialiasing)—Most noticeable in the Blu-Ray release of the 2010 VOCALOID concert by Crypton Future Media, the lack of antialiasing in 3D models causes the edges of the character to appear sharper and, though not usually noticeable while in the audience, becomes much more apparent during filming, especially close-ups in high definition!
  • Improved rendering—Using the default settings already provides a much better render of the character than MikuMikuDance, which applies a more anime-like shader and defaults to drawing edge lines throughout the model, something that simply doesn't look right in a concert. However, there is always room for improvement, and adding support for HLSL/GLSL shaders is something to look forward to in the future.
  • Faster rendering—The software currently takes around 50ms to render a single frame on my ASUS computer with integrated graphics card and 4GB memory. While I plan on having a much better dedicated rendering computer for any concerts I present, I would like to fix all the things that my program might not be doing "The Right Way" that is causing it to be so slow.

And finally, some screenshots. Special thanks to my friend and colleague Re:VB-P, developer of the AniMiku virtual concert animation software, for providing the screen and taking the time to demo my software on his setup. AniMiku has been used for live events around the world by the VOCALOID producer group Vocalekt Visions. Re:VB-P also helped identify a crippling bug that never showed up on any of my computers, but sometimes happened on other systems—particularly those with third-party graphics hardware.

Concertroid! rendering with lights on

Concertroid! rendering with lights on

Concertroid! rendering with lights off

Concertroid! rendering with lights off

Thursday, July 5, 2012

Universal Editor module for VMD file format

Finally finished the excruciatingly painful analysis of the VMD file format (versions used in both V1.30 and V7.39 of MikuMikuDance). I'm rather proud of it because it's the first time in a long while that I've actually figured something out just by tweaking values, not actually looking at other people's (free) source code.

I added support for the VMDMotionDataFormat in Universal Editor, so hopefully when I get around to finishing the animation system for my renderer it will be able to read (and convert!) VMD files generated from both versions.

This was excruciatingly painful primarily because of the way the bone frames are stored. It was interesting to notice that the only difference between V1.30 and V7.39 file formats (besides the model and bone names) were the field sizes of the model name (10 bytes in old version, 20 bytes in new version). But the way the frames are stored is hideous.

For each keyframe, it stores the bone data block (name of bone, position and rotation of bone, and interpolation data) for each bone affected at the keyframe. This is not that big of a deal... except that the keyframes aren't actually stored in the order they should appear during playback. They're stored apparently randomly, though presumably (I haven't tested it) in the order that the user adds them to the timeline. I ended up making a class RawFrameData to store the frame index and bone information, storing all of that information in a System.Collections.Generic.List<RawFrameData>, then sorting that list in ascending order by the frame index.

I then created three classes: a MotionFrame class, a MotionAction (abstract) class, and a MotionBoneRepositionAction class which inherits from MotionAction.

MotionFrame has a frame index and collection of MotionActions (so that other actions, such as texture changes, can be recorded on the keyframe as well, though these aren't supported by the VMD file format and will require a new Concertroid-specific file format to store them). The MotionBoneRepositionAction represents a bone position/rotation change, and stores all the data that was originally present in the VMD file.

A quick note: the model and bone names between the PMD models are bound to be different, and the model and bone names in the model for the single-model MikuMikuDance V1.30 are hardcoded, so if I develop a converter, it will have to feature some way of allowing the user to map old VMD bone names to new VMD bones and vice versa. Also, supplying an XML configuration file with the bone mappings already laid out for some of the more common models (hanaminasho, kio, animasa, etc.) would probably not be hard to do, assuming I can find the time to work on them. This would also allow you to convert VMD motion data between models that have different bone names...

Anyway, no screenshot for now because there really isn't anything to show. Once I develop the user interface for the converter, I'll post that. But since I've completed VMD support (I checked by converting World is Mine from V7.39 to V1.30 and it played perfectly!) I am not going to do much more with it at this moment.

Right now, my focus is on getting my renderer to animate with the given animations and/or pose files. So until next time, thanks for reading!

Sunday, July 1, 2012

Ren'py Data Manager

It's a small utility that allows you to back up your save data for Ren'py-based games with ease. Currently only works with Katawa Shoujo, since that's the visual novel I've been playing at the moment ;p But as I get more involved with other VN's and learn how they structure their save files, perhaps I will add support for them as well.

It's really great if you like to play on multiple computers but hate having to restart the game from the beginning. It also features the ability to backup the persistent data (like which extras you've unlocked).

Screenshot:

Ren'py Data Manager screenshot

Download:

Note: Right now the binaries have only been tested on Windows. My Linux system is down at the moment so I have not had the time to test on Linux; however the software is written in C#, which is cross-platform and can be compiled under Linux with mono. The data path is found based on the Windows version of Ren'py though! The data path may be different on a linux system; since I haven't tested it, I don't know what it's supposed to look like. A simple switch(Environment.OSVersion.Platform) should take care of these different cases though.

Saturday, June 30, 2012

screenshots of what I have so far!

No animation just yet. Still trying to figure out the bone positioning and mapping the bone movements to the vertices of the model, with some consultation from my buddy over at AniMiku, who is undertaking a project quite similar to mine, except his is done in DirectX, and actually works at the moment...

I'm not content to just re-build MikuMikuDance in OpenGL instead of DirectX, though. Here's a trio of of screenshots that showcase some of the rather interesting new features you will find in the Concertroid! animation system:

Nicer rendering and animated textures: You won't see this in the preview, because there are no animations, but if you look closely at the skirt and armband textures between this screenshot and the following screenshot, you'll notice that they're different - changing every frame as the software is doing live rendering.

Miku model rendering

Lights-off mode for added effect: This feature was introduced in the 2011 Sapporo VOCALOID concert done by 5pb. and Marza Animation Planet, although they made a few mistakes. The lighting actually (in my opinion) got worse in the 2012 concert, but regardless of that, their biggest mistake was that they did not use it enough. The first few songs featured lights-off mode, and everything else they just lazily faded out. Since Concertroid! is a live rendering system, there will be no need to worry about that. If there is a delay specified within a certain threshold between two songs in the set list, the lights will go off and the model will still appear to be on the stage.

Lights-off mode

Bone view: This is only a feature for me to see the bones as I am developing the animation system, but it is a feature I will keep in Caltron (the underlying .NET rendering library I am developing alongside Concertroid!) in case other developers might find use for it.

Bone view

I hope you've enjoyed this latest update, look forward to more coming in the next few months (hopefully, if I can get these features all sorted out!)

Friday, June 8, 2012

FINALLY...... you'll never believe this

TL;DR: I fixed the problem, here's the result. For those who want to know the dirty details... I was playing around with Caltron, the rendering engine for PolyMo Live! (now Concertroid!) and I started noticing a peculiar bug in the method that applies the textures. Colors in normal GDI are encapsulated by System.Drawing.Color in the .NET framework, a structure I use to store color values in non-Caltron projects (like Universal Editor). These Colors represent color values using four Int32s (something I've never understood, since colors can really only be practically represented in ranges from 0-255). Whether they're four Int32s or four Bytes, their practical range is still only 0-255. Well, OpenGL expects color values to be formatted as percentages, something I knew full well when I started getting into it. However, as I soon learned, I was forgetting a crucial part to the texture applicator. The RGB color values were not getting divided by 255. So, I just added the necessary division, and voilà! The entire thing went black. See, I had forgotten ANOTHER crucial part to the renderer. I had forgotten to flip the light switch. Yes, the light had been configured with the correct color values and position and whatnot, but I had forgotten to glEnable() the light. Anyway, now that I fixed both of the problems (and found an interesting phenomenon where the light position wasn't completely correct and was actually illuminating INSIDE Miku instead of outside her), I feel it's time to update the blog. So enjoy the latest picture! I should have a test program (and complete source code) released soon, but I found another bug where the software will run on my machine but no one else's. I think it's due to the universal-editor library doing something it shouldn't be doing (namely, attempting to read/write from a read/write-protected location)... so I should have that fixed in no time.

Sunday, June 3, 2012

TGA image loader for universal-editor

Believe it or not, those last screenshots showing polymolive displaying (somewhat flawed) textures on the model were not in the de facto TGA file format (TrueVision "Targa"), they were in Windows Bitmap (BMP) format. I had been converting all the textures to BMP format because it was easier to load the BMP files using the .NET System.Drawing API, which (being based on Windows' own GDI system) does not support more esoteric file formats like TGA. Fortunately, now TGA textures load PERFECTLY... though whether they'll display correctly on the model is another story, but the below screenshot proves that the textures load just fine when displayed in a System.Windows.Forms.PictureBox - so any errors with the model textures is an OpenGL issue and NOT a universal-editor issue!!! Texture loading using TGA format

Wednesday, May 16, 2012

universal-editor and polymolive update...

So I finally got around to doing some decent improvements to polymolive... all thanks to frostworx, whose free-software (GPLv3) libmmd library and dunan program helped me to better understand the PMD model file format and how to go about rendering the model (and textures) using OpenGL.

I've improved the implementation of the PMDDataFormat in universal-editor, correcting some minor model flag bugs that caused the DataFormat loader to not load textures properly (so no matter what I did on the rendering side, I wouldn't see the textures because they never got loaded!)

I've also followed the code in dunan/libmmd to render the PMD files, but as I'm translating the code from C/C++ to C#, I might have missed a few important things (like the correct way to P/Invoke the OpenGL library...) I've attached a screenshot of what I have so far.

The first time I implemented texture processing:

First texture implementation

The improvements:

Second texture implementation

As you can see, the "improvements" are not much; the only good thing is that now you can clearly see she's wearing some clothing, lol ^^;;

I still have to figure out why most of the parts are drawing white instead of skin-tone, and why the entire model seems to be too *light*...

if anyone has experience with OpenGL and wants to provide some assistance, please feel free to leave a comment ... much appreciated ^_^

Saturday, January 28, 2012

why did this not get posted sooner?

A little preview of what is to come in the PolyMo Live! renderer.

This is just a test to see if the program could load the model from the Universal Editor ModelObjectModel.

It took quite a bit of work to actually get the PMDDataFormat to load the model file, and to convince OpenGL to display the model properly, but it finally worked out.

Sadly, textures don't work (I can't seem to figure out how the PMDDataFormat associates which textures go with which sets of vertices (meshes)... Anyone know anything about this?)

Take a look, it's pretty neat so far. Once I figure out how textures work, I can figure out how to take my software one step further than the original Polygon Movie Maker..... how to ANIMATE the textures!

Saturday, January 14, 2012

more pictures... yay =^.^=

This time, it's the remote-control interface login window for PolyMo Live!

(It doesn't do anything now. I just put that window together in 5 minutes... haha!)

If the application looks vaguely familiar, it's because PolyMo Live! is simply a bundle of plugins, editors, object models, and data formats for the Universal Editor platform. Notice that the god-awful Ribbon interface is gone. THAT project I've decided to put on the really-far-back burner for now.

Basically, I'm updating the Universal Editor codebase at the same time I'm working on PolyMo Live! It's really tough, finding out what features should be moved into Universal Editor (affecting all other UE platform-based applications as well) and what features should remain specific to PolyMo Live!

Take a look, it's pretty awesome so far. (The Editor has a concert set list file currently open. That Editor is about ... 45 percent complete? Maybe?)

Saturday, December 10, 2011

Features to come in PolyMo Live! custom renderer

The idea for this system comes from the popular Polygon Movie Maker (MikuMikuDance) animation program developed by higuchuu4.

However, the code is written entirely from scratch (as higuchuu4 did not release the source code to the public) in C#, based on the Universal Editor platform I have been working intensely on.

Features will include (sorted in order of priority):

  • Animated textures (such as GIF and MNG) provided by changing the texture applied to the surface each frame.
  • Chain multiple MMEffect renderer effect presets for a single model
  • Save MMEffect presets selected for the models along with the animation file you are saving (will require an extension to the Polygon Movie Maker PMM document format, or a new PolyMo Live PML document format)
  • Play animations and their associated songs from a Playlist file supported by the Universal Editor platform. Currently these include XSPF, WPL, ZPL, and M3U. Sound facilities will initially be provided by VLC.
  • Remote control the interface over TCP/IP (to place the rendering software on the computer dedicated to the projector and keep the controlling computer separate)
  • Synchronize stage lighting using a DMX interface - this is an extremely low-priority and out-of-my-expertise project, but something I'd like to see anyway (any DMX-using .NET developers out there?)

Estimated date of first release for this project? Don't push me. I just got out of school for the semester, I'm going to be hard at work hacking for the next few weeks. Sadly, I have to fix most of the deficiencies in the Universal Editor platform before even attempting to write a program based off of it!

Perhaps one day I will write a history of how the Universal Editor came to be. If it's not interesting to any of my (few) blog-followers out there, at least it will provide an entertaining story to distract me from coding if I ever have a hackers' block.

Thursday, November 10, 2011

[Universal Editor] Screenshot of model material editor

So I figured I'd update you on what's been going on with universal-editor... No, I don't plan on keeping the ugly and incomplete Ribbon interface, and currently the model editor only supports loading PMD and PMX files. PMD and PMX saving "works", kind of, but there are extreme issues with bone attachment and material colors. Once those bugs are fixed, I'd really like to figure out the Ghoul2 GLM format (used in some Quake 2 engine-based games) and id software's MD2 and MD3 formats (which are both free software, and also used in Quake 2 engine-based games).

This would theoretically enable anyone with GLM character models from their favorite Quake2 engine-based games to save those models as PMD files and import them into an editor that supports this format (such as Polygon Movie Maker...), albeit without the physics support, since I do not believe that file format supports physics (if I'm correct).

Sunday, October 23, 2011

whew, that was a long and arduous process

Just finished publishing my findings on the Polygon Movie Maker Model file format (support for which is currently being added to universal-editor based on the great work of the GPLv2-licensed dunan and other projects)

"PMD file format" article at MikuMikuDance on Wikia

I'm not taking the time to re-list it here, because most people don't care. However, I thought it best to make this specification known, at least to the people who might actually find it useful.

As far as I know, no one has actually bothered to officially publish these findings yet. All the references I could find are GPLv2-licensed source code, so they are freely modifiable and redistributable.

Since Higuchi Yu-san does not seem to want to release the source code of his program, the least we can do is use the (official-as-can-be) specification to build a new, more powerful, Polygon Movie Maker, hopefully with cross-platform and multi-language support, and most of all, hopefully as free as can be, under the GNU General Public License.

Thursday, July 28, 2011

universal editor

So I just realized I haven't made a blog post in quite a while (four months actually) and since I haven't been very inspired musically, lately...

I'll make a post about programming instead!

I've been working on a project called universal-editor, which will be 100% free software (GNU GPLv3) and aims to open, edit, and save pretty much any file in the universe.

It does this by separating file formats and data "representations". For example, a Microsoft Word 2003 file, an Adobe PDF file, and an OpenDocument Text file all store the same data : formatted text. So one need only write a formatted text editor, define the three different file formats... and voilà! Instant conversion between data formats!

So there's a lot of perks. Currently, not much is complete (and if it is, it hasn't been thoroughly tested). Right now I'm working on loading vocal synthesis sequences (VOCALOID VSQ files, UTAU UST files, and VirSyn CANTOR 2 VCP files).

Since MIDI files are also synthesized audio files, they use the same editor. So importing pre-made MIDI files, adding lyrics, and re-saving them as vocal synthesis files is a snap!

(Note that this editor CANNOT and probably will never aim to synthesize these vocal tracks. You will have to purchase VOCALOID2 or download UTAU in order to actually synthesize the vocals.)

Here's a screenshot:
universal editor screenshot free software gnu gpl gplv3

Friday, March 11, 2011

【あるせしむ ft. 初値ミク】 DANCING QUEEN

Finally, an upload! Took me long enough. It was supposed to release on Wednesday... Actually, the entire album was supposed to release on Wednesday. Unfortunately, due to technical difficulties (DSL was down in our entire area) and general laziness on my part, I was unable to make the deadline. And since my other songs (including some originals and a collaboration with the wonderful Makata Ono) aren't even finished yet, I will be releasing the songs one by one.

So my first "single", I suppose you'd call it. Alcexhim featuring Hatsune Miku on vocals, performing Dancing Queen based on the A*Teens version, originally performed by ABBA.

Enjoy~! Remember, comments and suggestions are greatly appreciated.

Link to audio file: FLAC
The audio file requires the following components:
  • A media player that can play FLAC files (VLC recommended)

Link to source package: 7-Zip
The source package requires the following components:
  • 7-Zip - for opening the package (free)
  • LMMS - for MMPZ file (free)
  • VOCALOID - for VSQ files (proprietary)

Monday, March 7, 2011

timezone differences suck.

I just realized that due to timezone differences, I only have less than a day to finish my album if I want to release it by the Wednesday deadline.

Fortunately, the first track is finished. I'm going to work on "mad world" next, since that's also semi-finished. Then I'll work on "OLD PLACES".

I'll probably finish "mad world" in time for the deadline, but the rest of the songs I really wanted to release will probably have to wait. I'm still trying to figure out the melody for "OLD PLACES".

Until then, let the music flow through you!~~

Saturday, March 5, 2011

upcoming song releases (if I can make it in time...)

so, yeah... I have at least five songs in my mind that I KNOW I want to release as an EP or whatever it's called.

unfortunately none of them are finished, and most of them are covers. personally I think using cover songs (especially for a producer's first MAJOR release) is cheating...

but anyway. hopefully, if I can finish everything by Wednesday, the set list will include the following (in order of current completeness):

Album artist: ALCE//PROJECT
Album title: First Sound from the West

Title Details
Dancing Queen Cover. English. Reference by A*Teens. Original performance by ABBA.
mad world Cover. English. Reference by Gary Jules. Original performance by Tears for Fears.
Melody's Story Original. English. Arrangement, lyrics, and programming by Alcexhim.
OLD PLACES (feat. Makata Ono) Original. Japanese. Arrangement and programming by Alcexhim. English lyrics by Makata Ono. Japanese lyrics by Alcexhim.

The album download will be released under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license. It will be a 7-Zip archive containing the source files (including Audacity project files, LMMS project files, VSQ vocal data, and lyrics in plain text) and of course the final compiled audio file in FLAC format.

Currently I have not been actually writing down any of the music, preferring to simply record it and program it on-the-fly. When I get around to writing the music down, I will also include the Denemo sources. Denemo is a free and open-source alternative to proprietary applications like Finale NotePad, which allow you to compose sheet music on your computer.

Right now, ALCE//PROJECT is Alcexhim, several keyboards, two guitars, and a Zendrum. If you want to get involved with the Project, please send me an e-mail at alcexhim@gmail.com and let me know what kind of talent you can bring to the Project (i.e., vocals, instruments, lyrics, melodies). If you contribute, the name you choose to represent yourself by will be listed in the title of the track.

first post!

well a friend of mine introduced me to blogspot, so here I am. between this and Twitter I think it will become a great way for me to write about more public-facing stuff, such as my musical and computer interests.

speaking of music, watch for an update here next Wednesday!!!

that is all for now :)