SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Dynamics & Special Effects / Constrain nHair follicle to nCloth

Dynamics & Special Effects Maya Particles, nDynamics, Fluids, Rigid Bodies & General VFX

Join the conversation. Reply to post
 
Thread Tools
17-08-2015, 08:41 PM   #1
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Constrain nHair follicle to nCloth
I'm trying to get a transform thingy to follow an nCloth mesh. Making use of a hair follicle has been used many times for this sort of thing (e.g. attaching buttons), but for some reason I can't get it to work.

Can someone verify for me whether (in Maya 2015 or 2016) an nHair follicle will follow a dynamically simulating nCloth?

I'm following this tutorial, which should work: http://knowledge.autodesk.com/suppor...ipper-htm.html
Except in the tutorial's case, they're using a classic hair follicle I believe. With my reproduction, the follicle doesn't move.

This page talks about nCloth and nHair but they don't say explicitly that the follicle will follow: http://knowledge.autodesk.com/suppor...18CBF-htm.html

In all my tests the hair curve itself follows the mesh, but the follicle stays static.
  Reply with quote
18-08-2015, 07:52 PM   #2
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Could anyone verify this?
1) Create sphere
2) Convert to nCloth (should fall down)
3) Add hair to it
4) Playback

Is this expected behaviour? Shouldn't the follicles follow?
Attached Thumbnails
Click image for larger version

Name:	follicles.PNG
Views:	357
Size:	71.9 KB
ID:	56867  
  Reply with quote
20-08-2015, 08:51 AM   #3
daverave
The thin red line
 
daverave's Avatar
 
Join Date: Aug 2009
Location: England
Posts: 4,472
Stwert not sure this will help you but you can create two spheres one to have the hair system the other two have ncloth then use the wrap deformer to parent the hair to the ncloth...................dave
__________________


Avatar Challenge Winner 2010
  Reply with quote
20-08-2015, 08:53 PM   #4
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Thanks Dave, that might get me somewhere. The problem is not necessarily that the hair doesn't follow (it does) but that the follicle nodes don't update their transform channels. I don't actually need the hair, just a node that's locked to a spot on the cloth to which I can parent or constrain other stuff.

I'm mostly confused because the zipper tut I posted above clearly works this way, and now nParticles somehow have stopped behaving that way. If I create a bend deformer or otherwise deform the geo, the follicles do follow, just not with cloth.
  Reply with quote
20-08-2015, 09:31 PM   #5
daverave
The thin red line
 
daverave's Avatar
 
Join Date: Aug 2009
Location: England
Posts: 4,472
Hi Stwert
Here is the old one I used to use, not sure it will work on maya 2016, see link.................dave

http://area.autodesk.com/blogs/dunca...surface_script
__________________


Avatar Challenge Winner 2010
  Reply with quote
20-08-2015, 10:13 PM   #6
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I think I found that script earlier which by reading seems to do exactly the method I'm trying to set up by hand. So it will be interesting to see whether the script works and what it sets up.
  Reply with quote
25-08-2015, 02:21 PM   #7
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I may have found a solution (which is weird because I thought I tried this earlier). Setting up the nHair automatically connects the follicleShape and the outputStartCloth mesh, even if the outputCloth is selected.

So, I just rewired the connections (.outMesh > .inMesh and .worldMatrix[0] > .inputWorldMatrix) and the follicle now follows. I though it might screw up the simulation, but it seems to behave the same as before... for now at least.

The below image has the outputStartCloth mesh at the top (the input mesh) and the outputCloth at the bottom, with follicle AND hair attached.
Attached Thumbnails
Click image for larger version

Name:	follicle_nodes.PNG
Views:	407
Size:	52.6 KB
ID:	56870   Click image for larger version

Name:	follicle_solution.PNG
Views:	356
Size:	16.9 KB
ID:	56871  
  Reply with quote
25-08-2015, 02:31 PM   #8
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
So it looks like the script you shared, Dave, also does the same thing. Create a follicle and manually connect the out mesh (the script is actually ignorant of the mesh type, whether start mesh or output mesh, I think) and connect those two attributes together. So the script works.

I get the sense that the regular nCloth & nHair behaviour has changed. I wonder what and why?
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help... PC freezes during ncloth cache and/or ncloth timeline playback luciferr Dynamics & Special Effects 5 01-08-2017 08:21 PM
Resizing/rescaling ncloth with character to fit scene luciferr Dynamics & Special Effects 2 10-11-2016 07:59 AM
nHair Outliner Issue mendosa69 Animation 0 18-12-2015 01:22 AM
ncloth shader problem sungodd Maya Basics & Newbie Lounge 3 31-01-2014 10:07 AM
nCloth on Bind skin GeorgiStamenov Maya Basics & Newbie Lounge 2 20-12-2013 11:36 PM