Skip to content

An NPC Building solution for Unity3D. Allows you to create NPC models by combining pieces together.

License

Notifications You must be signed in to change notification settings

TheGameMecha/NPCBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPCBuilder

An NPC Building solution for Unity3D. Allows you to create NPC models by combining body parts in different variations together.

Credits

Installation

Download the .unitypackage file from the Releases tab and Import it into Unity

Usage

Since the original usage of this tool was to put clothing on a model, your NPC avatar needs a base model for the other pieces to be stiched onto. This can be a generic body that they all share, or even an invisible piece if you want to build a full model.

Model Assembly

In order to utilize this tool, you'll need to prepare your body part models in a specific way:

  • Each "body part" must be a separate object within your 3D modeling program
  • All the parts must be rigged to the same skeleton
  • Models can share a material, but do not have to
  • If you chose to use one material, you will want to select the "Use One Material" checkbox in the NPC Builder component
  • Model should be a *.fbx file with skeleton data included

Creating NPC Body Parts

A full NPC is comprised of any number of body parts you want. The way this tool is setup is for low-poly models so it uses 5 parts:

  • Head
  • Body
  • Right Arm
  • Left Arm
  • Legs

You'll need to create the data for each individual piece you want to be usable by the Builder. This can be done by opening your project window and right clicking, Create > NPC Builder > NPC Body Part

Creating an NPC Template

In order for the builder to create your NPC, it needs a template telling it which parts to use.

  • Create an NPC Template by opening your project window and right clicking, Create > NPC Builder > NPC Template
  • In the Template File, select the number of body parts to use (5 for standard models) and drag in the associated body part.

Your NPC Template can now be used by the NPC Builder component.

Using the NPCBuilder Component

  • Attach this component to your NPC GameObject containing the logic for controlling how the NPC moves etc.
  • Drag in your NPC Data file and the Base model into their respective property fields
  • If you want to use only 1 material, select the "Use One Material" checkbox and drag in the material. This will optimize your model into 1 skinned mesh renderer, improving performance.

Using the NPC Generator

If you wish to create a large number of NPCs with variations of models for the different body parts, you can use the included NPC Generator Window to do that

  • At the top Menu, select NPC Builder > NPC Generator
  • Select the number of NPCs you wish to Generate
  • Select the number of body part variations to use for each different body part
  • Select the body part variations you wish to us
  • Hit "Generate"

Your Generated NPCs can be found in Assets/NPCBuilder/Data/

Suggestions & Issues

If you find an issue with the NPC Builder tool or wish to request a feature, please open an issue :)

About

An NPC Building solution for Unity3D. Allows you to create NPC models by combining pieces together.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages