PDA

View Full Version : Idea for planar mesh hair creation


marcello
10-10-2003, 03:02 PM
Hello Maxers. If you've ever made opacity-mapped polygonal hair, you'll know what a pain in the glutes it is to get all the planes sculpted & positioned nicely & densely over a characters scalp (& avoiding intersections too). So, check this scene out...

http://mbortolino.netfirms.com/hair.zip
(r-click & save target)

-uses simcloth3 to lie the hair down in a reasonable-looking & quite predictable manner (hair meshes keep their initial curvature), & since it works on a control mesh below meshsmooth it calculates in seconds. This could form a base for collapsing & some final mesh tweaking, or even left as it is so more forces & simulations can be applied (cloth hair effects like squaresoft's final fantasy fmv characters).

note: in the example scene, you'll need to click 'start calculation' in the hair mesh's simcloth modifier.

So, that's the rough idea, but it'd be great to refine this to a re-usable system that could automatically make a full head of hair in a similar way to a proper hair plugin (where you'd typically set a distribution area & a number of 'model hairs' to interpolate & fill in the area).

My idea was to have a 'scalp' mesh that acts as distribution surface for the initial outstretched hair planes, & maybe uses a scatter-type modifier/script that can assign different hair plane sizes/lengths based on perhaps a greyscale bitmap or vertex colours applied to the scalp (so a simple scaling function based on the scalp's colour at its origin). I don't think the default scatter modifier does this, but maybe there's an existing plugin/script or partcle system...

Another important aspect is how the hair planes are aligned in order to get them to 'fall' into the correct place, eg. looking at the example scene you can see how curvature & orientation affects the fall direction. I've no idea how this sort of thing could be incorporated into an initial scatter or particle distribution.

I'm sure you clever buggers out there can think of something better, so it'd be great to hear your ideas!

marcello
10-10-2003, 03:36 PM
something else i just thought of: particle flow (in the upcoming max6) has a particle emission event based on a greyscale map, so maybe you could control the scale of instanced geometry particles via greyscale values (eg. long hair on top, short back & sides via light colours fading down to dark), & this would give you your stiff outstretched hair planes aligned to the normals of the scalp emitter (but plane particle orientation i'm not sure about: think about front-back oriented planes which work fine on most of the head, but not at the back).

if you were to run the cloth sim with just gravity, you'd get a rough centre-parting every time, so maybe you could introduce a wind force to blow it into a side-parting or even blow forwards a fringe...

Martijn Wijmer
10-11-2003, 11:19 AM
Yeah man, great proposal!! Can't wait to see a scripter picking up this idea. I'm doing some hair modelling right now, and it's a real pain in the ass. (I'm using the same technique you described, although i'm trying to mix it with P. Watjes hair-particle, but it's so time-consuming) I'll be checking this thread. Oh btw, maybe it's a bad idea, but since your idea was to have a 'scalp' mesh that acts as distribution surface, i thought that it must be possible to extrude the edges of the distribution surface so they can be used as hair. (With some bend parameters, subdivide parameters, deform parameters, instance UVW planar mapping, etc)

tonygib
10-12-2003, 06:51 AM
Hi,

I actually used much the same technique to do the hair on my latest character, I even made a tutorial on it ( http://antgib.f2o.org/tutorials/tutorials.html ).

But yes it is a little time consuming and animation is a bit of a pain. However it would be cool to be able to say position a few splines and then have a max script do all the rest. Unfortunately I am no scripter. I wonder if an expert has some time to kill :)

marcello
10-12-2003, 11:15 AM
>i thought that it must be possible to extrude the edges of the distribution surface so they can be used as hair. (With some bend parameters, subdivide parameters, deform parameters, instance UVW planar mapping, etc)

yep that would be a good starting point: to have a prebuilt scalp mesh so that you can determine the 'grain' of the hair, directed via the edge layout. i did some basic tests on this, & found a couple of initial problems. firstly the extruded strips can't be attached to the scalp when meshsmoothing (try it- the base of the strips breaks apart since they're single-sided). then there's the problem of uv mapping the strips, which would need to have a number of segments for later deformation (so you couldn't face-map all the planes).

but, i suppose you could always try this: select scalp edge loops (problematic, since you need e-mesh here, not e-poly) > extrude by edge (once only) > face map the new planes > detach planes from scalp > tesselate planes (preferably more divisions along their lengths, but dunno if that's possible in an automatic manner) > run clothsim using additional wind force for directional shaping (no need for extra bend deformers really)

>I actually used much the same technique to do the hair on my latest character, I even made a tutorial on it ( http://antgib.f2o.org/tutorials/tutorials.html ).

great stuff! & that bio-skin script looks very handy, thanks :)

Martijn Wijmer
10-13-2003, 09:04 AM
Well, it seems like no scripter is willing to is burn his fingers on this one. Too bad. Maybe you could post this thread in the 3dsMax MaxScript forum? (Or i can do it for you, cause i really like some good script-guru to pick up this idea)

marcello
10-15-2003, 11:05 PM
>Maybe you could post this thread in the 3dsMax MaxScript forum? (Or i can do it for you, cause i really like some good script-guru to pick up this idea)

yeah go for it, that'd be great. i'm going to go with something like shag-hair for the time being, but if you get any more ideas or results elsewhere, post a link here, thx!

bupaje
10-15-2003, 11:44 PM
I probably shouldn't post any suggestions as I am total noob with max (week 3) and 3d in general -only know about 5% of the tools and modifiers- but I had a wild thought... could it be possible to create something like a 'hair gizmo' like you have for flame and apply a hair effect that way?

thorn3d
10-16-2003, 01:50 AM
Currently i'm going with an automated approach, and then doing a lot of manual placement cleanup after the fact... takes awhile, but seems to work better than various methods of selecting a lot of polys and extruding down a spline, using a bend deformer, etc.

Latest test...

http://www.neverwake.com/talia2003.jpg

thorn

Martijn Wijmer
10-16-2003, 09:32 AM
Well, that looks promising. Could you share your method with us? I'm very curious.

CGTalk Moderation
01-16-2006, 07:00 AM
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.