Profile Picture

Unity Auto Setup

Posted By Victor.Soupday 3 Years Ago
Rated 5 stars based on 10 votes.
Author
Message
tantrum
tantrum
Posted 3 Years Ago
View Quick Profile
Junior Member

Junior Member (238 reputation)Junior Member (238 reputation)Junior Member (238 reputation)Junior Member (238 reputation)Junior Member (238 reputation)Junior Member (238 reputation)Junior Member (238 reputation)Junior Member (238 reputation)Junior Member (238 reputation)

Group: Forum Members
Last Active: 3 days ago
Posts: 28, Visits: 463
One of the first things I noticed is something clipping in the eye shader processing once it reaches the edge of the camera/view.

I checked in play mode and panned the camera to see it going on and off, and affecting each eye as it approached the edge independently:

 

A question for you though please, where - if anywhere at all - would you like something like this to be reported?  Here, or a github issue, or somewhere/nowhere else?
Victor.Soupday
Victor.Soupday
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)

Group: Forum Members
Last Active: 14 minutes ago
Posts: 519, Visits: 7.2K
tantrum (7/27/2021)
One of the first things I noticed is something clipping in the eye shader processing once it reaches the edge of the camera/view.


In the Screen Space Refraction volume override of your volume profile for the scene, there should be a "Screen Weight Distance" parameter that controls how much it fades out the refraction effect at the edges of the screen, setting this to it's lowest value will fix that problem. (Also make sure you have a Reflection Probe with a Reflection Proxy Volume, otherwise the refraction effects don't work properly.)

Alternatively if the refractive eyes are causing too many issues you can just turn off the refraction effect in the Cornea materials or uncheck the 'Eyes - refractive' box in the 'CC3 Import Tool' window when building the materials.

I checked in play mode and panned the camera to see it going on and off, and affecting each eye as it approached the edge independently:
A question for you though please, where - if anywhere at all - would you like something like this to be reported?  Here, or a github issue, or somewhere/nowhere else?


Here and/or Github, I'll be notified of both.
Victor.Soupday
Victor.Soupday
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)

Group: Forum Members
Last Active: 14 minutes ago
Posts: 519, Visits: 7.2K
tantrum (7/27/2021)
I've yet to fathom or compare the cost associated with the shaders and textures necessary to achieve these results, I don't expect it to be free but I'm hoping its not too heavy for realtime use with multiple characters on screen


It's surprisingly light on performance, I was expecting the Shader Graph's to be much much slower than the HDRP/Lit shaders, but even when filling the enitre screen they are only around 10% slower. The biggest hit will be texture memory, but whether it's performance or memory that's what the 'Bake' function is for, it uses Compute Shaders to bake all the shader graph inputs down to just the packed HDRP/Lit textures: e.g. The Skin/Head shader uses 14 textures in total but it bakes down to just 6 and the other materials bake to just 4 textures.

Victor.Soupday
Victor.Soupday
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)

Group: Forum Members
Last Active: 14 minutes ago
Posts: 519, Visits: 7.2K
tantrum (7/27/2021)
I don't know if anything can be done at the shadergraph level about the softness of the hair rendering (the way it practically looks blurred in CC3 but like solid spaghetti strands in Unity), that would be something I'd like to see the gap narrowed on if feasible.


So I got to thinking:
The alpha remap is there almost exclusively to make the depth prepass work as it should.
The alpha power is to tweak the hair thickness.
But... I have been running the alpha channel through the power function first, then the remap. But this means the power function changes the results of the remap making eveything inconsistent.
If I swap those around, the remap (and thus the depth prepass) will always be consistent and the power function will change the thickness/thinness of the remain alpha range...

Swapping the order of the functions and using a low alpha remap (0.5) and a higher alpha power (1.5) achieves this kind of result:

https://forum.reallusion.com/uploads/images/456593a1-ceae-4bc1-8734-4d23.png

It's not a huge improvement but it is much more consistent, and means more accurate depth prepass and less cartoonishly thick hair.

I'll put these changes into the next update.
Edited
3 Years Ago by Victor.Soupday
Necka
Necka
Posted 3 Years Ago
View Quick Profile
Veteran Member

Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 62, Visits: 407
Victor.Soupday (7/27/2021)

So I got to thinking:
The alpha remap is there almost exclusively to make the depth prepass work as it should.
The alpha power is to tweak the hair thickness.
But... I have been running the alpha channel through the power function first, then the remap. But this means the power function changes the results of the remap making eveything inconsistent.
If I swap those around, the remap (and thus the depth prepass) will always be consistent and the power function will change the thickness/thinness of the remain alpha range...

Swapping the order of the functions and using a low alpha remap (0.5) and a higher alpha power (1.5) achieves this kind of result:

It's not a huge improvement but it is much more consistent, and means more accurate depth prepass and less cartoonishly thick hair.

I'll put these changes into the next update.


To me it's a good improvement honestly.

Like the previous comment said, there is something with the Hair in CC that gives it some kind of soft blur that is very pleasant and avoid the harsh strands look. Is there nothing possible to soften this kind of what Reallusion did with their own Shader?

Don't get me wrong, the results are impressive with your shader (I'm going to test it now with some of my characters)
Edited
3 Years Ago by Necka
Necka
Necka
Posted 3 Years Ago
View Quick Profile
Veteran Member

Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)Veteran Member (535 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 62, Visits: 407
EDIT: Opened an issue directly on GitHub to avoid spam
Edited
3 Years Ago by Necka
Victor.Soupday
Victor.Soupday
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)

Group: Forum Members
Last Active: 14 minutes ago
Posts: 519, Visits: 7.2K
I have a feeling some of that is down to the strong anti-aliasing in CC3, and the blur filter in some of the lighting setups.

https://forum.reallusion.com/uploads/images/44a54cf7-5197-47f9-83f1-a540.png
Edited
3 Years Ago by Victor.Soupday
cly3d
cly3d
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)

Group: Forum Members
Last Active: Last Year
Posts: 104, Visits: 689
Just wanted to say, Victor.Soupday - you're doing a fantastic job. This new importer is leagues ahead of what Reallusion or Unity did before. The characters actually look like what they do in CC3, inside of Unity.
Unity should be rewarding you for keeping them relevant in the filmmaking space. Their main competitor, UE (and their Metahuman) is marching ahead.
I'll make this known to Unity.
Granted, Reallusion got a fat chunk of change from Epic, to keep developing pipelines for them. Unity shamefully, is scattered all over the place. I keep telling them they need more than Engineers to stay relevant.
Film-Game convergence is a thing.

*edit* 
Some thoughts:
Could you expose sliders for tessellation to smoothen out edges on arms etc (this is from a filmmakers point of view)
At times on first importing the character, in 2020.3.12f1 there's random "couldnt create avatar" errors. The fix for me, seems to be to change the dropdown from humanoid to none (without hitting the apply) and then back to humaniod and then hitting the apply.
 
Edited
3 Years Ago by cly3d
Victor.Soupday
Victor.Soupday
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)Distinguished Member (5.2K reputation)

Group: Forum Members
Last Active: 14 minutes ago
Posts: 519, Visits: 7.2K
cly3d (7/27/2021)
Could you expose sliders for tessellation to smoothen out edges on arms etc (this is from a filmmakers point of view)



Unfortunately the Unity devs have not yet supported Tessellation with Shader Graph, but there is a way around this.

To reduce texture load and improve rendering performance I made the Bake function, that uses Compute shaders to bake the complex shader graphs down to textures compatible with the HDRP/Lit shaders. Though the Hair, Eyes, Eye Occlusion and Tearline shaders still need to be custom Shader Graphs, though much simpler ones, as they have vertex displacement nodes and vertex color nodes. The Skin, Head, Teeth, Tongue and Cornea materials are all HDRP/Lit compatible.

The HDRP/Lit shader can then be swapped out for HDRP/LitTessellation in the Baked prefab.

On the left here is the baked character with shaders swapped to HDRP/Tessellation using Phong tessellation, on the right is the Shader Graph source it was baked from...

https://forum.reallusion.com/uploads/images/9f0741e8-a835-46d3-8921-17c4.png

And in Wireframe:

https://forum.reallusion.com/uploads/images/fc2201ea-f8fe-4919-a8a5-b907.png
Edited
3 Years Ago by Victor.Soupday
cly3d
cly3d
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)

Group: Forum Members
Last Active: Last Year
Posts: 104, Visits: 689
Oh! Beautiful! Thanks so much for the advice on this.



Reading This Topic