Open gamemachine opened 6 years ago
Are you combining the skinned meshes into a single one per character right now?
That's part of what I was working on here was to combine, since the existing system will only actually use one SMR (aside from the attachment stuff which I haven't tested). But this work got put on hold for now until I work out if the skinning approach itself will work for us. Specifically reconstructing normals.
Sounds great. I am only worried about the performance of runtime. But it's worth to try. I except your pull request.
Any news on this ?
To support things like character customization and clothing you need to break out all the stuff that is editor only mode. I started working on this not too far away from having something workable.
I split out the generation into two steps and created a template abstraction.
So you start with a template, which is your model and skinned mesh(s), along with a list of animation clips you populate manually. In a real workflow you won't be creating animation controllers. So the editor mode generator creates a temporary one for you and generates the AnimationBakeInfo's, which it saves with the template.
Step two continues but it doesn't have anything that requires UnityEditor. So you can swap meshes in your template and generate a new instance at runtime.
Most all of that leaves the existing code untouched for the most part. AnimationBakeInfo needed to be put into it's own file and made public. Loading instance data needs another option to load from a ScriptableObject container I use that holds templates and instances. But mostly it's just an addition.
I'll create a pull request once it's ready. And let me know if you have any thoughts on any of the above.