Jump to content

Particle Hair


JCPalmer
 Share

Recommended Posts

Well, fought through all the framework change crap. Looks like this is going to be very do-able someday.  Since the scene no longer has an arcrotate camera, have not updated the web scene.  Here is a pic:

vertexcolors.thumb.jpg.2af29061b661cac668426f85c567a83f.jpg

After PR, will change back to Arcrotate, and tune the range of color variation a little better (-.1 to .1 seems a little large), then update web scene. 

Am sort of out of time for now, but will make an attempt to make a first "real" hair soon.  This thing is just some piece of crap I made in a few minutes.  Do not think Dreamworks has anything to worry about, but Unity check your underwear.

Link to comment
Share on other sites

I fetched - merged, after my commit / PR, then built.  I still have a problem with _getTargetPosition.  I am supplying a mesh in constructor.  At constructor time there is no way to have a _targetHost yet, so it returns this_.target.  I changed it to return this._target.position.clone(); , but I get a transpile problem.

Link to comment
Share on other sites

I like calling setTarget, in the constructor.  SetTarget does this though:

this._target = this._getTargetPosition();

Problem is _getTargetPosition() references this._target.  For me, I just changed the constructor to always set this._target.  In my simple scene, the mesh that is my target is also at zero, so not sure this is production worthy.  I am up and running, and can now wrap this up. (Now that I can move around, this looks much better than the picture & how good I thought it was going to be)

Changed to:

this._target = Vector3.Zero();
if (target) {
    this.setTarget(target);
}

 

Link to comment
Share on other sites

Ok, I settled on a color random adjustment of -.05 to .05 to differentiate the strands.  I also tried to change the base color to get a better blonde with less greenishness. I also dropped the number of strands from 20k to 12k (4 segments per strand).  On a non-square head that was not bright red & a decent style, I think it would look better, obviously.  Link once again.

Finally, I moved the camera back.  As you zoom in you can see increasing detail, not some underlying and blurry textured mesh.

For short styles, you might need the 20k strands, but might get away with maybe 2 segments,  For a comb over, perhaps define as 5 segments, and rely on the limited dissolve to trim the short hairs.

Link to comment
Share on other sites

Thanks for the fix, I'll update the code

Regarding ShaderMaterial and freezing support, this is tough as I cannot know beforehand which attributes / features will be used.

But you are right, I'm not sure we will  lose a lot of performance if we use the stdMaterial.

 

TL,DR: I agree :)

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...