Jump to content

bezier curves for hair?


Tenly
 Share

You are about to reply to a thread that has been inactive for 3988 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi, forgive my noob-een-ess (and maybe error prone use of terms) but Ive just discovered bezier curves for blender! I first saw them in a maya 3D tut for polygon hair and since I am using blender I got all excited and searched, and sure enough, YES you can use bezier curves--shapes--then convert them to mesh.

but ooo are there any snags? is this too good to be true?

I want to use bezier while Im creating hair because it seems to me Ill have more control over say a curl shape with bezier than this boxes and rectangles that have no curve handles. Before I start, Im wondering if any of the mesh experts are aware of any issues with regard to using bezier curves and the resulting vertices on conversion to mesh.

Also, looking for a CLEAR guide for lowering the polygon count or really a guide to what would be a good polygon count. I intend to go all out design wise, then step back and reduce if needed.

Tenly

Link to comment
Share on other sites

First of all, any time you use any generative modeling techniques, the one constant is that they will always need to be converted to plain mesh when being exported for use in a game engine.

So yes, you can use bezier curves and no, I can't think of any particularly good reasons to avoid them altogether. It's probably not saving you much work, though, so I wouldn't necessarily reccomend using them either.

One thing to keep in mind is what Codewarrior pointed out below about the Z-transparency stacking order. You want most of your hair to be all in one part -- like a single hair "shell". What you could potentially use bezier curves for is the for the strand like bits that won't fit in the "shell" to give it extra dimension. You shouldn't just cram dozens of shapes together to represent all of your hair -- that's one of the best things mesh can help us avoid. Another thing to watch out for is that Blender really doesn't have very good curve editing tools.

One potential up-shot to curves is that you could use them to help shape out your hair and then retopologize it as a single shell. Again, the poor curve editing in Blender is a bit of a deal-breaker for me in this regard.

And like I'm sure you've been told before, there is no clear guide on lowering polycount. If you have an all quad mesh, all you have to do is evenly remove full connected loops of vertical and horizontal edge loops until you can't remove any more without making your mesh look unacceptably faceted.

Let me know if you want me to elaborate on anything.

  • Like 2
Link to comment
Share on other sites

Heya Tenly,

first of there are no noobish questions, everyone has to start at some point : )

Regarding the usage of bezier curves: a downside is that its way too polygon intense (as in the polygon counts)
You really would need to take care to just create a curve with a few segments (like 2 or 3) and in those cases it is mostly already easier and also faster to manipulate (rotate, scale. move) vertices or edges than fiddling with the bezier handles.

Problem is that hair doesn't need to have polygons everywhere and that surely it is not the most optimal way of creating an 'actual string of hair' all over the place with tons of polygon tubes, so to say.

Aside from creating highly dense replacement props (for areas that will be later on replaced with real render hair / particle hair) I, myself have never found a good use for beziers in creating hair.

The regular game engine hair is mostly created with a base that is either almost an oval sphere (with removal of covered polygons that the head would hide anyways) to create the 'base' and then additionally have tapered cylinders to create certain bigger hairstrings or a base for the hair bangs textures. And in other spots often even just flat polygons / faceloops.

And things like tight 'curls' would be normally done as texture and rather not as geometry, for they just need way too many polygons for making a tube that has actual curles and twists in it. And the curves are rather just used in the big hairstrings / parts to make a bit of a curve here and there.

Have a look here to see further info on how game character hair is mostly created: http://wiki.polycount.com/HairTechnique?action=show&redirect=Hair+Techniques

You will notice there is not really anything done by using bezier-curve'd tubes.

And since SL has opposed to many other engines no good workaround for one of the main problems in rendering: Alpha sorting' the 'flat faces being layered-version (which you can see a lot in the link above) is also not an optimal solution for SL, thus something like this is rather the type of geometry you'd want to make: http://wiki.polycount.com/HairTechnique?action=AttachFile&do=view&target=hair_tekken6-alisa-wires.png

The old method of having hundreds of sculpty tubes bend and twisted in all ways is also nothing you'd wish to recreate when doing mesh. Since we finally are able to create hair as needed and don't need to flood our scenes with these hilarious amounts of polygons anymore, in order to create a certain look :)

However you can of course work with really decent tapered cylinders.
Which is one of the most common ways in SL to create a wider hairstring or area to hang down from the head. But as said above those can either be easily done without bezier curves, or by using beziercurves with very little segments. Whatever method applies best to you =)

(as example what I meant with the tapered cylinder method, see an example here: http://media.tumblr.com/ee9233f16362e00e7e3bc0ae255ef13e/tumblr_inline_mhiqtpqsVO1qz4rgp.jpg)

For the question about a guide for lowering polycounts, I don't know if mine helps you but it contains methods to lower polygon counts, as well as general tips and tricks and things to consider as of 'how much' is needed and what can be achieved in other ways (textures etc) > Topology Thread (Mesh)

Generally there is no 'absolute rule' for how many, but there are certain methods to pick from to lower your count. And certain criteria to consider when creating something. (game engine type, what shapes, what can be done in textures, what needs to be actual geometry, where do I need more faceloops where less and so on)

(In all other cases I'd suggest you keep digging deeper into the polycount forum (from the links I gave you above) there you will find even more about this subject , hence the name of the website ;) )

As a personal Rule of thumb I'd consider every hair above 2 K polygons way too much for a character in this kind of engine. (and that would include a really intensely detailed haircut) for a regular one I am always trying not to go above 1 K at all and depending on the cut / type mostly even lower.



Cheers! Code.

  • Like 2
Link to comment
Share on other sites

ack. thanks everyone. I'm learning more every day. I really dont want my hair to be invisible on one side. I thought there was a work-around for that but freak, when I didnt know what on earth any of the terms or techniques were I was not smart enough to bookmark for future reference.

I am becoming more and more intimidated by this process. Ok, mostly because Im having problems with blenders UI not behaving as expected. I dont have a third mouse button and the keystroke alternatives arent always working. Not sure if its buggy software or my stupid computer.

that aside...now Im wondering is what I need to do is focus on forming hair as a shape rather than individual locks, or, if locks, then just not flat? does that mean take a box and flatten it instead of using a plane? but I thought a plane had a face on both sides? wouldnt I just texture both sides? somewhere I read, perhaps inaccurately, that you only get invisible if the normals are reversed? EKE. Im not even sure I understand "normals".

my old brain is spinning.
thanks for the help. 

 

tenly

Link to comment
Share on other sites

oops forgot one more question, Rhakis, you say as much as possible the hair to be one form. In none of the videos Ive been watching is the hair one shape. But rather many pieces then joined. Of course its sometimes hard to know what the heck is going on in speed videos and some are very good at explaining how to make, but not how to set up for export.

I can see how some styles could be made up of one form, but a short hair style with many curls or spikes that cross each other...Im not sure how you could do that by scuplting one piece and having it look natural.

codewarrior, I was avoiding strand hair creation--or maybe thats particle hair? Not sure thats the correct term. but, I dont see how that could be converted for mesh hair in SL. but again this may be my inexperience showing. The following video shows hair using strands/particles? and children etc...I love it, but I dont know how it would work for SL. Am I missing something? see

http://cgcookie.com/blender/coming-soon/creating-long-hairstyles-in-blender/

I like this video: http://cgcookie.com/blender/2010/03/16/creating-hair/ but Im again uncertain how the second method could be translated to SL.

onward to follow the links you provided. I bet Ill have more questions. ;-)

Link to comment
Share on other sites

Hey there Tenly, figured I'd post and see if I could answer your questions on Bezier Curves. I'm a noob too, mind you, this is based off my experience. Recently I made my first mesh hairs (Woo!) using Bezier curves and paths, I'm not an expert at making mesh or sculpts, like I said these were my first attempts, and Code gave you a lot of good information on polygon count, and he's far more knowledgeable since I'm still toying with all this mesh stuff. Are there snags and draw backs to using Bezier curves (As well as Paths) Yes. The biggest draw back I found when using Bezier curves is that when you convert them to mesh, they have a very high verities and face count if you don't remember to drop the Resolution in Blender. There are two places to do this. Resolution, in the Shape menu, it's called Preview, by default it's 12. I think I dropped it down to 4 or 5. Then the Resolution in Geometry, by default it's 0, I try to keep it at 1 maybe 2 at highest. Both of these influence your model when you convert it into Mesh. So my advice, is with each piece you make, play with your resolution count and try to make it as low as possible for each piece, without having each piece terribly distorted and jagged looking. Second draw back, you cannot do things like taper Bezier curves, while in curve form. So when you convert it to Mesh and go to taper off and seal the ends you'll likely have to add your own ring of vertices. This can be a bit of a pain, time consuming to get things as smooth as you want. You will likely have to add your own sets of vertices (I did) and if you aren't careful and add too many, you're back to square one of having a mesh with a high count. Anyway, there's my two cents on them. They are useful, I found manipulating pieces into place easier, though, not so much as far as rotating went, I did a lot of that in edit mode, and I did a lot of fine stretching, like widening, and tapering in edit mode as well. Hope that helped. :)

  • Like 1
Link to comment
Share on other sites

THanks Meka, this is great information and exactly what I was worried about happening if I approached by just jumping in. I rarely just jump in. I like to research, research, research. 

at this point Im torn between giving up and kicking myself in the <bleep> and perservering. I dont know why I expected it to be so much easier. though I admit most of my current problem is the UI in 2.66 not always responding. that might be the computers memory, or it might be my lame mouse.

BUT thank you, and everyone else in this thread, so much for sharing your knowledge and experiences. My gosh there are so many people who don't even try to answer the actual question I ask, but you've all answered my questions and MORE.

I wish I could afford, maya, among other things. Am I wrong in thinking things would be a little easier in Maya, even though blender is a very robust application?

tenly

Link to comment
Share on other sites

Blender has a high learning curve, but stick with it. It took me months of just toying around, getting ticked off, quitting, then coming back to Blender before I sat down and actually made my first hairs. I also signed up for FF so I HAD to get it done, which motivated me. Honestly though, don't give up, it gets better. As for unresponsive, that may be your mouse, mine started dying on me and I had to get a new one half way through my hairs, I'd start with that before going on to memory. I also saw you were looking for a tutorial on hair, I might make one in the next few months, when I'm a little more familiar with the program and so I can produce better quality items, because I'm by no means a Truth, Wasabi Pills, or Ploom ETC. As for Maya, I've personally never worked in it, or with it, so I can't tell you if it'd be easier or not. I've heard the UI is a little friendlier, but I'm more than happy with my results in Blender and what I'm capable of doing with it, but that's honestly a preference thing. Plus, it's free and I think a good way to start out.

  • Like 1
Link to comment
Share on other sites

Meka, what means signed up for FF? is that some coursework for blender? And, thanks for the encouragement. you might be right on the mouse. Batteries! and its old. Maybe after 5 years its time for a new mouse.

If you put out a tutorial let me know! I work a lot of crazy hours so my progress is going to be slow even though I've managed to find some good tutorials--each with its own methodology and process. Im betting by the time you make a tut Ill still be trying to figure it out. lol.

thanks again!

Tenly

Link to comment
Share on other sites

I'd say you'd be dissapointed switching to Maya if it was only for an easier experience. It's not easy to learn any new software, especially not an advanced software suite with a dirth of different applications all supported.

Back to not answering your question -- Honestly, if my mouse didn't work, that'd be the last straw for me. I'm not sure how you're getting anywhere without that. Are you sure you have "Emulate 3 Button Mouse" on?

Link to comment
Share on other sites

codewarrior, I was avoiding strand hair creation--or maybe thats particle hair? Not sure thats the correct term. but, I dont see how that could be converted for mesh hair in SL. but again this may be my inexperience showing. The following video shows hair using strands/particles? and children etc...I love it, but I dont know how it would work for SL. Am I missing something? see

 

To answer your questions about the hairtypes: 


No, these so called 'particle hairs' can't be transfered into SL at all. They are something for Blenders Rendering, (Blender Render, as well as Cycles) And can't be translated into a working geometry for SL. So your 'avoiding' to use those was completely correct.

I like this video: http://cgcookie.com/blender/2010/03/16/creating-hair/ but Im again uncertain how the second method could be translated to SL.

The second you mentioned in your original Post i knew you must have had seen this blender tutorial. hehe =) 
And that's exactly the type of hair creation that is very unapplicable for every kind of game engine. Because you create a ton of hairstrings and geometry, which would be way too dense to make a good use of it.

I can see how some styles could be made up of one form, but a short hair style with many curls or spikes that cross each other...Im not sure how you could do that by scuplting one piece and having it look natural.

Of course you have the right feeling, regarding the haircut, its not always possible to make everything in 'one ongoing piece' but often big parts of it, when you sit down a bit and try to 'break' the hair apart into its mainshapes.

 

Methods like this here is more of what you have to look into:
http://vimeo.com/7508405
Eventhough this is still a tad too intense and too many single parts. But this is already going into the right directions.

Note: to make the backside of such strands visible you can simply use the '
solidify' modifier and play with that. Or which i prefer: just select the vertices and fill polygons in on the backside and shape them alike, this method is best if you want to form the bottomside of the hair out. Or duplicate a part and move it a tiny bit downwards and flip normals and then merge the edgevertices, this method is best for thin looking strands or parts.


Keep in mind that you would like to make as much as possible into bigger chunks since we have that already explained alphasorting issue and thus just creating tonns of strands with alphatextures on it will never work good in SL.
Best is to have the 'base / big part of the hair* in one part which will have a not transparent texture. And then have some strands or bigger parts go off from it. 

Google a bit for Secondlife hair or SL mesh hair, and have a close look on how most people solve it.
Like here: http://sweetdebkips.files.wordpress.com/2012/11/truth-hair-cyanne.jpg you can clearly see that the hair base is kind of a shaped sphere'ish part. and then another rather halph spherical part across the forehead with a texture that is transparent and contains the strings that run across the forehead. and then a few tapered cylenders for the cuved parts that go down on the back of the head. The more you inspect those images the better you will understand how to use the technics from the above posted tutorial, to create an optimized hairprop for SL.

Its all based on much simplyfying and lots visual tricking into details that arent actually there : )

  • Like 1
Link to comment
Share on other sites

You know, I have no idea at all if this would ever be a good idea, but I wonder if anyone has ever tried baking an AO map from hair stands to a proxy hair mesh...or to a body (in the case of fur)

You will get shading information from the hair particles that will follow the particle "grain" so to speak. If you were a real perfectionist, like me, who wanted to texture a dog with accurate fur grain direction and you didn't want to mess around with dozens of fur textures, you could comb hair particles yourself and bake out a "template" for the fur.

Just speculating, I've never tried it. Personally, I find the hair particle system to be rather theraputic to use, so if you could potentially do something to assist in low poly assets with it, that'd be great for me at least.

Link to comment
Share on other sites

OMG I want to thank you Rahkis and Codewarrior. So often I post asking for a certain kinda help and all I get is nonesense or told to go back to the beginning when I asked for something specific. And it gets all the more frustrating when I, as a noobian princess, dont even know the right terms in order to ask the right question.

YOU TWO are the reason Im sticking with this.

GOT A NEW MOUSE yesterday. LOVE IT!


AND code warrior, I read your post the other day regarding hair shape as opposed to lots of hair pieces. I followed every link and I think the light finally went ON. Everywhere Ive gone since then Im looking for the "main" shape in this ladies hair or that one and thinking about how this style or that one could be achieved with least "parts" and a few accents.

oh my gosh, I watched so many hair videos and not a single one of them approached the structural design of the hair in terms of an overall shape with accents. Which doesnt mean there are none out there...just means that since I discovered the term "polygon hair" last week, I had not found anything that didnt structure with myriad bits!!

Thank you SO MUCH!!!

Now that I have a NEW mouse and the right direction to head into I'm reading to dig in and see what I can do. I have so many hairstyles in my head. nothing stellar, just challenging. I think curl will be easy but braid is gonna be harder to do and be realistic. But Truth hair, of which I own MANY, is like the GOD of hair for me...so...I know all things are possible.

wooooT I am so happy. 

Thank you guys. you really ARE helpful!

tenly

Link to comment
Share on other sites

I'm glad you feel the infos helped : )

.. and I think the light finally went ON..

Awesome feeling right? Once you know how to look at things, and pattern start to unfold for you, things appear so much easier. hehe
I mostly can't turn this kind of view off at all, even in normal life i 'break' down things into their main shapes, colors , lights / shadows and whatnot. It helps a lot when you watch your surrounding world like this in order to recreate it in either paintings or in 3D. 

I'm also glad you  got a new mouse, it will make things so much easier and smoother while working.

so i'd say: Happy creating! =)

Link to comment
Share on other sites

Did not occur to me to try that with blender's hair strands.

For these considered reasons:
for regular hair - to build an underlaying polygon prop that fits to the hairstrands i would find it too bothersome and time intense. Also if the strands are too dense it might just give a rather unclear result and rather a dark mass beneath, and the opposite with too thin spread strands. Also if the strands don't line up orderly with the poly hair the result most likely looks like a rather out of place drawn texture i assume. And to get some good results the settings would need to be cranked up quite a lot, as well as the general very intense rendertimes for hair already. I consider this  in terms of rendertime, and time to spend on creating it as rather uneffective, compared to painting some black/white streaks as base for the texture.

Just my opinion.

But for Short fur over a plain skinarea it might be worth a try. If you can gather enough AO detail from the hair.
(and also here i think the painting hair yourself still suits better the flat surfaces of poly hairprops or skins, and is still faster in terms of rendertime and setting things up)

Eventho i'd prolly still rather go this way (for other engines than SL, like Unity etc)  :
http://www.blendswap.com/blends/view/48987

One thing the hair is good for is to create nice flat's (hair textures) for polyhair. by creating some hairstrings with the particle hair and rendering that in your viewport with black background i.e. if you don't want to paint hair textures yourself that's another nice way to produce them.

Link to comment
Share on other sites

I like that idea for the "flats".

I agree that maybe the AO wouldn't be ideal -- Perhaps some sort of camera mapping technique would work instead. Like, render out the hair and project to the poly-hair from the same angle. I dunno -- Laziness is the father of creativity.

I'm sure there's a way.

Link to comment
Share on other sites

Here's another suggestion for you 'lazy' person (hehe just taking your own words =))

With rendering your model out (fully with fur or the hair depending on what your about to do) from top/bottom/all 4 sides, and with Viewport based UV unwraps and aligning these Uvs of your hairprop/or Body to the rendered images, you can basically 'paint' this  down onto your model - with projectional painting & cloning amonst the UV layers,. For fur, a nice method to think about.

Link to comment
Share on other sites

hehe yeah Tenly, there are 'other' terms with that abbrivation: 

what Rhakis and i were talking about is a render term named : AO = Ambient Occlusion. 

-> In computer graphics, ambient occlusion attempts to approximate the way light radiates in real life, especially off what
     are normally considered non-reflective surfaces.


If you want to look into it: 
http://en.wikipedia.org/wiki/Ambient_occlusion
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Bake

 

and a little tutorial: http://www.katsbits.com/tutorials/blender/baking-ambient-occlusion.php

 

Ambient Occlusion maps are often baked and used for the texturing of objects, to save rendertime insides a game engine. Or to add a general feeling of shapes, depth, and lightindependend shading to an object.

Second lifes Rendering Engine also has the capability to run Ambient Occlusion, and some other typical functionalities like DOF (Depth of Field), and shadows -  for more info look here: 
http://community.secondlife.com/t5/English-Knowledge-Base/Lighting-and-shadows/ta-p/997819

  • Like 1
Link to comment
Share on other sites


Codewarrior Congrejo wrote:

Here's another suggestion for you 'lazy' person (hehe just taking your own words =))

 

With rendering your model out (fully with fur or the hair depending on what your about to do) from top/
bottom/all 4 sides, and with Viewport based UV unwraps and aligning these Uvs of your hairprop/or Body to the rendered images, you can basically 'paint' this
 down onto your model - 
with projectional painting & cloning amonst the UV layers,. For fur, a nice method to think about.

You read my mind.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3988 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...