Will DOTS get us real time hair

A while backed Epic acquired Shave and Hair cut.
https://www.unrealengine.com/blog/shave-and-a-haircut-v9-6-for-maya

Probably because they wanted the patent rights for tech used by yeti and not get sued like everyone else.

my question is will dots or any tech in the future get us real time hair in Unity. Currently the VXF/Animation industry are pouring millions into solving these issues and it seems like a good fit for DOTS.

2 Likes

What’s your timeline? I have some algorithms that I am hoping to port to my framework with DOTS.

However, I have quite a few prerequisite pieces that I need to implement first, many of which are pieces I had working in 0.1.1 but are broken in 0.2.0. Time is my biggest enemy. I only really have times to work on this on weekends and no amount of money thrown at me is going to change that.

Do you have any examples of what your are able to achieve. I’m really trying for get a feel of what is currently possible.

Nope. Shaders don’t compile anymore. Haven’t taken time to investigate porting it to HDRP. It might be possible to feed the inputs into shader graph for the shading side (which is where the compile errors are at). However, that might not be possible with the anti-aliasing logic.

It was pretty heavily based on TressFx 4. I was experimenting with some fake 2-way coupling with the environment and different friction models. I did this all on the GPU because CPU performance was abysmal, but I think of lot of that stuff will run a lot better on the CPU with Burst as the algorithms fit the CPUs processing model better.

But again, this is not something I’m going to have time to investigate for a while. What’s your timeline?

I’m in no rush, this is more for getting information on what is possible/has been done in real time engines regarding hyper realistic characters. One constant barrier is hair, but it looks like epic is taking that problem on, heavily targeting film/tv. I believe Unity could achieve a feature ready character in DOTS but it doesn’t s appear to be a priority , form the blog I’ve seen they are targeting more the architectural side of things. Not sure how aware people are of the content war going on at the moment with all the online streaming services, but it is hot and a massive opportunity for real time engines since they could be used to keep up with the content creation demand. demand. Hair for a feature vfx char can take 40min-2h a frame. Simple can’t keep up

  1. Unity is focusing on the core tech first before trying to do everything at once.
  2. It is going to take a while before Unity can understand everyone’s use cases regarding hair.

Fortunately though, Unity has given us the ability to write low-level systems with low-level engine overhead using the Burst compiler. So especially with film/tv, if you have a specific simulation you need, write it yourself. Very rarely will Unity give you as good of a solution for you in a timely manner.

As for my tech, it will very likely meet the needs for a lot of people in film/tv. But, it will require a full animation authoring solution inside of Unity. That’s a big prereq for me I would love help with.

1 Like

But lets say you want Tomb Raider’s hair?

It’s done with compute shader and likely will remain that way for a while because it doesn’t really affect a modern GPU that bad… DOTS is possible but it struggles with solving problems in order.

What do you mean by this?

Tomb Raider’s hair is TressFX without a lot of environment interactions. The solution I was building added a lot of those environmental interactions. The gathering of the colliders and force vectors and baking them into SDFs and vector fields, along with mapping softbody joints to the guide hair vertices, those were all things that the CPU could do a much better job at. The actual simulation could be done on CPU or GPU depending on budget. I was already GPU-bound on a lot of my tech before DOTS. DOTS lets me perform extra preprocessing on the CPU efficiently so that the GPU can perform its tasks more easily. This lets me target weaker GPUs without having to invest in more art resources.

Looks like Unreal rolled out their real-time hair as I suspected they would. Interestingly enough they also made USD a first class citizen in the engine.

https://docs.unrealengine.com/en-US/Engine/HairRendering/index.html

EDIT CORRECT LINK

@francois85 I don’t know. It looks nice, but I am not particular impressed by the result atm.
Isn’t this something, that can be achieved with few meshes and maybe bones, or soft bodies?
Maybe if I would see demo with longer softer hair instead, affected by different wind direction, or something in this context, then I would like it more.

I agree this is not there yet but its a pretty impressive first step towards what is expected in VFX/Animation. In VFX animation there is not way of cheating this stuff especially on digital doubles, you need breakup and showing between strands. Trust me so much resources go into solving and rendering hair and Unreal knows it. If they can get this up to standard it will be a huge motivation for studios to jump on board.

@Antypodish While you could get similar results with an excellent mesh setup, having a realtime solution allows far faster iteration to your final result. There’s a huge delta in the workflow from grooming a hair/fur description to going the hair mesh card workflow, and it reminds me a bit of the difference between sculpting a complex highres organic mesh vs the hell that is manual edgeloop modelling a complex organic mesh.

I think its a little early to be talking about hair in dots when we dont even have a proper animation package yet, but I am all for realtime hair in the future.

It looks like they are using an extremely low number of guide hairs in that video. And by extremely low, I mean one per each curl. This is a low enough resolution that I’ve seen people match this quality using bones and bone-based physics.

For me this is more showing intent of what they are targeting witch is the start of trying to get cg production ready real time hair.

Personally I’m interested in character fx and love working in Unity so my hope is that one day I can merge the two.

Honestly I think they are missing the point. I have not seen any piece of software which allows for IK over FK animation tightly integrated with a scriptable game logic interface and physics guides for rapidly creating character interactions with an environment. Hair and cloth can be done in already existing tools as a final step after the main animation is done and re-integrated using alembic or similar.

Well, considering hairs and fur were possible even over 10 years ago

Black & White 2 (2005)

Yea I agree but hair and cloth can not be be done for vfx with current tools in real time engines. Rigging a vfx groom would be a mental task ( seen it done for shot specific reason but it was hell … widow makers) for how heavy they are , we are talking for a human groom 10-4-million points and when get to apes it 10-20x that amount.

Usual simulated strands are also needed for high detailed sims like wind, rain drops ect

This was about 7-10 years ago
5267607--527184--upload_2019-12-10_10-4-2.png

2 Likes

Hi,

here some fast tests with DOTs and HDRP (DX11 and DX12 + DXR) who worked out great so far.
It´s based on VHair from kennux.
https://github.com/kennux/VHair
and comes with working wind and sphere colliders and is in an experimental stage.

I added, on a naiv approach, 3 hair layers (simple offsets) and with HDRP Hair Master Node.
2 opaque layers and one 1 transparent layer additive blended on the top to simulate sun bleeching.

So far on HDRP 7.1.6 DX11,

8x MSAA,
TAA,
IBL Lighting,
Directional Light,
Point Lights,
Shadows,
PPV3 DOF,
and PPV3 AO (still some little artifacts on the hair)
on a
skinned mesh and the wind
are working nicely.

Here some first movement and lighting tests with
around 12 000 strands (96 000 vertices)

The problem is the need of cranking up AO so much to get a dense behaviour towards the skin. However the scalp could be painted more dark by hand.

I did an second test with
HDRP 7.1.7 DX12 DXR
and used the PPV3 Raytraced AO between the skin and the hair layers per layer mask.

perfect!

Overall I think this is could be a way to go.

At the moment i am rendering and bursting 3 times the hair meshes per head whats pretty stupid.

With the new MeshAPI there should be further massive performance improvements possible
https://github.com/Unity-Technologies/MeshApiExamples-2020.1

I really like that the CPU is doing most all the work for interactivity.

I am using 3 sphere colliders here for head, neck and body.
There is a more modern approach here with sdf collision in the the new dev branch from TressFX,

So i think HDRP with Visual Effect Graph in combination with SG could be an potential solution too to directly build up on the 4.1 approach.

4 Likes

You have no idea how happy this made me. Do you have a YouTube link by any chance I would love a share this.

1 Like

I only have the video here. Do you have access?
https://drive.google.com/file/d/10r3uHCg5MBTA--0E1XOpWF8NTeAvrUeM/view?usp=sharing

some HQ interactive Grass and Hair are the last needed things to finally get over to HDRP.

I think with a little community effort this is pretty fast done.
I will forward this thread to kennux. Let s see.

1 Like