collapse

Welcome to VRTITTIES

A place for VR Porn Games, Oculus Rift Porn Games, Vive Porn Games, VR Porn Game Downloads & VR Sex Games.

Please feel free to discuss anything about Oculus Rift Porn Games, Vive Porn Games and VR Porn Games.

The answer to the anti spam question is facebook. If you have any issues registering then flick me an email or post as a guest. If you make an account you do not have to answer any anti spam questions after 10 posts.

You will need to sign up to the forum and make a number of posts before you can post links to other websites.

If you are ever looking at buying some VR Porn please use my affiliate links on the right sidebar.

Thanks,

VRTITTIES, New Zealand

Chelsearift@gmail.com


Author Topic: Tutorial - Importing MikuMikuDance figures into Unreal 4  (Read 14184 times)

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Tutorial - Importing MikuMikuDance figures into Unreal 4
« on: November 23, 2014, 04:53:23 PM »
Hi everyone,

This tutorial is more a documentation of my ongoing process of figuring these steps out than a finished tutorial - I haven't yet worked out all the steps, and would love it if anyone can fill in or correct anything I've missed so far.

First - tools you'll need.
MikuMikuDance - you don't really need this app, but it comes with a few starter models you can use for practice. Here's a link to a 64bit version: http://www.geocities.jp/higuchuu4/pict/MikuMikuDanceE_v924x64.zip

PMX Editor - This application allows you to edit .pmx and .pmd files from MikuMikuDance, and export them as .obj files, which can then be imported to UE4 or converted to .fbx files and imported. I haven't yet found an English translation of the app that supports .obj export. http://kkhk22.up.seesaa.net/tool/PmxEditor_0222c.zip

Autodesk FBX Converter - This application allows you to convert .obj files (and many other formats) to .fbx files: http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=22694909

And, of course, Unreal 4.

Here's what I've worked out so far:
  • Open PmxEditor.exe. It'll open into two windows - PmxView, and a file manager.
  • Select the file manager window, and Ctrl+O to open a .pmx or .pmd file.
  • Navigate to your MikuMikuDance UserFile\Model directory (...(yourpath)\MikuMikuDanceE_v924x64\MikuMikuDanceE_v924x64\UserFile\Model) and open a .pmd file.
  • You should see the model now in your PmxView window.
  • From the file manager, export the .obj file (Alt+F - X). Select *.obj as your export format.
  • A dialog will appear asking for the model scale. I've found that selecting 10 appears to come out at the right scale.
  • Save the file.
  • Open Autodesk FBX Converter, and select Add FBX Converter. In the left panel, select your .obj file and hit Convert.
  • You should now have an FBX file that can be imported into Unreal 4.

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #1 on: November 23, 2014, 04:56:02 PM »
Issues so far:
  • Materials need to be reconstructed in UE4. This doesn't seem like such a big deal, as you would likely have wanted to reconstruct them anyway.
  • The big one - This process doesn't seem to preserve skeleton and skinning information, which obviously limits the usefulness of the models, since they're coming in as static meshes. I'm sure I'm missing something here.

Would love it if anyone who's further ahead of me in this process could fill out what I'm missing or correct what I'm doing wrong, and help shape this into a useful step-by-step tutorial. Hope this helps people get started experimenting in the meantime.

burningshroom

  • VR Porn Fanatic
  • **
  • Posts: 12
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #2 on: November 24, 2014, 04:51:13 AM »
I really think you're the pioneer on this one. I can't even find someone on the dev forums working on this.

PornulusRift

  • VR Porn Fiend
  • ***
  • Posts: 91
    • PornulusRift
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #3 on: November 24, 2014, 05:49:27 AM »
Thanks for the info!  Do you know of how to apply vmd motions to the models after this?  With Unity, the stereoarts.jp plugin allows me to convert models/motions into fbx objects with just 1 click.  The textures and colliders just work also.
« Last Edit: November 24, 2014, 05:56:27 AM by fireflame »

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #4 on: November 27, 2014, 04:09:06 PM »
Doing some experiments with that now. I've discovered that if you use the stereoarts.jp Unity plugin, the resulting .fbx model can then be imported into Unreal. I've imported a mesh into the free version of Unity3D by following the tutorial here: , and then found the generated .fbx file in the Unity project's assets directory and imported it into UE4.

That part appears to have worked - the mesh came in with its skeleton and physics information intact, and its material assignments. I had to re-assign the textures to the materials, but that's not too bad a job.

I haven't yet tried pulling an animation into Unreal by the same process, but that's next. I'll keep you posted.

Meanwhile, it definitely seems like a viable option to use the free Unity3D app and MMD4Mecanim to convert your MMD files to usable .fbx files.

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #5 on: November 27, 2014, 08:40:02 PM »
Confirmed that this pathway does work for animations too, though I had to use Maya to prepare the animation for use in Unreal. I'll write a more detailed guide once I've figured out which steps are really necessary, but in the meantime, the method I used was this:
  • Use MMD4Mecanim to import MMD models and an associated animation into Unity3D 4.5 free
  • Find the generated .fbx in the assets folder and import it into UE4
  • Import the generated .fbx into Maya - Maya is able to read the embedded animation.
  • Select the skeleton root in Maya's Outliner, and export selected as FBX, using the settings recommended in Unreal's art pipeline docs.
  • Import the exported .fbx animation into Unreal, linking it to the skeletal mesh you previously imported.
  • At this point, you should be able to treat it as any other skeletal mesh in Unreal. (You'll have to rebuild the materials.)

It isn't much, but here's the result of the experiment so far:
https://mega.co.nz/#!z442TQJb!JnS_VjbgRNBWb4M4dwjUGhHVePrZfn6RX7aj1I5Msaw

PornulusRift

  • VR Porn Fiend
  • ***
  • Posts: 91
    • PornulusRift
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #6 on: November 28, 2014, 04:33:54 AM »
Thanks for figuring this process out.  It looks a lot more difficult than for Unity, but I think Unreal gives potential for much better skin shader effects.  Sadly, I think I'll have to stick with Unity, because its so much easier and I don't really have experience with any of these programs, been teaching Unity to myself recently.  I hope someone uses this method though to make some sexy MMD demos.

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #7 on: November 28, 2014, 07:21:40 AM »
Further info: It turns out that you can use the pmx2fbx executable from directly within the MMD4Mecanim package without having to go through Unity at all.
  • Copy pmx2fbx.exe into the directory containing your model. (I tried putting it in a path-accessible location, but it crashes when it tries to write the .fbx file. Putting the converter in the directory with the model seems to work. best.)
  • Open up a command console and navigate to a directory containing a .pmx or .pmd file you want to convert.
  • Invoke pmx2fbx.exe on the file (ex: pmx2fbx Angela_Model.pmd)
  • Import the generated .fbx into Unreal or Maya, and you should find its skeletal information intact.
There's definitely still some flakiness here though. The command line tool seems to succeed with some meshes and fail with others. Haven't yet figured out what's making the difference. If anybody else is experimenting with this stuff, please share what you're learning as well!

Edit: while this method works and preserves the skeleton, the bone and joint names aren't translated, so you'll have a tough time doing procedural animations (like Look At nodes) without knowing which bones are which. Think the best path is still .pmx -> Unity3d -> Maya -> Unreal 4
« Last Edit: November 28, 2014, 10:31:03 AM by Syncret »

OculusAnime

  • VR Porn Fan
  • *
  • Posts: 6
Re: Tutorial - Importing MikuMikuDance figures into Unreal 4
« Reply #8 on: July 17, 2015, 05:46:20 AM »
To use MMD models in unreal engine 4 I just use Blender with an addon named MMD Tools.
1. Import the pmx/pmd into blender ( you can import motion(vmd) on it too ).
2. Export FBX with animation.
And that's it :)

This is what I did for my game ( http://www.vrapps.co/game-1503-armin-getting-fucked.html ).
Only i'v modified it a lot and made the animations myself.

Blender: http://www.blender.org/
MMD Tools: https://github.com/sugiany/blender_mmd_tools

 

* Recent Posts

* Download VRtitties

* VRtitties Affiliate Links

* Forum Staff

Will admin Will
Administrator