imagination XD

realizing dream


Leave a comment

MEMEME Dance Cover | Anime Unity Experiment Part I

itsudatte

MEMEME Dance cover animated with 12FPS convert to 24FPS via virtualDub.

Ah where i’ve been ?! Just came out from cave and decided to write an article on my blog. (^・ω・^ )

I want to test out / render my anime technique on Unity. Let’s get MEMEME by Teddyloid feat. Daoko dance motion as example. I still need to fix its shader toon effect cause it looks breaking. Maybe I need to make modifications on stereoarts.jp shader just like how I modify Unity-Chan shader. I’ve seen how Guilty Gear builds their 3D Anime style but I think it’s very very very long and complex (as always, my brain starts say “Ain’t nobody got time for that!”). So this is my own 3D Anime method.

Shader

On my earlier animation, I used modified Unity-chan shader. Since Stereoarts’ shader was compiled to cginc, it’s kinda difficult to modify it. I need to add Normal map and fix its toon ramp. You maybe say, Normal map is stupid to Anime, but you can make fake cloth fold by using normal map, I’m not going to make detail with Normal map, just fake cloth fold cause Anime without cloth fold is weird…

Unity Personal (64bit) - newshader.unity - New Unity Project - PC, Mac & Linux Standalone DX11
Unity-chan shader

  • Pros
    • Runs SSAO nicely (modified only)
    • Sometimes can give you really nice result
  • Cons
    • Not Support DX11
    • Can cause overbright sometimes
    • No outline color controller
    • Normal map has no function at all
    • No DoF / SSAO support (original one)
    • Many things to be set
    • Specular ?! Do you really think anime has Specular reflection ?

Unity Personal (64bit) - itsudatte.unity - New Unity Project - PC, Mac & Linux Standalone DX11_4

Stereoarts.jp shader

  • Pros
    • Support DX11 / Global Illumination
    • Full control
  • Cons
    • No normal map for fake cloth folds
    • SSAO makes it looks darker and unrealistic

Scene

So about 2 Cameras, I have to use Forward rendering cause deffered can’t render depth camera.
Why do you need Depth Camera ? Cause, if you want to have SSAO / Motion Blur / any other Post effect only on environment, then you have to split / make 2 cameras. 1 for environment and 1 for character. The minus is, Character won’t cast shadow. Your character / actor must have their own layer, for example “Actor” so in your Actor Camera, set culling mask to Actor only, depth = 1, and set clear flag to depth only. Remember to put Actor camera as a children of Environment camera. So you only need to animate environment camera.

For environment post processing, you can use effect like Depth of Field (but it wont affect actor), motion blur, SSAO, and even paint effect. Leave actor camera no effect.

Also, if you want to make games instead of animation, you can use deffered or just single camera and use baked AO instead of SSAO. There’s no such SSAO on anime character.

I’ve been made modified Unity’s SSAO that cull actors layer, but it doesn’t work and it only shows environment no actors.

Motion

Background motion blur

Background motion blur

Anime usually has framerate of 12FPS and doubled / repeat it to 24FPS cause most film has framerate of 23.976 / 24FPS. I much prefer full 24 FPS than doubled 12FPS. To convert 12FPS to 24FPS, I use virtualDub. First, I render 12FPS on Unity then import on VirtualDub (Source 12FPS and convert to 24FPS) and done, it seems like the frame was doubled to become 24FPS.

As on Guilty Gear, they draw every motion on every frame and use step interpolation. Although it looks very anime style, but it’s very complex and took very long time. Simply decreasing framerate will do the same even you use Spline interpolation animation like mine. “Wait! The game should run in 60FPS! You can’t simply decreasing framerate to 12FPS to have anime looks!” Man! Think, readers! Think! Decreasing frame rate is possible via FBX (on Unity it should be named “samples”). I’ve tried compressing keyframe / frame rate through FBX.

Anyway more research are coming soon!

Read more about MMD on Unity
https://laboratoriesx86.wordpress.com/2015/04/26/tutorial-mmd-4-unity/


Leave a comment

[Tutorial] HDRI as Unity Skybox

56I actually been used HDRI as skybox back then, but it wasn’t really good cause older Unity doesn’t has GI. Now Unity 5 has GI, so HDRI is good too for Unity.

You’ll need HDRI Image (JPG, if it’s hdr or exr, you have to convert it first), and Unity 5.

  1. 0First, if your HDRI is not JPG yet, then convert it to JPG by set the channel to 8bit.
  2. 1
  3. Import your JPG HDRI to Unity. Remember, 4000px is enough, cause you’ll get 2048px in Unity. Set your HDRI to Cubemap and Cubemap type to cylindrical or latitude bla bla bla…
  4. 2Now create a material. Click Assets > Create > Material
  5. 3 Set your material shader to Skybox > Cubemap
  6. 4Now drag your HDRI Cubemap to skybox cubemap.
  7. 5Now open Lighting tab, and drag your HDRI Material to skybox. Sometimes it might happens like this, but to fix it just change the cubemap type to Cylindrical (in this screenshot, I set it to Spherical).

Yep, it’s really simple. Simple as any other 3D programs.


Leave a comment

[Tutorial] IES Light on Unity

Without IES Light

Without IES Light

IES Light on Unity

IES Light on Unity

Back then, I thought IES light was useless, but when I’m making an interior scene for my Animation I notice a weirdness on ceiling lights. It was circle!!! There’s no circle shaped ceiling lights (except lightbulb)!

You’ll gonna need

    • IESviewer 2.9
    • Prtscr (Optional, if you don’t want to use MSPaint)
    • And IES / LDT light of course!

And this is how

  1. iesUnity2
  2. Go to IES Viewer and right click on your IES or LDR light and then click Render, or simply just press CTRL+R. Sometimes, the Render window just wont show, just delete .ini file and reopen IESViewer.
  3. iesUnity3
  4. Adjust brightness, Zoom, and Distance until you pleased with the result then press Prt Scn / Print Screen on your keyboard. If you don’t have PrtScr, then you’ll need to open MSPaint (Press Winkey + R and type MSPaint). If you have PrtScr, hold CTRL and left click the render window and it’ll automatically crop it.
  5. iesUnity4
  6. Paste (CTRL+V) on MSPaint and then crop the pasted clipboard like this. Save it as JPG or PNG.
  7. IESsssThis is my IES Light
  8. IESUnity5Now go to Unity and import your IES light. Set texture type as Cookie, Light type as Point, Mapping : Mirrored Ball, Glossy Reflection, Fixup Edge Seams, Alpha from Grayscale (IMPORTANT!), and filter mode to Trilinear.
  9. IESUnity6Go to Game Object > Light > Point Light, and assign your IES file to Cookie texture.
  10. IESUnity7
  11. Now look! IES Light on Unity! Although it’s not important, but it’ll make scene looks more realistic than a nonsense circle light.


5 Comments

[Unity] Blendshape Eye Controller (Look At, Random Eyes, and Random Blink)

Controlling eyes with Unity’s blendshape controller is difficult especially Unity likes to make a blendshape is a float value which harder to control and you can’t even control any movement like down or left. The picture above represents the movement of their eyes. See closely with that cyclops, her eyes were move following that ball, meanwhile the penguin just stuttered with the eye (Random Eye and blink).

You’re gonna need 4 / 5 basic eye blendshapes like Up eye, Right eye, Down eye, Left eye, and blink (optional).

pxeyes nyeyes pyeyes nxeyes

This is very useful tool especially for wannabe animator like me.

Download the script here,

Tutorial

  1. blendeye2
  2. Add this script on the root of your character.
  3. blendeye3
  4. blendeye2aAssign the number / ID of your Blendshape as in your blendshape mesh. I added isDebugging mode, that’ll ease you out finding the number of the blendshape.

  5. blendeye4
  6. After found the right ID, now you’re done! You can control eye movement via 2D Target now. But is that enough ? LOL NOPE!
    blendeye5
  7. To make it focus in 3D Way, create an empty game object and set it as target.
  8. blendeye6
  9. Sometimes this might happens (A certain eye moves in reverse way), to fix it, just invert the blendshape ID like Positive X Axis was 0 and set it to 1 and Negative X Axis was 1 and set it to 0.
    blendeye7
  10. Now look! Your character will focus on that object forever! But if that’s not please you enough, you can use Random Eyes mover (I forgot to make it move along with your target, so it’ll move along with the center of your head). But if you really do want random movement along your target, then just remove “target” line below randomizer target transform.
  11. if(!randomizerTarget){
     randomizerTarget = new GameObject("RNDTRG");
     randomizerTarget.transform.position = blendshapeEyeMesh.transform.position;
     target = randomizerTarget.transform; // remove this
     }else{
     target.position += Random.onUnitSphere * Time.fixedDeltaTime/randomCompressor;
     }
  12. And so do you want them blink ? just turn on Blinkable and your character will be blinkable. The higher value of blink speed the faster it’ll be. And what is Target Multiplier ? That’s just speed multiplier of your 3D target, how fast / sensitive their eye will follow your 3D target.


Leave a comment

Cosmos – kirin PV Realtime Rendered Animation with Unity 5

I’m going to post something not really important today LOL. Anyway I’m not only making games as I said on October 2013. I paused making games and learning / practicing my 3D Modelling / Animating skills.

I’d be thanked to Unity 5 for giving out Pro features and Global Illumination for free. Good Guy Unity. After Unity 5 released, I decided to try out make an animation using their Global Illumination.

It’s a really short animation demo based on a song COSMOS by kirin. I wont make it full version because this is not my song, I probably will get some misunderstanding. I also have a plan making anime / animation with Unity 5, but I still need a lot things to learn / practice like modelling and animating.

The result was really realistic enough for me.

Total 1000 frames+, took about 10 or 15 minutes to render all. About 0.5 seconds per frame. Yeah always better than 40 seconds per frame in 3D Animation Software renderer (It also got really poor quality).

I hope Unity will release cutscene director soon as seen in their Blacksmith video. Cause animating using Unity Animation editor is such a pain.

Sorry for overbright, I had some problem on mixing Unity chan shader with Global Illumination / bloom.

Setting up physics. I almost kill myself after seeing Unity’s rigidbody bouncing like hell.

Setting up particles and additional details.

Outdoor lighting with Unity GI was satisfying enough.

Animating session.


8 Comments

[Tutorial] MMD 4 Unity

Flawless, I wish Bullet Physic comes to Unity 5. VMD Anim + FBX Anim demo.

So I found out how to Import PMD / PMX to Unity. My old trick uses Blender, PMD Importer, and FBX Exporter. It was like this below, (mine was old anyway…) *keep scrolling for a simpler way* Recipe

  1. One Teaspoon of Blender (I use 2.71)
  2. A cup of Sugiany Blender MMD Tools
  3. a PMD Model of course
  4. And 1Kg of Patients

Stereoarts’ MMD4Mecanim

And it was really long and hard and it doesn’t even have an automatic physics configuring! And then I found this good guy posts about MMD4Mecanim which only import PMD / PMX to Unity Assets folder and it’ll automatically do the magic and poof! You got PMD model on Unity.

MMD4U9

Any motions can be played with this

Why MMD4Unity ? Isn’t MMD just enough ?

  • Unity has Mecanim, it’s easier (for me) to animate especially a lazy person like me (too lazy to reanimate every locomotion for every model)
  • Unity 5 now has full access of epic post processing. Depth of Field! Bloom! Motion Blur! Edge Detection!
  • And many more…

What you’ll need for MMD4Mecanim,

  1. Unity
  2. Stereoarts’ MMD4Mecanim (download is on MMD4Mecanim_Beta_*.zip)
  3. A PMD / PMX Model.

NOTE FOR PMD Users : Since I see this only supports PMX, you have to convert your PMD to PMX first. Download PMX Editor, then open your PMD file and save it as PMX.

And here’s how to import your PMD / PMX Model to Unity

  1. Download and extract PMD / PMX Model, copy whole folder to Unity Assets folder
  2. MMD4U1
  3. Then you’ll found there’s a MMD4Mecanim assets file (It has Unity logo)
  4. MMD4U2
  5. Read the License agreement and then click process.
  6. If you have a VMD File (MMD’s Motion data), copy your VMD data to Unity Assets and put your VMD to Animation Clip field.
  7. MMD4U3
  8. Then press process
  9. MMD4U5
  10. Always remember to set Animation Type to Humanoid then press Apply. If you not, no animation can be played unless you import a VMD file.
  11. MMD4U6
  12. Remember to select your Animator controller and Check Apply Root Motion and turn on Bullet Physics
  13. Now add your processed FBX to your scene, it’s now compatible for all your Mecanim like ThirdPersonHumanoid. If you want to add VMD to your mecanim, just Create a New state then put your anim-ized VMD there, and play.
  14. MMD4U7
  15. MMD4U8
  16. Flawless isn’t it ?


Leave a comment

[Blog Post] Unity 5 Realtime Rendered Animation ?

Everyone was making games with Unity, so I make animation with Unity. Unity was such a good guy greg, Unity 5 free now supports every post processing / pro features. So I decided making animation with Unity. One thing that confused me, why 3D Animation software doesn’t have Mecanim / autorig like features ? I know there’s one named “Motion builder”, but it’s not easy or good as Animeeple or Mecanim. Anyway, I know making animation is not easy, but my mission is to find the easiest, most efficient, fastest and quickest way to make animation, it’s not 1980 anymore.

At first I was going to use Physical Renderer but to render basic environment + 2 characters with my 3D Software physical renderer and it took 4 hours to render 150 frames. It was so long, meanwhile using Unity only took 0.03 seconds per frame (Final render took only 1 to 2 seconds per frame).

As I said before I have a plan on making Original Net Anime with 3D Software but haven’t decided which I’ll use. But before jumps making Original Net Anime, I have to practice or make animation experiments so the viewer can’t yell **** about it. Seriously, I make this free and I didn’t beg even a penny from you or begging for crowdfunding.

These are animation experiment I’m gonna making :

  1. Cosmos – kirin PV
  2. Wedding Dress – Tae Yang dance scene
  3. Kyoani Challenge (Rising, Run > Jump > Hanging, Turn back and scared, Manual Walk)
  4. Nichijou Challenge (Rock paper scissor)
  5. Mecanim Challenge (Running through corridors, Run + Jump on rooftop, Manual Walk / Run, Natural Motion + Facial)
  6. Project Imaginechan shorts
  7. Mitsubishi FTO TVC
  8. Full length PV of my music Colorshift 2 / Signed in
  9. Project Imaginechan Opening Intro
  10. A Certain Musical Vocaloid

Every experiments has different workflow, for instance, wedding dress, I’m gonna make the motion from MMD then export VMD to Unity and start decorating. Cosmos PV will only use Unity 5. Kyoani Challenge will use Unity + Cinema 4D.

Unity 2015-04-23 00-15-21-47.avi_snapshot_00.00_[2015.04.23_19.16.54]Unity 2015-04-23 00-15-21-47.avi_snapshot_00.07_[2015.04.23_19.17.18] Unity 2015-04-23 00-15-21-47.avi_snapshot_00.08_[2015.04.23_19.17.10]

Unity Personal - 2-ZoomIndoor.unity - New Unity Project - PC, Mac & Linux Standalone DX11 APR16CosmosPV (1)

Therefore, I still have so many things to research. Making animation in Unity isn’t easy as you see. You have to deal with Unity’s spline interpolation.

sacac

Plus to make your character walking in unity using mecanim isn’t easy like playing games, you have to know how much speed and crossfade time while walking unless you are using Nav Mesh like my realtime animation back then. I put “Speed” state on Mecanim which controlled by NavMesh current speed.

It is so hard that you have to predict when NavMesh will arrive to destination (that’s why it’s easier to use Transform cause Unity wont give you a Live Preview of Mecanim). But making animation using MMD is much easier I say and the physics also looks flawless.

MikuMikuDance

Follow

Get every new post delivered to your Inbox.

Join 506 other followers