dx11 tessellation hair, how can you make it in unity?

in the butterfly effect they used really nice looking hair that was made using tessellation, but hey don’t really give a clue on how to make it, they just say it came from nvidia. i looked on the nvidia site and all i saw was the hair demonstration, but not any way to make it. so does anyone know how to recreate the hair from the butterfly effect short film?

That type of rendering uses guide splines to build a 3d texture (or simulate one) based on some algorithm then does a ray based volumetric render. Or at least that’s how it’s done in maya and it seems really similar to that method. Not simple to implement at all.

thx for the info, any way u could tell me how to implement it? or tell me where to learn how? i am experienced with programming concepts, c#, js, and have a basic knowledge of cg shader language

I heard they are going to make this feature available in the near future…

any clue on how far away “soon” is? i kinda need it soon, im willing to learn how to do it but i need to find a source 1st

The outline of the process is something like:

  1. you have a mesh that “emits” the hair (e.g. a scalp). This is a triangular mesh.
  2. a hull shader will “emit” some number of hairs from each triangle (computes tessellation per triangle edges, using “isoline” domain). The tessellator unit will produce lines for each hair from here.
  3. a domain shader receives tessellated hair vertices and does any shading or whatever else you need
  4. a geometry shader expands lines into thicker quads (for performance reasons you usually can’t tessellate up to individual hair strand level; you’ll want each tessellated thingy to represent several hairs using a texture).

So that’s the outline, and yes, it requires knowing a thing or two about hull/domain/geometry shaders and shaders in general. But it’s not Unity specific really, you could use any DX11/GL4.2 knowledge here.

thx a lot, i will look into these things and try to figure it out, and if i figure it out perhaps ill look into making a full tutorial for others