Carrara Hair

24

Comments

  • Samuel S.Samuel S. Posts: 322
    PhilW said:

    Screenshot of the type of mesh produced. By adjusting the number and width of the strips, you can get a mesh that will meet your needs. Each strip has the usual vertical UV mapping so it is pretty standard to texture it.

    Nice, I was also playing around before with other 3D paintaing packages which have fiber mesh and muscle to create hair but Carrara's hair, Philemo's plugin  and Phil's creative suggestion really do a trick.

  • HeadwaxHeadwax Posts: 9,987

    great info - I waybacked the first page in case the threa d  gets MCMLXXXIV ed

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175

    I've uploaded a win64 version of the plugin. It can be found here

    I'm afraid OSX users will have to wait a few days for the OSX version.

    @PhilW : May I quote your description in the wiki page?

  • PhilWPhilW Posts: 5,145
    edited July 2017
    Philemo said:

    I've uploaded a win64 version of the plugin. It can be found here

    I'm afraid OSX users will have to wait a few days for the OSX version.

    @PhilW : May I quote your description in the wiki page?

    Yes of course!

    P.S.  If I do indeed make and sell any products created with this, I will send you a Gift Card as it would not have been possible without your plugin.

    Post edited by PhilW on
  • DUDUDUDU Posts: 1,945

    Really cool plugin Phil!
    I had tested a converter found on ShareCG, it was  for Poser but it is not my preferred program.
    I can imagine to create flowers, grasses etc with this hair based plugin.
    In the same spirit, is it conceivable to adapt this code to convert the carrara particles into minis splats for example?
    Anyway, I hope to try it this W.E.
    Thanks a lot!

  • SileneUKSileneUK Posts: 1,975

    Is there a bit of a tutorial on this?  

    I got it to work, but what shaders do you need to apply (assuming a non-Car-hair one) or create to overlay/fill the new flat strands? It defaulted to the master shader for the original scene from which the piece of clothing was isolated. Not the base shader of the clothing before adding Carrara hair. 

    I was surprised it converted one that had some waves/kinks in it. Took a lot of time to convert, so I probably won't do that again and keep the setup more basic.

    It's a great tool, hope to be working with it more in depth soon! Merci, Phil!  smiley Silene

  • SileneUKSileneUK Posts: 1,975
    PhilW said:

    Just a few notes on this plugin - I seem to have started something here!

    - It works from the number of hairs currently displayed, so you want this to be a relatively low percentage (I've been using 2-3% displayed on some recent conversions);

    - It produces flat strips of polygons for which you can define the width, one strip for each displayed hair - so by mapping the strips with multiple hair strands, you can get back to the original density of the hair, without needing the huge amount of polys that you would need to model each individual strand;

    - It generally seems to work well, but I have had the odd occasion that the model seems to miss parts of the original hair. Also it appears that you can only run it once - if you try again, it produces an empty model, so you need to close the scene and re-open in order to produce multiple models;

    - Starting with the same hair model, you can do things such as cut the hair, lengthen it, brush it, etc. and the model that is produced from the modified hair can be used as a morph target for the original hair - this is potentially really useful as you can produce a range of style and movement morphs for a given hair model.

    A huge Thank You to Philemo for this addition - it is really useful to have and I can't thank you enough!

    I am trying to follow this... but am a bit confused (of course I am!), so that's why I posted above. cheeky Silene

  • PhilWPhilW Posts: 5,145

    Yes, good that waves, kinks and anything else that is applied by the shader onto the shape also gets converted. My conversions have all been quite quick, so if yours are taking a long time, there are several possibilities:

    - you PC is a lot less powerful than mine - which I doubt as mine isn't some mega machine!

    - You are displaying 100% of the hairs before you convert, and it is therefore producing a strip for each and every hair, which you probably don't want to do as the model will be millions of polys.

    - You have a huge number of hairs or a huge number of segments per hair. Adjust so that the model that is produced is more manageable.

    As to mapping, have a look at almost any poly based hair to see how it is mapped - you will need at least a transparency map to create the effect of multiple hairs along each strip. You can always "boorow" some textures if just using it for your own purposes.

  • JerifeJerife Posts: 272

    Thanks Philemo! I've downloaded it and will try in all my C hairs. Woot!

  • SileneUKSileneUK Posts: 1,975
    PhilW said:

    Yes, good that waves, kinks and anything else that is applied by the shader onto the shape also gets converted. My conversions have all been quite quick, so if yours are taking a long time, there are several possibilities:

    - you PC is a lot less powerful than mine - which I doubt as mine isn't some mega machine!

    - You are displaying 100% of the hairs before you convert, and it is therefore producing a strip for each and every hair, which you probably don't want to do as the model will be millions of polys.

    - You have a huge number of hairs or a huge number of segments per hair. Adjust so that the model that is produced is more manageable.

    As to mapping, have a look at almost any poly based hair to see how it is mapped - you will need at least a transparency map to create the effect of multiple hairs along each strip. You can always "boorow" some textures if just using it for your own purposes.

    OK got it... I just did something I already had just to see how it worked.  I have enough power in this machine, so am sure I over-reached in trying it out with a high count and segments. I will aim for a simpler look next time. Am really excited about this. What a great tool Philemo! yes

    Now that I actually understand, I Will sort the mapping. I have a piece of Powerage's clothing from that 'other' site which is a product that gives a similar result to this kind of effect to look furry. I liked it as it did the job and used a hair like texture map as you descibe. So I have a starting point.

    Cheers, Phil!  heart Silene

  • StezzaStezza Posts: 8,064

    note to self...

    converts for Carrara hair caps.... not for hair directly on the figure head.

     

    my wombat will have to wait smiley

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,218
    Stezza said:

    note to self...

    converts for Carrara hair caps.... not for hair directly on the figure head.

     

    my wombat will have to wait smiley

    yes the UV is vertical not mapped to the pelt which is great for head hairs but not animal markings

    there is one way around it though, B&W scale density maps and do two hairs, is what I did for Octane before Sighman added the UV

  • StezzaStezza Posts: 8,064

    Really......

     

    oh         I                 did                    not                      know                     that   

  • PhilWPhilW Posts: 5,145
    Stezza said:

    note to self...

    converts for Carrara hair caps.... not for hair directly on the figure head.

     

    my wombat will have to wait smiley

    Can I clarify this - I have converted hair which is parented directly to the head and does not use a hair cap. But as has been pointed out, the UV will be vertically mapped to the hair, not related to the parent object.

  • DUDUDUDU Posts: 1,945

    OK, here my first test of this plugin.
    I have 15000 hairs of 1 guide/1 segment by guide, The result with the Carrara hair is image 1.
    I converts these 15000 hairs in polygons, but for the major part, I have only one simple line rather than a polygon (images 2 & 3).
    The number of polygons is 15000 like the original hairs.
    Is there a limit with the number of hairs or polygons or what am I missing?

    Cactus Alien.jpg
    4000 x 2000 - 6M
    Cheveux convertis.JPG
    1436 x 662 - 227K
    Cactus Alien (converti).jpg
    2000 x 1000 - 2M
  • SileneUKSileneUK Posts: 1,975

    Dudu... what width did you give your converted 'strands' ???  enlightened Silene

  • DUDUDUDU Posts: 1,945

    0,40 (by default).

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175

    There is one polygon per segment per hair. (for instance, 20 segments for 15.000 hair is 300.000 polygons). This is for visible hair. So, if you set 10% visible, you get 20 segments for 1.500 hair, so 30.000 polygons.

    @DUDU, could you PM me your scene. I would like to see what's wrong and do some experiments.

    One thing is that hair strands have a width, but no depth. So, if you see them from the side, they're almost invisible (or look like a line). The orientation of the stand is computed from it's local direction. It may not be optimal in this case.

    PhilW has suggested an optional V shape and I'm sure it would help in this case. Another solution would be to generate a tube (4 sides or more). It would help more, but would be far more costly in polygons.

    I'll try to work a bit more on the subject.

  • PhilWPhilW Posts: 5,145

    The principle of generating flat polys is (I believe) to be able to keep the resulting poly count within a reasonable level, and then map an image of multiple hairs onto each poly strand, so if you set visibility to say 5% you would need to have 20 hairs per map to reproduce the same hair density.  But with your 15,000 single segment hairs, having one poly per hair is still only 15,000 polys so not too bad. I think you have two issues, both of which I have come across myself:

    - sometimes Philemo's plugin generates hairs with zero width rather than the specified figure, so instead of producing a strip of polys, you get what looks like a straight line with no dimensions, and this does not produce anything in a render. I have seen sometimes areas of zero width on the same strand as others which are normal. This is a bug, which I hope that Philemo will be able to address (but no pressure, this is a freebie after all).

    - As Philemo points out above, the strips are flat polys which have no depth, so if you view them side on, they disappear. I have suggested to him that instead of having a single strip, that he has an option for a double strip with an angle between them, and therefore the strand would be visible from any direction and this is the minimum polys that you need to do that. Even that is not an ideal solution, but the more complex the solution, the more polys you are going to need and 2 polys gives a lot more flexibility than one - I think actually a 3 poly tube (with smoothing on) would be a good solution.

  • DUDUDUDU Posts: 1,945

    OK, you have a PM, Phil.

    I'm shure that these are simple lines, look in the model room.

    2 questions: I'm not a great modelizer, but I wonder how we can do a V or a Tube with these polygons...

    A great thing is that we can use a Modifier with it, and thus animate it.

    I will try to use the Physic too.

    Thanks!

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,218

    I intend using this plugin in my entry for the muse contest and featuring my feline friends who are my muses

    what it can do is ticked fur like my tabby cat where the strand has several colours along it

    the marbled markings on his body I will try to emulate with as I said multiple sets of fur or even an undercoat of regular Carrara hair unconverted, am going to try a mix of dynamic and mesh fur in my animation.

  • PhilWPhilW Posts: 5,145
    edited July 2017

    I am suggesting that (if possible - no pressure!) these could be options that Philemo could consider if he is revisiting the plugin, rather than something that you can model.

    Having said that, if you have good strips, I do have a way to generate a 2-poly V-shaped strip:

    1 - Go into the vertex modeller and switch to the UV view.

    2 - Highlight either the left or right points on the UV map - this will select one edge of EACH poly strip.

    3 - Go back to the normal modelling mode (ie. out of UV mode) Use Extract Along to pull a line into the middle of a strip, and as an edge is selected on every strip and the strips are of uniform width, this will neatly divide every strip into two - be patient if you have lots of strips, just keep the mouse button pressed down as it can take a little while for Carrara to do this on every strip.

    4 - You then need to move the middle strips out - I have found that for a head of hair, this can be done quite well just by using the Scale tool, as the centre of all the strips will be more or less in the middle of the head and they remain selected after carrying out the previous operation.

    I hope this helps. It will not overcome the issue you have with zero width strips though.

    Post edited by PhilW on
  • DUDUDUDU Posts: 1,945

    He, we posted in the same time PhilW smiley

    You are right but my two questions are for you!

    Thanks for your explanations.

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,218

    couldn't just select all in the vertex room and add thickness?

    very thin thickness maybe 0.01

  • DUDUDUDU Posts: 1,945

    Good idea Wendy, I'll try it directly!

  • PhilWPhilW Posts: 5,145
    th3Digit said:

    couldn't just select all in the vertex room and add thickness?

    very thin thickness maybe 0.01

    Yes you could, but then you would have four times the number of polys rather than twice as many. And off the top of my head, I'm not sure how the mapping would work - using my "divide each poly" method above, it neatly divides the UV map as well!

  • DUDUDUDU Posts: 1,945
    edited July 2017

    @PhilW: you edited your post and I have the answers now but UV mapping...frown

    I make a screen shot of your post and go on my main computer, thank you Sir!

    Edit: Hmmm, Madam want to go to the restaurant...

    Post edited by DUDU on
  • Philemo_CarraraPhilemo_Carrara Posts: 1,175

    Thanks to Dudu, I found the reason why it didn't work.

    As the stands are made of flat polygons, I managed to have them oriented so that their normal was perpendicular to the center of the hair primitive. It works quite well with hair on a head, but it's going astray in other instances (like Dudu's cactus).

    The problem in this case is what is the direction the strand should be facing. That's true to all picky hair, hair that do not end up being more of less parallel to the surface they're covering, but go perpendicular to it. 

    There is several answers to that. One is to have it facing the camera. Il will look good until  the object or the camera move :-). An other is to give depth to the strand, so that matter of direction is not an issue anymore (at he cost of more polygons). I think I'l try that before, but I have another question. How should it be UV'ed? Vertically per face, vertically for all the faces? Another way?

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,218

    well for fur it should follow the UV of the pelt like the Carrara dynamic hair does

    for head hair the vertical UV you have works better

    so if it can have both options it would be great.

  • PhilWPhilW Posts: 5,145

    I think if you have multiple faces - whether it is 2, 3 or 4 and whether side by side or in a tube arrangement - it makes sense to have a map which is vertical for all faces rather than vertical per face (acknowledging that the UV of the pelt is also a useful option, especially for animal hair/fur). Otherwise you will get the same map on multiple faces and that could become apparent in some circumstances. By mapping across all faces, you can have hair that appears to twist which is something that real hair does and so adds to the possibilities.

Sign In or Register to comment.