CGTalk > Software > Autodesk Maya > Maya Dynamics
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 10-10-2012, 01:13 AM   #16
PureMoxi
Slightly Spiffy Fellow
 
PureMoxi's Avatar
portfolio
Ryan McDougal
VFX Sup | CG Sup | Generalist
Zoic
santa Monica, USA
 
Join Date: Sep 2004
Posts: 151
Hairy Jackets and such

Quote:
Originally Posted by Duncan
If you want two way interaction with hair on an nCloth... say for something like a fur coat... currently you need to turn off point lock on the follicles and use a point to surface constraint. You may also need to constrain the first two vertices of the hairs if you have bend resistance on the hair.


Actually, I will be trying this out in the next day or so because we had originally look dev'd a few jacket assets (for differing characters) using vray fur which looks nice but runs into issues on anything that has a cache attached because the vray fur respects the original pivot of the object and not necessarily the point mesh when it comes to world location. (to the best of my garnered knowledge thusfar -- though im figuring out more so this could change by the day). So short of converting the fur to geo and caching it out at the same time as the cloth, I will likely be doing a furry (or hairy as it were) coat in the near future. I'll give this a try and report back on my successes and (more likely) failures...

Thanks Duncan for rocking it with the deets.

R
__________________
Ryan McDougal
Freelance Vfx Artist
CG Lead | Lighting/Look Dev | Generalist

Last edited by PureMoxi : 10-10-2012 at 01:17 AM.
 
Old 10-10-2012, 08:16 PM   #17
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,995
Quote:
Ah that makes sense, is this a feature or do you think its a bug that will be squashed in the future? its nice not having to generate constraints for each hair.


Technically it is not exactly a bug, but part of the way follicles are evaluated. When you do follicles on cloth you are creating a DG loop that will evaluated one frame out of sync. (usually loops in the DG are bad, and the graph automatically stops evaluation after one time through the loop, which is better than looping forever, but can cause synchronization problems)

In the future we might do something like allow an nObject, like an nRigid or nCloth to connect the the hair system. The hair system would then internally build a nucleus constraint at the start frame based on closest point on surface, rather than using the follicle node evaluation. In this manner the attachment would be a true nucleus constraint, so it would properly handle two way constraints. As well we would not need to update the follicles each frame during playback, which can be slow for a large hair count.

Another thing that could help is a constraint especially for hair, that attaches the base of the hairs to the object without needing a cv selection, and that properly handles twist in the case of stiff hairs with a rest shape that is not straight.

Duncan
 
Old 10-10-2012, 09:18 PM   #18
PureMoxi
Slightly Spiffy Fellow
 
PureMoxi's Avatar
portfolio
Ryan McDougal
VFX Sup | CG Sup | Generalist
Zoic
santa Monica, USA
 
Join Date: Sep 2004
Posts: 151
Quote:
Originally Posted by Duncan
If you want two way interaction with hair on an nCloth... say for something like a fur coat... currently you need to turn off point lock on the follicles and use a point to surface constraint.


So if I am understanding correctly, if I do have a large hair count...akin to your example of having a "hairy" jacket, I would likely create a tool that fits in step 3?:

1) select all follicles that I need to attach to the given nCloth surface (i.e. targeted "hairy" jacket)
(2) shift select the target nCloth surface
(3) run script of magicalness
+ this script would essentially do the following steps for the follicles in my selection:
(a) turn off point lock on all follicles
(b) select individual follicle & shift select jacket geo - [already an nCloth surface]
(c) go to nConstraint > Point on Surface
(4) apply finished nCloth nCache (simulated previously) to jacket geo
(6) refine and test nHair simulation using nCached jacket as the driving anim source
(7) cache out nHair simulation

Quote:
Originally Posted by Duncan
You may also need to constrain the first two vertices of the hairs if you have bend resistance on the hair.


I am confused on this point. By first two vertices of the hairs, do you mean inidividual cvs of each hair in the system? And why simply because there is bend resistance, does this become a possible necessity. Sorry for my missing a beat on this. If you could clarify, it would be helpful.

Thanks..

R
__________________
Ryan McDougal
Freelance Vfx Artist
CG Lead | Lighting/Look Dev | Generalist
 
Old 10-10-2012, 10:02 PM   #19
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,995
I don't think you need a magical script.
1. select all follicles
2. in channel box set pointLock to noAttach (affects entire selection)
3. nHair:convert selection: to start curve end cvs.
4. hit down arrow (moves to first cv selection)
5. shift select surface(nCloth output mesh)
6. nConstraint: point to surface

If you need the bend stiffness at the attachment you can create a second point to surface constraint for the second cvs. Just follow the above steps again (minus step 2) and instead hit the down arrow twice.

In testing this I did notice a problem... you need to rewind twice to get a good start state. There is still a dg loop because of the follicle connections to the cloth, so you might need to hit rewind twice before caching as a workaround.
 
Old 10-10-2012, 10:13 PM   #20
PureMoxi
Slightly Spiffy Fellow
 
PureMoxi's Avatar
portfolio
Ryan McDougal
VFX Sup | CG Sup | Generalist
Zoic
santa Monica, USA
 
Join Date: Sep 2004
Posts: 151
Thanks Duncan.

That makes sense. Thanks...

And as far as referring to it as a magical script...I just refer to all scripts as magical so that I keep positive. Most likely if I am writing scripts or having custom tools made it means I done a bit more trial and error than I would have liked...

R
__________________
Ryan McDougal
Freelance Vfx Artist
CG Lead | Lighting/Look Dev | Generalist
 
Old 10-10-2012, 10:24 PM   #21
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,995
Quote:
I am confused on this point. By first two vertices of the hairs, do you mean inidividual cvs of each hair in the system? And why simply because there is bend resistance, does this become a possible necessity.


If you just constraint the first cv of a hair then it is free to swing around the attach point, even if the hair is as stiff as a wooden stick. If your hair has no bend resistance this is not an issue, but if it does then you probably want to constraint a second cv. The point to surface constraint does not snap to the surface but maintains the distance and angle of the point with respect to the surface( unless you enable weld, which you might want to do for the constraint of the first cv to the surface). The angular stiffness of the constraint is controlled by the tangent strength on the constraint, which in this case would control how much the first segment of the hair can bend.

Note that if your rest shape is not straight then even with two cvs constrained at the base of a hair it can still twirl around. Thus if you need twist resistance you might need to constrain more than 2 cvs.
 
Old 10-11-2012, 01:20 AM   #22
PureMoxi
Slightly Spiffy Fellow
 
PureMoxi's Avatar
portfolio
Ryan McDougal
VFX Sup | CG Sup | Generalist
Zoic
santa Monica, USA
 
Join Date: Sep 2004
Posts: 151
I missed a beat there....I forgot about the twirling...Thanks for the clarification.

R
__________________
Ryan McDougal
Freelance Vfx Artist
CG Lead | Lighting/Look Dev | Generalist
 
Old 10-11-2012, 02:43 AM   #23
stooch
Lord of the posts
 
stooch's Avatar
portfolio
Dimitri Loginowski
VFX Artist + Designer
Handsome, LLC
Beverly Hills, USA
 
Join Date: Apr 2004
Posts: 2,029
Send a message via AIM to stooch
Quote:
Originally Posted by Duncan
Another thing that could help is a constraint especially for hair, that attaches the base of the hairs to the object without needing a cv selection, and that properly handles twist in the case of stiff hairs with a rest shape that is not straight.
Duncan


I like this idea the best, just position curves next to a surface and hit attach to surface, maya knows that you just selected curves and an nCloth and does the work for you. No need to make curves dynamic, no need to create folicles, it just makes them stick. But this shouldnt only work with curves, it should be a part of a new uber instancer that can assign unique vertex attributes per instance ( i know we all have to dream sometimes )

I am writing scripts to do this and it would really simplify not having to iterate through stuff and make constraints per curve.
__________________
From Russia, with love @ stooch.tv

Last edited by stooch : 10-11-2012 at 02:48 AM.
 
Old 10-11-2012, 02:43 AM   #24
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:06 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.