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 ^_^