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.