Hey peeps,
I'm trying to improve my workflow for creating hair. I'm going for something similar to this :
I've tried various approaches, but they all seem a little long-winded. Currently, the best method I've found is to create a poly hair strip and use a simple curve as a wire deformer. This works fine when the hair runs roughly in the same plane (e.g. the side of the head), but there's a few problems when trying to duplicate and rotate a hair section and its deformer. Basically, I'm just looking for some suggestions.
Mop, if you read this, I've tried using your renderable curve script, but I found the twisting to be a little unpredictable and hard to control. Might just be cluelessness at my end though.
Replies
Best method to create lowpoly hairs?
Looking at the part in the hair gives me an idea: Pull a curve from the head mesh and trim it down. Create a couple of curve-based planes. Use the fancy 'duplicate along curve' script twice on it: once for left side hair planes, and once for the right. I'd start with them pointing up, like an offset double-mohawk, and use a combo of deformers to wrassle it down, probably starting with a bend or wrap with a lowish poly plane. (I guess this is kind of a manual version of hair sims, innit.)
That would only work for styles similar to this, but I think it could be expanded on.
I might just give this a go as well. Would be nice to grasp making hair like that.
This probably doesn't suit that well for the type of hair the uncharted girl has
The head model and textures was the free head scan from Infinite Realities.
I didn't really do any research on how people usually do this type of hair.
I created a polygon plane with 16/12 segments and placed above his head >
Scult modifier to get initial spherical shape >
Lattice 3x3x3 and tweaked the plane >
Make live and tweaked each vertex by hand >
Deleted a few faces and merged vertices >
Selected edges going across >
Extruded in 3 iterations with Keep faces together off >
Some manual tweaking on certain planes >
Selected the faces from the original plane and deleted those >
Selected vertices that connects the planes together and detached + separated them >
UV-mapped (planar + normalize) one of them >
Transferred UV layout to all other planes >
Grouped all planes >
Duplicated the group and displaced this group a bit from the other group >
Manually tweaked some more on certain planes >
Applied cgfx shader using diffuse w. alpha and a normal map.
... phew
Not bad kodde, though the polygon edges are very obvious. I'm still on the fence whether that style works better than an overall 'shell' for the main shape with fewer planes trailing off to suggest volume or not.
Or alternatively, do the above modeling of the shapes and layers you want, but instead of using extraction to make the strips, make the hair surface live, and draw out using the cv curve tool to draw how you'd want the strips to flow, then extrude a polygon edge along them. Repeat for each drawn curve. You could also duplicate strips once completed, then tweak like in the above.
Using a plugin like Roadkill would probably help with rapidly uv'ing these as well.
As a bonus, you can continue to shape the NURBS strip, and the polystrip will update to reflect the changes as long as you keep history. You can also change the number of divisions in the polystrip on the fly as shown here :
I'm still refining the process, but it's a step in the right direction.
You would think so, but unfortunately not. The UVs are there and normalized into the 0-1 space, but they're not proportional. I didn't find any magic setting anywhere to fix it either.
(hardware render in viewport with the lcHairShader 2.0)
Does anyone know of a way to fix this? (in XSI there were a couple of camera
options that helped force z-sort to work better...I'm not familiar yet with
Maya enough to know how to fix this)
P.S. Thanks, CheeseOnToast...these planes were setup with your technique.
*edit* ... frustrating ...
Maya's viewport handeling transparency has always been crap afaik. I have same issue on my Maya with my shader.
Different combinations of settings in Maya may help, video card driver updates sometimes help/hurt, especially with ATI cards. If not, perform invocations with the objects mentioned.
I added that it's working *mostly* better now. (and switching to High Quality
helped, although it changed up the overall lighting a bit, but way less z-issues --
they just 'pop' now instead of showing the underlying skull
geometry)
it works with longer hair as well and is to me way easier than just extruding edges all the time without knowing how the final volume will look like
as for the uvs of your nurbs, isn't there any setting for worldspace scale? even max has that and the nurbs in max are just plain crap
About all the examples here, is it necessary to build the entire head of hair out of strips? Or could you build out a helmet, and lay on the flyaway strips afterwards to soften the silhouette? Seems like this would cut down on the z-sorting issues the Maya users are experiencing.
And yeah, Neox, that's sweet.
that)
Since the poly-strips method was creating such unacceptable z-sorting
problems (neither 'high' quality nor default gave a reasonable result),
I went back and just did a hair-mesh as 1 piece. Now I've basically got
it to an acceptable point, but if the hair polys overlap themselves in
the viewport in terms of z-depth, they seem to be unable to figure out
which section is further behind the other.
(sigh)
Any way to fix this b.s.?
As previously stated, Maya's Viewport + Transparency != True
adjusting 'Transparency sorting' between per-poly/per-object, setting
render options 'culling' (tried all 3 settings, none fixed it)...basically
trying every combination to see if just 1 will allow for proper transparency.
No dice.
(using your eye-shader, btw...it rocks!)
Oh, bummer.
Cool, didn't know anyone actually found it useful.
Arshlevon> That sounds mighty interesting. Do you know of any good resources for Alpha to Coverage? I might just have to do some research on the subject. Would be nice if this could be used in a CGFX shader to solve this.
***edit***
you can see the effect in action on this comicon entry, check the hair out..
http://www.gameartisans.org/forums/showthread.php?t=16567&page=6
then flipped normals. ugh.
RE: yer shader, kodde...like it alot. Didn't rtfm (of course), but is
there a way to move main light source from 'centered' on the pupil as it
is in default? (so it's upper-right, for instance instead of center)
Ahh, cool.
You've certainly sparked my interest
I'll have to find some time to do some research on this.
wailingmonkey>
There should be some light direction and/or position slots. Don't remember if it's only directional lights or if there is also any point lights. Here's an approach. Create a directional light. Open the shader in the attribute editor. Right click in an empty light direction slot, Lights > Your new light. Now when you rotate that light it should alter the direction of the light on the shader. Remember, don't scale the directional light representation with the scale attributes.
http://wiki.polycount.com/TransparencyMap#Alpha_To_Coverage
Awesome. Thank you.
So unless I am mistaking here, this is not possible in Maya since it does not have any form of AA in the viewport at all? You can't do AA with shader code right? At least not without post processing?
Unless you were able to use another hardware renderer maybe.
Any time you're going to have a single object + transparent 'layers', you need to sort the triangles manually. For the most part, it is a matter of joining the objects together in a particular order. The mesh is rendered in real-time based on the vertex index, starting from zero, and to get proper blending, you first need to know what's behind an upper layer.
In Maya, each new object added to the selection will be placed last in the vertex order when you do Mesh>Combine. In your case, it should be pretty simple, select the inner shell, then the outer, and combine. It can get more tricky if you have a lot of strips that weave around, or curl up and around at the tips.
Nice. Good piece of info right there. Thanks.
http://wiki.polycount.com/TransparencyMap#Sorting_Fixes
yer tips to solve some render issues.
appreciate it!
In zBrush you have the option to export fibermesh as curves.
I set the number of fibers down to something reasonable, like 600.
I exported them as .ma and opened it in Maya and used Surfaces > Extrude with these settings:
Worked pretty well I'd say.
We'll have to see how well it works on a real character. Also, it seems like this method doesn't produce any UV's. Perhaps having the Output Geometry be NURBS and then convert them to polygons would help?
If not, simply doing a Unitize and then Move and Sew UV's should produce good UV's.
So I dont know if this works with the non default hlsl shaders or not but... Viewport 2.0 has an option listed under performance called "Transparency Algorithm", change the option to use depth peeling and it should fix all of your transparency sorting issues. Of course if you plan to display the final result in a realtime engine it's worth setting up your mesh to work with object sorting like others have said.