Coder Social home page Coder Social logo

gac's Introduction

GAC (Generic Avatar Creator)

Avatar creation tool for Unity

How it works

GAC uses bone scaling to modify a base mesh. Once the "DNA" for a character is setup, modifying the character is as easy as setting its "Height", "Foot Size", or any other attribute you setup.

Installation

Download this repo and copy the GAC folder (Assets/GAC) into your projects's Asset folder. If you would like a sample "DNA" file for the Male sample character, copy the Resources folder (Assets/Resources) into your projects's Assets folder.

Usage

There are a few component that are key to how GAC works

DNA

The DNA for a character is a collection of Genes. Every Gene has a name, value, and a list of bones to effect with a mask for how they will be influenced by the gene. For instance, a Foot Size gene may include the bones in both feet, each sporting a mask of (1, 1, 1) so that they scale in all directions. This way, when "Foot Size" is set to 2, the feet will become twice as big as those of the base model.

Base Characters

Base characters are normally a generic model with an Armature and without any fluff pieces, though the Armature is the only necessary part, since the body model can be added as a component. The base character serves as a baseline that will be modified by the character's DNA. A base character needn't be a human or even humanoid. Since the DNA can be setup for any Armature structure, GAC is completely character structure independent letting it be used for human, dogs, monsters, or anything else.

Character Components

Components are additional things you want to put on the character, such as clothes, replacement features (elf ears, claws, ...), or even body models because all that is really needed for the base character is its Armature. When a component is added to a character, a copy of the template game object is made, added as a child object, and then attached to the character's Armature. This means that the components are standard Unity object and can have colliders, scripts, and any other component. Creating components is exactly like creating any other object in Unity. Any piece of clothing will fit the character (with any modification from the DNA) as long as the component's model is properly skinned to an armature. THe easiest way to do this is to model clothes directly from the base model to make sure it will deform correctly.

Credits

This was made by Richard Kopelow

License

This project is under the SIT-License that can be found here A copy of this license can also be found in the root of this repo

gac's People

Contributors

richardkopelow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gac's Issues

Bone space scaling problem

It seems that there is some improper scaling of child bones going on. I am seeing some bleed to child bones but I am not seeing it very consistently. Maybe a problem with the vector transformation code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.