The Circuit is ON!! XD

Literally four whole days (and nights) working on the components including separating models, reallocating actions, resetting smooth shading and UV unwrap, painting textures, sorting and cleaning animations, dealing with the hierarchies, and the codes…..

Animation

So now I eventually became quite familiar with Blender’s animation system and figured out how to store multiple clips for one file to Unity. In NLA editor I drag all actions I need into one track and delete others so that they won’t show up again in Action editor (become “0”, precisely, and disappear when opened next time. Cos I’d been confused why they were still not “0” although I checked all objects and no one was using them). And also, Unity’s clip list become clean now. Note that you have to delete the current action of the armature to <No Action> or all the clips would play the current action.

屏幕快照 2016-07-21 01.39.48

Therefore as all humans are using the identical rig, I can then append my prefab one (shape keys & modifier problem fixed) into each model file. I also found that it was because the parent-child relationship things that when I imported the models into Unity the components were always messed up in transformation. It seems that if I had more than one objects have parent relationships with a single object/bone, then it wouldn’t work properly. Like if I had both the hair and eyes set to the head bone, they’d fly away in Unity but if only hair, and eyes set to the eyes’ bone (moving paralleled), then everything’s fine. Neither .blend or .fbx. The same problem in complex animations such as something was set to a bone of an armature, and it had it’s own armature deforms or something set to it’s bones at the same time, then… well that’s confusing because the original models of human on horse animation work in the blend file’s default take (human has its own animation and is parented to the horse’s back bone); but when I had more complex things, I wasted hours on trying to figure out where went wrong, and failed.

My workaround is just separating things into single clips. The mount in one blend file, the human (if multiple humans, store them into clips in one fbx file, cos fbx can have shape keys animations), and birds on the head or something held by hand etc… then in Unity’s hierarchy, unfold their components, place the human as the child of the mount’s back bone, and place the others as the child of what it should be. Not really troublesome and very safe.

circus

Hierarchy

Allocate the animator controller to everyone who has animation. Then, each human(s) with the mount and the related objects is set to an empty game object. That game object carries the moving script and a box collider. There’s also a “circuit” game object being the parent of everything here and it’s at the centre of the pond, so everyone can have a local position around the pond which is easier for the script.

As there had been more and more objects in the circuit I decided to sort them into crowds, and actually they are in crowds in the painting as well. I used numbers as in the clock then I found there were exactly 12! Brilliant.

So in the code I call the transform.localPosition to get the angle and radius (it’s an ellipse though so z divides 0.7 :P). Then angle+=speed and localPosition goes to its cos and sin. And finally use a Quaternion.LookRotation(Vector 3).

屏幕快照 2016-07-20 01.22.24屏幕快照 2016-07-20 01.19.28

屏幕快照 2016-07-19 18.03.32屏幕快照 2016-07-20 12.00.30

So that’s about the important things this week, easier said than done! How painful it should be to learn something…. I love painting textures though! Although Blender always has awful unfilled seams.

OK it’s too much for gifs this time so here’s a extremely unclear screen grab!! Forgot to say, it’s still even not everything in the circuit actually T___T

 

The Riding Circuit

All those with quite special poses are done and I’m starting to set the first scene in Unity tomorrow for them.

I found I might have made big mistakes to sculp hair in really tiny messy faces topology which could result in great computing and that should actually be the work of texture and height map things… because of my lack of experience in modelling. And I still don’t know yet what I will be faced with when I do the texturing later…

The Encyclopaedia of Riding Poses

circus

Never think something is easy before you have ever done it!

But are you humans really alright doing this… on a horse…….

屏幕快照 2016-05-31 23.35.28

Blender really drove me crazy when I was firstly doing the animations with more than one pair of the rider, which was the two humans on a camel one. Because I used the same rider prefab appended into the model, the two humans were always in the same poses although they have respective rig. And if I made multiple actions for one model, like the common horse, then they always messed up with some actions seemingly gone nowhere.

So I stopped to look for some explanations systematically for the action editor to avoid keeping wasting my time trying to clear up things or losing my animations that I paid great efforts on….

屏幕快照 2016-05-31 23.43.35

This should be basic knowledge of using Blender but I still wrote it down here… So actually each single object can take only one action at one time. That object is the ‘user’ of that action, and each action can have multiple users which is shown as the number after the action’s name (4 in the picture). When no one uses the action, it will disappear after closing the file; and F is a fake user which means there will always be the user for the action.

So when I used two humans on the camel, they were identical because I was trying to make them in the same action… and they got alright after I allocated them into different actions. And I can keep many actions for one model which is obviously better for my importing them into Unity later.

But I was still quite worried if Unity can play the different tracks for one model since I had just done some simple single animations before. So in this project for the first time I opened Unity and created my project today lol.

 

 

The model imported into Unity is still separated by object as they were in Blender. And actually I just set the default take and it was exactly how I saved the animation (set it ‘legacy’ and loop time to make it keep animating). However, some small things in the models did not work properly, like the eyeballs. I made them separate objects to the body, but in Unity they came out of the head, and also I feel the relative position of the humans to the camel is slightly changed. This is not a good sign… but for now I just test if the animation can work in Unity so that I can go on with my work in Blender.

Anyway, so far more than a half of the circle has been done. I now get quite familiar with the process of parenting the rider prefab with the bone of the mount where he sits on, and then making the animation for other parts of the body.

Did very delicate key frames for not only the body pose but also the gesture and facial expressions, and cleaned up the problems in weight paint along the work. Now feel great satisfaction when looking at these together! Really hard work literally did nothing but this for the whole days but the time is still extremely tight for the tremendous pit I have dug for myself……….

Animation: the Riders

Decided to go on with completing circuit after the last set of work done, probably a much organised way of working with such a massive project. As many humans in that circuit have quite different poses, even interacting mutually, I suppose I should make everyone a single model although I cannot figure out if it is the right way of professional process (however, as soon as I was typing the last sentence I suddenly found that I should have made them in multiple animations of a single model instead of multiple models since many of them have just the same elements!!)

I did not work a lot this weekend but the first four pieces was quite smooth and I feel the process will be not as long as making all the quadrupeds. The only problem now is that in Blender, the frame rate went really slow to about 3-4 when the human object added, and I still have no idea if it is going to affect the Unity project – but I cannot do anything at this stage to change it even if it would do.