Ogre+MMD+DS

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
cloud
Gremlin
Posts: 196
Joined: Tue Aug 08, 2006 6:45 pm
x 14

Ogre+MMD+DS

Post by cloud »

lo' fellow ogreteers

My pet project for a while now has been MMD (MikuMikuDance) + Ogre3d (of course) + deferred rendering, for those that don't know what MMD is

From the wiki

MikuMikuDance, very commonly abbreviated to MMD, is a freeware animation program that lets users animate and create 3D animation movies, originally produced for the Vocaloid character Hatsune Miku.[1][2] The MikuMikuDance program itself was programmed by Yu Higuchi (HiguchiM) and has gone through significant upgrades since its creation. Its production was made as part of the VOCALOID Promotion Video Project (VPVP).[3]

video :


I'm using these libs to load and animate the models

ofxMMDX (https://github.com/r1cebank/ofxMMDX)
ofxMMD (https://github.com/hiphi/ofxMMD)

scene is NanokoStageMMD_Digitrevx (http://digitrevx.deviantart.com/art/Nan ... -480395752)

post render effect based on
HgSAO https://research.nvidia.com/publication ... obscurance
DOF http://http.developer.nvidia.com/GPUGem ... _ch28.html
the anti-alias edge, atomspheric scattering also from GPUGems (GPUGems is my bible)
lighting based on the MMD adult shader
+ ...

some points of intrest

If you look at the plate nanoko is standing on its alpha transparent gets lit and receives post render effects like ambient occulsion. Theres also a sign somewhere in the background that has both back and front transparency. This is done by making use of the stencil buffer to target transparency areas of the screen and then building up a blended version of what are essentially layers. Theres also alpha rejection and alpha splat, but there really not very different from base material. I use a kind of mega shader with ogres abstract materials as an approach to generate the base materials in code to avoid multiplicity effect,

add(script, MT_ALPHA_REJECTION, TUT_ALBEDO | TUT_NORMAL | TUT_SPECULAR, IT_HW_INSTANCING_VTF);

every material is then inherited from a base and things like texture name culling mode etc are set.

The shadows are PSVSM, you can see the artefact where one shadow caster cast over another most visible under the plate I could kill this but in doing so I lose the soft edge of shadows sadly, transparent objects can also cast shadows, but since I don't have an alpha term in the shadow map they can look little odd for low alpha values.

There really are when I think about it quite alot of problems still left to solve (fun)

Also the frame rate is a bit poor because of how I'm doing the software skinning, thats my fault really not the libs, even so hope you enjoyed the video.
hydexon
Gremlin
Posts: 164
Joined: Sun Apr 14, 2013 8:51 pm
x 10

Re: Ogre+MMD+DS

Post by hydexon »

Wow, really interesting, i was researching about how to import PMD files to OGRE's mesh format, but i don't know openFramework had some third-party libraries to load those.

I'm using these libs to load and animate the models

ofxMMDX (https://github.com/r1cebank/ofxMMDX)
ofxMMD (https://github.com/hiphi/ofxMMD)
Just out of curiosity how do you load and animate the models?, you use the original models into OGRE or export them as OGRE mesh files and skeleton files?,i really i want to know those details.
cloud
Gremlin
Posts: 196
Joined: Tue Aug 08, 2006 6:45 pm
x 14

Re: Ogre+MMD+DS

Post by cloud »

wellp I just load the model files and write the data into hardware vertex buffers as needed, you've got face morphs and physics so unless you want to do an awful lot of work I'd go with this approach. I'm write data into a temporary buffer and from that into ogres hardware buffer, hardly the best approach, but I wasn't too concerned about speed.
hydexon
Gremlin
Posts: 164
Joined: Sun Apr 14, 2013 8:51 pm
x 10

Re: Ogre+MMD+DS

Post by hydexon »

cloud wrote:wellp I just load the model files and write the data into hardware vertex buffers as needed, you've got face morphs and physics so unless you want to do an awful lot of work I'd go with this approach. I'm write data into a temporary buffer and from that into ogres hardware buffer, hardly the best approach, but I wasn't too concerned about speed.
Must be an pretty painful to work with only HardwareBuffers, yeah usually i wanted to try exporting PMD files to the OGRE Mesh format, but thats is a whole level.
Post Reply