Jump to content

Hair


Stremik

Recommended Posts

All open primitives will render with mantra. There are no special considerations, like in PRMan with it's 3, 7, 11 vertices and it's Curve Basis, etc. Just render and WYSIWYG...

The only thing you should do is modify the width of the ribbon by adding a "width" attribute with the AttribCreate SOP. These ribbons can be shaded like tubes if you apply the VEX Hair shader.

Enjoy:)

J.

Link to comment
Share on other sites

Also, in the codex somewhere... er.... here is something called 'width magic' by peter bowmar. Its a vex sop that allows you to change the width attribute across the length of the curve. So you can get nice tapering hair pretty easily.

Marc

Link to comment
Share on other sites

Ok. Tried it and it works perfect!Thank you!!! :D

But what if it's a model of a neandrthal? :rolleyes:

As far as I understand the model would have to be devided in to millions of tiny polygons.This will definately bring the system to it's knees before it even gets to the actual rendering! Is there a workaround?

Another question.

How can a flow of hair be contolled?

I'm aware of rotation parameters :) but modifying it would rather affect all hair at the same time.

How it can be done so the hair on the back of the neck woud stay on end, when at the same time, on thighs hair woud be oriented downwards,flowing along the surface of the body?

Link to comment
Share on other sites

Hi Stremik

I believe there was a scripted subnet built by Jeff Wagner floating around the office at some point. What it did was birth particles evenly across the surface of the geometry and then copied curves to it. The angle of he particles was controlled by the normals.

So it was a relatively simple matter to comb the normals in the direction you wanted.

I'll see if I can dig it up and fix it for distribution :)

Marc

Link to comment
Share on other sites

Well, guts is a strong word. All it is is a scripted subnet.

I can even explain how to do it yourself. It involves the measure SOP and the birth particles by attribute setting.

Heres something for you to try yourself :

1. Make a polygonal sphere

2. Add a comb SOP and comb the normals whichever way you want

3. Add a measure SOP and change it to area.

Side Note: The measure SOP will calculate an even area across multiple polygons and patches. This is invaluable to get an even distribution of particles across an object.

4. Goto pops and add a source pop.

5. Change the birth to 'Surfaces(attribute). Leave the attribute as area, since thats what you created.

6. Change impulse activation to $FF==1 and the rate to 1000. Change const activation to 0

7. Add a state pop and turn on 'stopped', set the value to 0.

Now all you do is go back to SOPS and add a pop sop and a curve sop (just make a small 4 point curve). Now copy the curve using the pop sop as the template and you've created a head of nice hair which is controllable by combing the normals in different directions.

The only thing that Jeffs had that was better was the ability to randomise the copy scale so that some hairs would be longer than others.. .but thats simple enough to achieve.

He also made it a scripted subnet so it had a nice interface on it... But other than that its pretty much the same.

Have fun.

Marc

:ph34r:

Link to comment
Share on other sites

Hmm...since we're on the topic of hair....

I found that the good ol' texture-mapped planes work well too!....if artfully implemented, it reduces the overhead : one particle=a clump of hair....

mixing and matching both techniques could prove useful: grids are good for large scale coverage, (ie: the body), and localized hi-density curves for the head and elbows and such...where you need the dynamics at work....

-talk about dynamics, I tend to find the curve>spring>resample technique kinda heavy to implement.....it does work but imagine every single hair going through this pipeline (am I making any sense?...it's used to animate the hair to the model)

-anybody knows if the fedback SOP will be back? I know it would introduce some instability if used, but would be nice to have as an option...sigh...could give quite a few alternatives....

*phew*!

sorry...brain boiling...gotta cool down...

Cheers....

Link to comment
Share on other sites

mmm....since we're on the topic, I seem to remember a while ago (in H4 Demos, I believe), a hair setup that doesn't use stamping.

It would start up the same way (seed a surface with particles let's call them "seed particles"), then birth off other hair particles out as a stream from the seeds, and then fit a curve to every n particle of the hair particles

(this would create a curve out of every seed particle, hence the no need for stamping part) then resample the curves to conserve hair length and....voila! particles reacting to dynamics!....combing the normals still works because the hair particles are emitted along the normal of the seed particles.

wa sit confusing enough?..

if anyone is investigating hair, this might be a cool thing to try (and give feedback about ;) )

-cheers!

Link to comment
Share on other sites

I remember a while ago I came across a tutorial on how to do hair in Houdini.I dont remember who the author was nor the details on how it was done but what I do remember is that there was no curve at all!

A particles were born all across the surface and then on top of every particle, another particle was plased with slite position offset.Than on top that particle, another one,another one..... etc. Couple dosens more particles and you have a hair!

I suspect it wos done with some expression(which also allowed to apply forces to hair, like gravity,wind etc.)

Link to comment
Share on other sites

on top of every particle, another particle was plased with slite position offset.Than on top that particle, another one,another one

well, actually, if I remember well, it was birthing a continuous stream of particles continuously, adn then fitting a curve to then, not just placing particles along a path...because then it allows for particles to naturally follow the motion of the object....

I suspect it wos done with some expression(which also allowed to apply forces to hair, like gravity,wind etc.)

actually, if you're using particles, you have a reduced need for expressions!...because pops will do it naturally...

and the fact that the curves are birthed out of particles gives you the basic lagging motion for free!...whereas plain curves don't !

AAARGHH...wish I could find that demo....forgot how to fit ONE curve per stream?

ideas, anyone?

Link to comment
Share on other sites

  • 1 month later...

hmmm.. was playing with the fluff challenge and found that our friend lag CHOP is decent for movement, still fiddling with the idea of a more robust control system. perhaps you could use the same concept with hair bounce (will take tweaking on your part, lag chop is just one node out of many).

as an aside, sean lewkiw at siggraph showed some interesting demonstrations for LOTR where he triggered events using the color value of geometry. done within the SOP/POP/CHOP contexts. playing with that idea at the moment, with mixed results. ;)

Link to comment
Share on other sites

"hnt: spring CHOP too!" - hi sirogi!

spring sop is giving me too much grief.. i originally intended to span a few different ops since a lot things seem to be a little too *op specific*, but i havent gotten acceptable results (yet). now once we get all this done, how about a "fluffy hair SOP"? shouldnt be extremely difficult. notice my uncertainty. :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...