Profile Picture

Unity Dev Thread

Posted By MilesV 4 Years Ago
Rated 5 stars based on 2 votes.
1
2
3

Author
Message
staron
staron
Posted 4 Years Ago
View Quick Profile
Junior Member

Junior Member (129 reputation)Junior Member (129 reputation)Junior Member (129 reputation)Junior Member (129 reputation)Junior Member (129 reputation)Junior Member (129 reputation)Junior Member (129 reputation)Junior Member (129 reputation)Junior Member (129 reputation)

Group: Forum Members
Last Active: 7 Months Ago
Posts: 10, Visits: 712
This may be old news for most, but I just discovered that exporting the model in Unreal A-pose seems to fix the weird shoulder issue.
Necka
Necka
Posted 4 Years Ago
View Quick Profile
Veteran Member

Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 62, Visits: 407
gekido (7/3/2021)
Amazing work on the HDRP shaders - looks awesome. 

Are these something you are considering releasing (on the asset store or otherwise)? Would be a huge assistance for those of us that aren't very...shader-ey... to be able to replicate what Reallusion provides even remotely closely...


Seeing that his Blender auto-setup tool become the main choice for RL advertising it on their website + youtube... And seeing the quality of the work so far done in Unity, I'm assuming he's the chosen one to provide a performant auto-setup tool for Unity, at least for HDRP so far :)
gekido
gekido
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 60, Visits: 243
Amazing work on the HDRP shaders - looks awesome. 

Are these something you are considering releasing (on the asset store or otherwise)? Would be a huge assistance for those of us that aren't very...shader-ey... to be able to replicate what Reallusion provides even remotely closely...

www.twitter.com/gekido 
Necka
Necka
Posted 4 Years Ago
View Quick Profile
Veteran Member

Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 62, Visits: 407
Victor.Soupday (7/2/2021)
The tool menu functions are completely independant of the shader and material setup so I can show you that now:

https://soupday.github.io/code/MeshUtil.cs

(It's editor code so it needs to be placed in a folder named 'Editor')

But I pretty much have to do the same thing, look up the Blend shapes by name to get the index.

The only thing I can suggest is that you create a lookup table that lists all the blend shapes by name and that contains a dictionary of each Mesh object and the index of the blend shape. Something like:

public class BSLookup
{
    string shapeName;
    Dictionary<SkinnedMeshRenderer, int> indexCache;

    public void SetWeight(float weight)
    {
        foreach (KeyValuePair<SkinnedMeshRenderer, int> pair in indexCache)
            pair.Key.SetBlendShapeWeight(pair.Value, weight);
    }
}

public List<BSLookup> lookupTable;



This way you only search for the blend shape name once, but you will need to scan the entire character first to fill in the lookup table.




Thanks a lot for sharing

Looking up by name in editor time (or at Start) is completely fine, I just didn't want that for blendshape manipulation at runtime. Your tool is going to help me quite a lot here, thank you
Victor.Soupday
Victor.Soupday
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)

Group: Forum Members
Last Active: 5 days ago
Posts: 569, Visits: 9.0K
The tool menu functions are completely independant of the shader and material setup so I can show you that now:

https://soupday.github.io/code/MeshUtil.cs

(It's editor code so it needs to be placed in a folder named 'Editor')

But I pretty much have to do the same thing, look up the Blend shapes by name to get the index.

The only thing I can suggest is that you create a lookup table that lists all the blend shapes by name and that contains a dictionary of each Mesh object and the index of the blend shape. Something like:

public class BSLookup
{
    string shapeName;
    Dictionary<SkinnedMeshRenderer, int> indexCache;

    public void SetWeight(float weight)
    {
        foreach (KeyValuePair<SkinnedMeshRenderer, int> pair in indexCache)
            pair.Key.SetBlendShapeWeight(pair.Value, weight);
    }
}

public List<BSLookup> lookupTable;



This way you only search for the blend shape name once, but you will need to scan the entire character first to fill in the lookup table.


Necka
Necka
Posted 4 Years Ago
View Quick Profile
Veteran Member

Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)Veteran Member (569 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 62, Visits: 407
Victor.Soupday (7/2/2021)
Well... that works.




Ok I definitely would like to know how you prune blenshapes :D

I created this "bug report" https://www.reallusion.com/FeedBackTracker/Issue/Blendshapes-inconsistent-between-Body-and-Beards-Tested-with-EXplus-facial-profile 

Which is exactly about the inconsistency of Blendshapes between characters.

There is also the problem within CC that the "fix eye blink" feature doesn't fix it on the new EX+ blendshapes

I'm creating an expression manager in Unity, to easily animate CC3 character's expressions.
Basically animating all similar blendshape on the face from the different meshes (face, beard, mustache, brows)

But performance wise it's an issue to have on some meshes the blendshapes Smile Left at index 40 et on another mesh it's at index 41 as I have to lookup the blendshapes by name first and then by index

Would you be keen to share this Pruning script privately if I PM you? It could help me understand how I could maybe organize the blendshapes properly for a larger scope of use
Victor.Soupday
Victor.Soupday
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)

Group: Forum Members
Last Active: 5 days ago
Posts: 569, Visits: 9.0K
Like my Blender Setup add-on, it's a personal tool that I will make available, when it's ready.

My original intention was to make a pipeline for CC3 -> Blender -> Unity, I would bake the textures in Blender and set them up in Unity, but then I discovered baking the textures in Compute Shaders was 10x faster in Unity, so it's become a direct CC3 -> Unity setup.
tantrum
tantrum
Posted 4 Years Ago
View Quick Profile
Senior Member

Senior Member (271 reputation)Senior Member (271 reputation)Senior Member (271 reputation)Senior Member (271 reputation)Senior Member (271 reputation)Senior Member (271 reputation)Senior Member (271 reputation)Senior Member (271 reputation)Senior Member (271 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 28, Visits: 503
Looks like a good solution to it.

I'm sorry but I'm unfamiliar with the work you've been doing on this tool, is it some sort of asset that is or being made available somewhere?  Or is this just a personal / proprietary tool?
Victor.Soupday
Victor.Soupday
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)

Group: Forum Members
Last Active: 5 days ago
Posts: 569, Visits: 9.0K
Well... that works.


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

Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)Distinguished Member (5.8K reputation)

Group: Forum Members
Last Active: 5 days ago
Posts: 569, Visits: 9.0K
tantrum (7/2/2021)
I noticed the blend shapes, but it also seems that a lot are just dumped inactive into the mix.

I would have liked the groups to be documented if some only come into play under certain conditions, or removed if they play no part in the piece at all.  To that extent I created this issue a little while ago; I would be interested to hear your thoughts:
Smart Hair assignment of brow blend/morph shapes (name and quantity) - FeedBack Tracker (reallusion.com)

Personally, I don't like having to go through them one by one and guess or try to figure out if they are usable or not.


I've noticed different characters have different sets of blend shapes and I did think at the time that it culled the inactive blend shapes.

But if it isn't culling them or they are such a small influence that they don't have any visible effect, it should be possible in a script to build replacement meshes that only keep the blend shapes whose vertex delta's pass a certain threshold. I've already written a function to copy blend shapes from a source mesh into a new mesh and replace it in the prefab, putting a threshold condition on them is almost trivial. I can put that in the tool menu. e.g. select the character then: Menu->Tools->"Prune Blend Shapes" (assuming it works)



1
2
3



Reading This Topic