CGTalk > Software > Autodesk Maya
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 12-04-2012, 01:16 AM   #1
trashtalk
Lord of the posts
Julian Howard
Saint Louis, USA
 
Join Date: Nov 2005
Posts: 519
Combining nCloth with nHair

Hi all.

Is there anyone that has combined nCloth with nHair? Should there be any issue with this?
For example extruding a circle on a curve so that a tube is made, keeping the curve but assigning nCloth to the tube shape.

Then having a way to toggle or alternate between nHair and nCloth collisions (as to which one is taking priority).

Is this doable?

Thx
 
Old 12-05-2012, 12:44 AM   #2
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,995
Not sure what you are trying to do, but I don't see any problems. You could use the collision layer, perhaps, to switch priority, but it depends on the desired behavior.

The main problem people hit between nCloth and nHair currently is when they create hair on an output nCloth mesh. (for example a fur coat) The follicles are locked to the the mesh based on a point on surface call done outside nucleus and this results in an error where the hair attachment lags a frame behind. (if instead one had pointLock OFF on the follicles and used a point to surface or component to component constraint for the attachment it would work OK) Or in the above case if one didn't need the hair to push the cloth one could first cache the cloth before solving the hair.

At any rate, outside of the case of attaching follicles to cloth, nHair and nCloth both solve together nicely.
 
Old 12-05-2012, 03:19 AM   #3
trashtalk
Lord of the posts
Julian Howard
Saint Louis, USA
 
Join Date: Nov 2005
Posts: 519
Thanks for the insight, sir.

A few things though (this is just for clarity of what I'm attempting. You mentioned the caching method. I need to check that and the layer stuff):

https://vimeo.com/51179165


In the above link, the author talks about not being able to break links to an nHair system as one caveat. I need to update hairs (or sections of hairs that have been turned into tubes) in my hairsystem based on either the surrounding nCloth (from converting polygonal extrusion tube into ncloth), so this "looks" to be an issue AND from being brought back via GoZ. I think I'll need to do some unlocking translations and stuff here. We'll see.

Basically, I need to go back and forth between zbrush and the tube shaped follicles (or tube shaped nCloth). I don't see how I could update the shape of the collision tube thing that runs down the center of nHairs, so it looks like the nCloth tube method might be better, maybe? Updating shapes and retaining collision without having to tweak each one (but only if I just wanted to).

http://vimeo.com/40397247

This one looks like the collision tube can be reshape with some precision.

Just trying to clarify.


Thanks again.

Last edited by trashtalk : 12-05-2012 at 03:23 AM.
 
Old 12-05-2012, 07:41 PM   #4
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,995
I'm still confused about what you are trying to achieve. It sounds like you want to have a hair simulation, extrude tubes based on the hair to create a mesh, then make the mesh nCloth. You want the cloth to then affect the original hair positions?
Is it that you want a more complex geometry to correctly collide but want an underlying curve to act as a spine for the simulation?

If you want two way coupling between the cloth and the hair you should not derive the cloth from extruded hair but rather us a component to component constraint between a completely separate cloth tube object and the hair.

Note that if you want geometry from a hair a better method than extruding might be to use pfxHair output with a single hair and zero clump width, then assign a pfx brush to the hair. On the brush make the global scale = 1.0, the type mesh and set the desired cross section resolution in the mesh attributes for the brush. Then do convert: pfx to poly. The resulting mesh will have better twist properties than an extrude, and will also exactly match the hairWidth on the hair system. You can use subsegments on the hair system to smooth along the length of the tube and cross sections to smooth along the circumference.

If you explain the final effect you are trying to do I could better help.
 
Old 12-06-2012, 04:39 AM   #5
trashtalk
Lord of the posts
Julian Howard
Saint Louis, USA
 
Join Date: Nov 2005
Posts: 519
I'm glad you brought up pfxHair. Actually this link is closest to what I'm trying to achieve:

http://www.youtube.com/watch?featur...d&v=LIjuYWgF8mg

http://www.phungdinhdung.org/Studie.../GMH_index.shtm



In it, he speaks of being able to make tubular shapes that one might send to zbrush to sculpt and then send back to update the predefined tubes in Maya. I'd like to start with known tubular shapes from Maya, then convert to pfxHair strokes, partly needing to compare and send resulting guide hairs to systems that use Shave (and C4D). I'd rather be able to have something as close to tubes as possible that can also have a known controllable spline curve AND broaden or have very thick shapes, that again could come from zbrush sculpting. Then, fill the tubular shape (that might be thicker at the base, then taper) with fill hairs in Maya.

So if I can somehow combine or tweak your suggestion in your last statement with the link idea, that would be great.

I'd thought I wouldn't be using pfxHair until you reminded me of those specifics.
So to conclude, I want to use the above GMH scripts link now, with spline curves down the middle AND with collision controls.

It would be cool to use pfxHair strokes to control existing strokes or tubes (I know....this might sound strange).

Thx again.

Last edited by trashtalk : 12-06-2012 at 06:04 AM. Reason: forgot something
 
Old 12-06-2012, 07:47 PM   #6
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,995
If you use thick hairs converted to poly the way I described you will get nice smooth curving tubes that collide correctly. You can vary the width of the hair per follicle using the follicle scale attributes. The change in width along the tube is controlled by the hair width ramp on the hair system.

It is more problematic if you want to have flattened tubes. You can use the flatness attribute on the brush, along with the twist, but the collisions will be for non-flattened tubes. Perhaps you could use hair for the basic tubes then for more sculpted or flattened shapes use nCloth. A simple planar strip can work well for flattened sheets of hair. For shaped cloth hair tubes something that might work OK would be to create a simple cloth strip a spine, then do a constraint between the cloth tube and the inner spine strip.( turn off all collisions on the spine and make its mass higher so it has more influence). You could instead use hair for the spine, but the constraint connections would then not have a sense of twist, and could get messed up for extreme collisions.

Collisions between hair and the cloth should work fine. You might also consider having several hair systems.. one for very fine hairs, one for medium thickness tubes and one for very large tubes.
 
Old 03-11-2013, 11:28 PM   #7
trashtalk
Lord of the posts
Julian Howard
Saint Louis, USA
 
Join Date: Nov 2005
Posts: 519
Quote:
Originally Posted by Duncan
Note that if you want geometry from a hair a better method than extruding might be to use pfxHair output with a single hair and zero clump width, then assign a pfx brush to the hair. On the brush make the global scale = 1.0, the type mesh and set the desired cross section resolution in the mesh attributes for the brush. Then do convert: pfx to poly. The resulting mesh will have better twist properties than an extrude, and will also exactly match the hairWidth on the hair system. You can use subsegments on the hair system to smooth along the length of the tube and cross sections to smooth along the circumference.


When you say "use pfxHair output" do you mean use the default black brush, change its attributes to zero clump width, then assign it? (But wouldn't it already be a single hair or no?).

It seems like you're saying take an existing pfxHair brush, change its attributes, then assign the new changed brush to any curve I make, correct?

Last edited by trashtalk : 03-11-2013 at 11:37 PM.
 
Old 03-12-2013, 04:51 AM   #8
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,995
By "pfxHair" I'm referring to the node of that name created with a hair system created with paint effects output instead of output curves. If you created the hair system with output curves you can still assign a brush to the hair system( use the default black one ) which will create the pfxHair node if the hair system doesn't have one. Note this is assigning a brush to the hair system, not to the output curves of a hair system.

The pfxHair node is like a stroke node. Its input is the hairs in a hair system, instead of the path nurbs curves the stroke node uses. The pfxHair node has an internal default brush it uses if no brush is assigned. Some of the hair system attributes override brush attributes. For example hairWidth overrides brushWidth.
 
Old 03-13-2013, 10:34 PM   #9
trashtalk
Lord of the posts
Julian Howard
Saint Louis, USA
 
Join Date: Nov 2005
Posts: 519
I see, you mean one of the regular node tabs that gets added anyway, okay.

On a related issue, you asked for more clarity to what my goal is, so here's link:
www.garynoden.co.uk/ARCHIVE/tutorials/QnA_91.pdf

I'd like to make braids, from curves portions. Let's say I'm making a four strand braid, I place my 4 curves for the base repeat pattern the way I want it. From the QnA article above, I'd need lattices along each of the four curves if I wanted them to be tightened.

My question is do you see any problem with using a wrap deformer as my lattice here?

Second, is there a way to script the collision solver shape to automatically match the shape of the wrap deformer?

Also, I know that paintFx brush have built in modifiers, but can I create a deformer (like a wrap deformer) for custom use inside the brush?

Which brings me to, are you familiar with the soup-dev node stuff? It seems they might have something like this.

Thx again

Last edited by trashtalk : 03-14-2013 at 12:14 AM.
 
Old 03-13-2013, 10:34 PM   #10
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 02:25 AM.


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