Wednesday 27 November 2013

Dynamic Hair Tutorial Part 1 (Setting it up for dynamic connections)

Time for dynamic hair rigging using NURBS curves and dynamic properties for them.

Start off by having a mesh (this can be done before or after the dynamic curve is done, but you need the mesh to know where to place the joints).
Simple fringe and long and short side hair strands. (Poly hair)
Make sure the pieces are broken down to pieces that you want to move/not move. Clear history and freeze transform, part of keeping the channel box clear and your RAM empty. UV the mesh now or later, it does not really matter, since again, you can clean it before you skin the mesh to the joints.
Each hair strand is a different mesh/object
Place the joints, along the curvature of the hair mesh. Orient the joints, the default settings in Maya itself should do the trick.

X-ray joints, you can see I share the joints on the 2 front hair strands.
Time to do the curves, the tool I will be using is the EP Curve Tool not the CV Curve too. any settings would work, I prefer the Curve degree to be set to a "Linear" since it will create straight lines going from one joint to another.

Default settings
As I was saying, to have the curve go from one joint to another, you need to snap ("V" key) the control points to be on the joints.

Mesh with joints (left), joints with curve (middle), curves (right).
Make sure you have renamed your mesh, joints and curves for easy outliner reading and organisation before going to the next step.

Those with "_skinned" are joints to be skinned, mesh will have a "_GEO" string, groups will have a "_GRP" string.
Remember, NO history and transforms, delete history and freeze transforms before skinning. I chose to skin the "selected joints" to the selected mesh because if I set it to "joint hierarchy" the side joints of the strands of hair are going to be influencing the side hair strands, which we do not want.
Skinning method is set to "dual quaternion" because that skinning method ensures a better deformation in the mesh when the joints move. The rest of the settings I leave them intact.

Skin time.
Now, hide all the mesh and the joints, either isolating the selection or go on the viewport menu and view only the NURBS Curves. Select all the curves and go to the "Dynamics" tab, click on "Hair" and go down the menu to click on "Make Curves Dynamic". You can assign a new hair system to another clump of hair if you want, but I put the fringe under 1 hairSystem and the side hair strands as another.

Go to the settings of the tool.
Set the "Attach curves to selected surfaces" to OFF because there is no surfaces for you to attach the curves to.
Just to check, your Outliner should look like this before you go any further:


This concludes the first part of the tutorial: set up for the dynamic curves driving the mesh  (no connections yet)

Click here for Part 2

If you have any questions, you can leave a comment or you can send an e-mail to me. Thank you for your audience.

Sunday 17 November 2013

Siggraph week.

SIGGRAPH Asia 2013 is here, technically not here, it is in Hong Kong.

Hope you are not put down by the first sentence, SIGGRAPH Asia rotates its location ever year, on year 2011 it was in Hong Kong, 2012 it came here to Singapore, now it is back in Honk Kong. I also heard that the next Siggraph is going to be in another part of China (don't take my word for it, I don't choose the place they want to hold the events). 

I went to the 2011 SIGGRAPH Asia in the form of a study trip with my schoolmates. The trip was organised by the Polytechnic and we did get subsidies, although the price were still a little steep (no I won't talk about the price). It was pretty interesting, however we only get to go to the conference for 2 days out of the 5 days. Our pass is also a basic conference pass, so we could not really go any special areas, basically the electronic theater and the art gallery and some talks were open to us.

Other days were spent as tourist going around the city area and the malls and night markets. I totally forgotten about the names of the places that we went to, I am seriously bad at names. Tourist aside, we did visit the company of FATFace Productions (http://www.fatface.hk/). From my knowledge, they specialise in special effects, basically the green screen stuff, they do a lot of compositing and deal with a lot of layers in the compositing software. The layers range from matte painting in the back ground to painting set extensions from live plates to live action takes taken with the green screen.

We got to "invade" their small meeting room as the Chief showed us their showreel, mainly focusing on the film 风云II (The Storm Warriors). The the film has a lot of visual effects as the characters possess many magical attacks as they attack their enemies and at one point attack each other (if my memory don't fail me). Majority of the film is done in a green screen studio and later composited into the final film. It is amazing what technology can do this days and that the right people that can turn multiple things into a fantastic final product like what FATFace Productions did.

That's about it on SIGGRAPH Asia 2011, now to 2012.

On SIGGRAPH Asia 2012, the conference was held in the Expo of Singapore, a few stops from my house, I signed up as a student volunteer (SV) to help out in the conference and meet other countries SVs to make connections. Our seniors were there and a few of them were Team Leaders. My team leader (the overall one) is Nicolas (find him here!), he showed us his final year project and it was very inspiring, the style was interesting and appealing, although the film was in French, I enjoyed the whole thing as it grabbed my attention.

SIGGRAPH Asia 2012 in Singapore Expo as an SV, sometimes it was a pleasant experience, sometimes it was just an OK experience. The good part about the whole SV program is that we get a full pass, and we can go wherever we like (common sense wise do not intrude other people's personal space and restricted areas). The bad part about it was that sometimes the shifts were very packed and we did not get the chance to go wherever we want, and yes, the shifts were generated by a computer.

I dint make a lot of friends since I was not very engaging and not very sociable, I consider myself a better listener. I try to be more outreaching nowadays, because in this industry, being alone is the worst thing ever. At the same time I did not have any name cards to trade, that will leave a puny impression of me since there is not one thing I can base my existence in.

Thus, this year 2013, SIGGRAPH Asia 2013 in Hong Kong, I did not plan to go for it and plan to go to the next SIGGRAPH. Firstly, I want to get all my work ready to show people, get my name card ready to trade and also brush up my social skills (seriously). 6 members out of 8 on the FYP (final year project) went for the conference, some as SVs and some on the study trip. 

I will be staying back in school, running and creating hair for the characters. I created a connection system that allows the dynamic hair system to be controlled by a FK (forward kinematics) control chain. I first proposed this idea to a friend of mine, he was already doing the dynamic hair system and asked me if I could have any means to create a switch or an FK option. Thus, I proposed the system to him to make it more efficient. If I have the time and not mic shy I might even create a video tutorial for the rig. However, that might take a while, but I will post a picture tutorial at the end of the week if all goes well.

That is it for today, quite a long time to update though, at least I still kept the blog alive.

Monday 4 November 2013

Another month past and...

It has been a while (1 month) since I updated the blog, school had been real busy. Now I am serving my half a year (1 semester) of internship. Since I am involved in this 1 year final year project, I will be serving for the school.

Work wise, we are still behind time by around 2 weeks to 1 month. However, on the plus side, I'm churning out rigs faster than ever, and the animators can now start on the animation (actually they already started on the blocking sequence and finished the layout).

I encountered a problem with one of the working files, it usually happened when a non-referenced node is parented underneath a referenced node. This fosterParent node cannot be deleted no matter what, and Google did not really help a lot in removing the thing. The thing was created during one of the modelling stages, I did not check since another person was under that section and I was busy with rigging the main character.

fosterParent nodes
I found no method of safely removing all the assets from the file, I tried exporting all the selected objects. That merely caused the blend shapes and textures to screw up, basically all connections were on fire. However, I found out that instead of exporting, I could do the opposite, import the whole file (it was worth a try since I got this far).

I imported the file into another empty file (Maya's import system still have not worked for the placing of a string for clashing nodes, apparrently it keeps going back to prefixing all nodes.) Once the file has been imported, I can just delete the fosterParent nodes from the outliner with no other problems arising (none that have bothered me anyway in the future).

The problem about these fosterParent nodes is that they mess up the shots files and once the file is referenced in, it cannot be unloaded since it seems to get information from the already existing fosterParent nodes that something is being parented to the referenced in objects. Thus, it created a massive problem while doing the shots, and I had to take control of the situation and solved the problem.

There was also a large number of duplicated orthographic cameras created by some unknown methods. That was the first thing that shocked me when I opened the file, because the outliner was clogged up with that. Second thing is that they are not deletable.

Multiple duplicates of cameras.
For the cameras problem, it is very easy to solve as Google got me some useful sites explaining how to make them deletable through some simple script provided.

http://www.3dbuzz.com/forum/threads/171756-How-to-delete-a-camera?p=1412846#post1412846

schyzomaniac (kudos to him), a member of 3dbuzz forum provided a simple script to make the cameras deletable.

camera -e -startupCamera false persp1;

(name of camera to be deleted to be place at the "persp1" area)

 This script basically (from what I understand from reading it), makes Maya know that the camera is not a startup camera, and that it is not the default scene cameras (persp, top, side, front) and that it is just another normal camera. Thus in the end, one can just press the delete button to delete the extra cameras.

The other code which he provided was: 

lockNode -lock off persp1;

(name of camera to be deleted to be place at the "persp1" area)
 
From what I understand from the script is that this is to unlock the node and make it editable, basically if you want to delete it, one have to free it first

That is all for now, actually spent 2 days on this post,  hope I still have time to update this blog as the project goes on.