Friday, 24 May 2013

Finishing the Simulation

After rendering out both scenes yesterday and putting them together in a video using Adobe Premier Pro, I began work on Task 3 of the coursework. This morning I screen captured both my simulations running in Maya and put them together into one video. I then recorded a voice over to fit the video and explain what was used and why. I am currently writing my 500 word post mortem, and hope to have this finished up and submitted soon.

I've really enjoyed working on this project, and am keen to continue it into the next few weeks to make it a more realistic simulation. Even with the issues which I ran into along the way, I think if I stopped thinking things were more difficult than they actually are I could create a really nice simulation soon. I've learned the importance of sticking to a schedule, yet also the importance of adapting this schedule to suit for when things go wrong.

Wednesday, 22 May 2013

Emitting from nCloth - Part 2

I've finally managed to finish section one of my scene. The ncloth object emits water particles when it lands, then when it is moved from the four corners. The shader is slightly transparent the entire way through the render. Here's the first render, which I'm pretty pleased with so far. I may add a slight ambient light to the "back" of the cloth scene, as one camera movement is fairly dark.
Now to finish the running girl, and put the two videos together to be presented properly. This should be finished by the end of the week.

UPDATE: I realise the particles are nearly impossible to see on this compressed version. New lighting render is now here.

Emitting from nCloth

I became so obsessed with this difficult way of emitting from points in the ncloth, that I completely forgot about input meshes. So after weeks of trauma and hard work, it turns out emitting from my ncloth was as simple as turning it into an emitter. Needless to say I feel a little silly at the moment. It's still not perfect - currently far too many particles are being emitted from the cloth and at every face - but it's definitely getting there now. I just wish I had found this weeks ago - but alas problems arise and the way in which we deal with them can make or break a project. I just want to perfect this now to get it looking as good as possible

Tuesday, 21 May 2013

Caching


Today has mostly been spent caching, however the ncloth gets trapped between an arm and torso and starts to deform. Overall though I can see the progress starting to come through. I'm happy with what works so far, and believe once this problem is solved the scene will look good, it just takes a long time to create these caches.

UPDATE: After multiple unsuccessful attempts, I finally have an animation where there is minimal catching on the cloth - which I'm extremely happy with. I've now added the nparticle pool which I am caching - and with a resolution of 100 I believe this may take quite some hours. Will update again once it (hopefully) works.

Finalising Animation

One of my scenes is almost complete, with the final animation finished and the cloth movement being cached as I type this. All that needs to be added in is the n-particle pool and the scene will be ready to render out. The animation begins with a girl running with a skirt on. She jumps into a pool, the skirt becomes wet, and she gets out and begins to run again. My only issue now is finishing off the "interaction with other objects" section of my work, as I am still having no luck emitting from the ncloth. I have found a new piece of script which I am about to try, but I'm beginning to get impatient as it's the last thing I said I was going to do in my learning contract and I believe it is possible. I will invest many hours into this over the next few days and see what I can accomplish.

Monday, 20 May 2013

Ball Simulation

To show the dynamic properties of the wet cloth well, I've decided to both continue with my current scene, and also create a new scene involving an ncloth object landing upon a semi-sphere. This is where I am going to show most of my ncloth properties and nparticle effects.

I have been researching different ways to create an emitter from vertices in an ncloth but still to no avail. My next attempt is to create nparticles in certain places which will become visible once the cloth has landed. Then the ncloth object should move these particles slightly to appear as if they have come from the cloth itself. I am so far struggling with this as it seems the ncloth reacts to the particles, rather than the other way around. I will continue to look into ways to effect the movement of the particles before deadlines.


The ball simulation currently shows a cloth landing on a semi-sphere and then being dragged upwards. This is when nparticles will be left upon the table to emulate a trail of water. The cloth is then thrown about to show the interaction with movement and other vertices in the cloth. It also shows off the transparent shader on the cloth with a bright red semi-sphere and a wooden floor.

Tuesday, 7 May 2013

Animation

I've begun the animation to show off the movement of the skirt. Initially the focus has been on the movement of the character, then the implementation of the change from dry to wet cloth will be implemented. Once finalised, then the nPaticles will be added into the pool. I am not trying to create a perfect animation, however I want it to show off the change in cloth dynamics I've created. I'm fairly happy with the shader I have on the skirt at the moment, however I may edit some of the code in Notepad++ if I feel it doesn't look quite right once the final lighting has been put in place.

The only difficulty I may come across is changing the shader from dry to damp as I have not yet investigated if it's possible to key this, but I will find a soloution as soon as I can.

Monday, 6 May 2013

Project Delays

Due to a series of unfortunate and unforeseen circumstances over the last few weeks, the project has not made any real progress. I've started to piece together the animation that I wish to create to show off the wet cloth simulation. It starts as a girl is running or walking, falls into a pool of water (the pool being made of particularly sticky nParticles), gets out of the pool with the now "damp" material, and knocks into a few things on her way out.
I'm still investigating ways to get an emitter to stick to nCloth, but for now I decided to make the water particles fairly sticky. This means once the skirt gets "wet", the particles that have stayed connected to the cloth will slowly start to slide off the material until they eventually fall due to gravity. I really hope the lighting and shaders I use in the scene will create a nice atmosphere and hopefully a well executed final animation.

Friday, 12 April 2013

Particle Emitters

I've been trying to attach particle emitters to vertices in the cloth for a while now, with no luck. I've put in a basic "cheat" at the moment of a square particle emitter underneath the skirt, but this is just to get the idea of how it will look before implementing the proper mechanics. I've been looking at forums online and found help with someone who had a similar problem, but was moving a fire emitter up with a cloth hot air balloon. The soloution given was this code

$pos1 = `xform -worldSpace -query -translation pCone1.vtx[199]`;
$pos2 = `xform -worldSpace -query -translation pCone1.vtx[0]`;
$pos3 = `xform -worldSpace -query -translation pCone1.vtx[1]`;
$pos4 = `xform -worldSpace -query -translation pCone1.vtx[2]`;

pCube1.translateX = (($pos1[0] + $pos2[0] + $pos3[0] + $pos4[0]) / 4) - 0;
pCube1.translateY = (($pos1[1] + $pos2[1] + $pos3[1] + $pos4[1]) / 4) - 10.917;
pCube1.translateZ = (($pos1[2] + $pos2[2] + $pos3[2] + $pos4[2]) / 4) - 0;

Which unfortunately was not successful when changed to work with my project. I'm getting errors such as


// Error: water_emitter.translateY = (($pos1[1] + $pos2[1] + $pos3[1] + $pos4[1]) / 4) - 10.917;
//
// Error: Invalid use of Maya object "water_emitter.translateY". // 


which leads me to believe that there's a problem with the emmiter I'm using, or I'm not quite understanding what I'm meant to be translating with the vertices on the skirt. I'll do more research into this and see what soloutions I can find.

Thursday, 11 April 2013

Problems with Technology

After a disastrous lab session on Wednesday where I corrupted my maya file, I've learnt to save both maya binary and ascii form of my project, to return to previous nodes. Ah well, only one way to learn I suppose. Luckily however I had been saving all my presets onto my external hard drive, so it was move an inconvenience rather than a problem which would have restarted my project.

After a couple of weeks of work, I still wasn't getting the movement I desired in my cloth. I couldn't understand why there were some small inter collisions and jagged pieces of material. This week however I began watching tutorials on Digital Tutors and immediately found an answer to my problem. I was smoothing the wrong mesh - and instead of smoothing my input node, I was smoothing the Cloth shape, creating a simulation which looked jagged and wrong. I also had a low number of substeps in my nucleus, and by increasing this it changed the iterations per frame creating a more detailed cloth simulation. My plan is to continue watching these online tutorials as they appear to address many of the problems I've been having.

I've still had no luck in finding a way to connect a particle emmiter to vertices on an nCloth object, but will continue to research this in the coming week.

Wednesday, 3 April 2013

Wet Cloth Movement

I've been working on the movement of the cloth all day as I still hadn't found a realistic damp movement. I've now saved a preset which I'm really pleased with and believe it simulates movement of the wet article of clothing I'm after. The cloth is heavy, and collides with the character meshes much quicker than the dry setting. The cloth also has a slightly higher value added to the stickiness attribute, meaning the cloth clings to the legs before getting to heavy and separating itself again - either through movement or mass accumulated. Although the mesh isn't quite how I'd like it yet, I've saved (and backed up) numerous presets which I've played around with. I'd perhaps like to make a tool to be able to easily switch between "dry" and "wet" presets, but that would be something for extra time.
Now that I have this finished I can work on attaching my particle systems to certain areas on the mesh - which was earlier attempted this morning but an easy solution could not be found. Hopefully this can be solved quickly.

My research into this movement is here, with a test video.

Tuesday, 2 April 2013

Scripting and Dynamics

I've completely forgotten to update my blog so far, which isn't the best start. This does however mean this should be a fairly lenghtly blog post.

Most of my time since February has currently been filled with research, be it my own or into other papers online. Recently, shaders have been my main focus - to create an effective looking wet cloth shader which simulates not only the shine of certain damp materials, but the translucency as well.

Investigations into wet hair also appeared useful - as although different in most aspects, both hair and cloth are constrained by soft body physics and react in similar ways. For instance, in this clip, Merida's hair is obviously heavier (0:57) when damp. Cloth acts in a similar way.

The videos I've recorded for testing and research purposes are being uploaded to vimeo this week; displaying the differences between damp and dry materials. They also show the movements of a skirt which I intend to focus my modelling on.

I've decided to focus on a specific piece of clothing I own, and attempt to replicate it in Maya. This skirt has multiple layers of cloth, and is made out of a chiffon-like material. As a starting point I've created a single layer skirt with slight rigidity to simulate the volume of multiple layers. If I'm to continue this project, I may add in multiple layers and attempt to recreate realistic multi-cloth collisions. Dry cloth simulation with this skirt is currently implemented, and different techniques are currently being applied to create a realistic transition from dry to wet.

I've created a character in MakeHuman and imported it into Maya from a .obj file. I've then rigged this character so that I can animate it to display different movements and interactions between clothing and character. This gave higher mesh detail than I would have liked, but is a quick way to create a model without searching for hours online and having to worry about copyright and fees.

I am slightly behind schedule, and have not yet implemented particle effects to create drips from certain points in the material, but I have begun my report referencing my research first. I did however anticipate being behind schedule, and have left myself plenty of time in the next 3 weeks to get a suitable simulation together. This project is really exciting me at the moment, and I'm really looking forward to continuing with it not only after the semester but hopefully with intent towards honours projects.

Tuesday, 8 January 2013

Finishing The Rig

In the last couple of weeks I've been adding the finishing touches to my rig. All the attributes and constraints have been put in place, all problems have been fixed and skinning was started on the 26th.
Colour coding to easily see the different layers

I'd like to perfect some of the different twists in the skin, such as around the wrist and the elbow, but at the moment I'm really happy with how the rig has turned out. Now that everything is properly skinned, and I've reconstructed the eyes in the rig, I've colour coded all my different elements to make it easier for the rig to be used in future - joints are in white, control shapes in green and the mesh in a light pink. Although I plan to tweak some more of the skinning, I'd consider my rig finished now. I've really enjoyed this project, and hope to do more like it in the future to improve my rigging skills.