imagination XD

realizing dream

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.


[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,


  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!
  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.
  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
     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.


[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.


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.


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.


Leave a comment

[Unity] Save Game with ArrayPrefs2

I already use this script since Catapult. This is the best saving script I ever use, but this is not really easy to use. I also developing my own format but it’s not really better than this. My own format will going to be use in Personified Fear or above game. Works with indie don’t worry.

You can see the script here.

It can save any types, but the most i liked is the Array function. It’s easier and much more safe.

For example, if you want to save sound volumes setting information (Javascript for example)

  1. In your Menu GUI Script, put var volumes = new float[5];
  2. Also set the awake / default value of volumes if Player haven’t set the volumes. like if(!PlayerPrefs.HasKey(“KeyName”)){ awakeVolumes[0] =; awakeVolumes[1] = AudioListener.volume; volumes = awakeVolumes; PlayerPrefsX.SetFloatArray(“KeyName”, volumes);}
  3. Then set on start / awake function, if(PlayerPrefs.HasKey(“KeyName”)){ volumes = PlayerPrefsX.GetFloatArray(“KeyName”, awakeVolumes); }
  4. On your Scroll bar GUI of main volume (volumes[1]) or music volume (volumes[0]), the scrollbar value must be volumes[0] for music volume scrollbar. Whatever you set it, when player press Save, just put PlayerPrefsX.SetFloatArray(“KeyName”,volumes);
  5. To delete user data, just simply put PlayerPrefs.DeleteKey(“KeyName”)

Okay, this is the script example of Menu GUI

var volumes = new float[5]; // volumes has 5 array of float with 0 value...
private var awakeVolumes = new float[5]; //must be same array with volumes above

function Awake(){

awakeVolumes[0] =; //music volume
awakeVolumes[1] = AudioListener.volume;

if(HasKey("Game Volumes")){
volumes = PlayerPrefsX.GetFloatArray("Game Volumes", awakeVolumes); = volumes[0];
AudioListener.volume = volumes[1];
PlayerPrefsX.SetFloatArray("Game Volumes", awakeVolumes);
volumes = awakeVolumes;

function OnGUI(){

// let's skip making window process
GUILayout.Label("Music Volume");
volumes[0] = GUILayout.HorizontalScrollbar(volumes[0],0.0,1.0);

GUILayout.Label("Main Volume");
volumes[1] = GUILayout.HorizontalScrollbar(volumes[1],0.0,1.0);

PlayerPrefsX.SetFloatArray("Game Volumes", volumes);
PlayerPrefs.DeleteKey("Game Volumes");



My New 2013 saver use something like XML but i’ll make own format to keep player to change every value on XML.


Get every new post delivered to your Inbox.

Join 483 other followers