Skip to content

Create a new virtual character

Philippe Gauthier edited this page Aug 30, 2021 · 12 revisions

Content

Via Autodesk Character Generator it is possible to chose the agent aspect. When a new character is created, make sure that the following parameter are set:

  • Name : just give the name you want
  • Character Heigth : chose the height
  • Poly Resolutions : the highest resolution - High
  • Geometry : Triangles
  • Textures : Clothes
  • Facial Expressions : Facial bone rig
  • Generate : Generic .fbx
  • Skeleton Resolution : High
  • Character Orientation : Y-up

Once generate the character design, you can download the .fbx file.

Import the fbx file in 3DS Max and make sure to set these parameters:

Include --> Animation --> Bone creation --> Bone conversion --> Leave as bones Include --> Geometry --> select: "Smoothing Grooups"

drawing

Select "OK" and you will see the agent on 3ds max scene. Go head and export the virtual agent. Before export the agent create a folder with the character name in <GRETA_DIR>/bin/Player/Data/media/<agent name>. Inside this folder create a new folder that has to be called "export".

Now the agent can be export in the created "export" folder. Make sure that when you export, in the option "Save as type", "OGRE Scene (*.SCENE)" has been selected (see figure below).

drawing

Select "OK" and set these parameters:

  • Ogre version: Ogre 1.7
  • Ressources prefix: empty
  • Material sub dir: material
  • Texture sub dir: bitmap
  • Mesh sub dir: mesh
  • Program sub dir: program
  • Y up axis: select
  • Use shared deometry: not select
  • Generate LOD: not select
  • Build edges list: not select
  • Build tangent: not select

drawing

Inside the folder https://github.com/gretaproject/greta/tree/master/tools there is "CorrectionMesh" project. Open the project with NetBeans and edit the java class "AutodeskCharacter":

  • find the line: static private String characterName = "francois" and change the charactername with the name of the folder created at the previous step with inside the export folder;
  • find the line: static private String baseName = <type>. When a new character is created, "body" should be used. But when a character can have several appearances (usually different outfits) then the name must be changed to not overwrite other meshes (including "body"). For example for Camille, three meshes were made: a "body" by default, a "football" (in football uniform) and a "patient" (in hospital patient's outfit).

Once these changes have been made the AutodeskCharacter.java class can be Run. When it stop check that in the folder <GRETA_DIR>/bin/Player/Data/media/<agent name> there are:

  • .material
  • .mesh
  • .skeleton
  • some textures

The folder "export" is not useful anymore so it can be deleted.

It is then strongly recommended to copy the contents of the file .material without the first line in the file <GRETA_DIR>/bin/Player/Data/media/autodesk.material. You have to put the copied content before the last material named _Eye_trans. We must also pay attention to duplicates. Especially in the case of characters with multiple appearances, the hair is in materials always having the same name. Also the .material file is no longer useful for you. You can delete it.

The last steps to add successfully the new agent in Greta are:

  • in the Greta.ini file (<GRETA_DIR>/bin/Greta.ini) the Character definition has to be added:

<AGENT NAME>= ./Common/Data/characters/<Agent name>.ini (Example: CAMILLE = ./Common/Data/characters/Camille.ini )

  • create the .ini file in the folder <GRETA_DIR>/bin/Common/Data/characters/.

Replace (ASPECT = ) with the folder name you create at the step 2 (<GRETA_DIR>/bin/Player/Data/media/<agent name>).

drawing

  • in the <GRETA_DIR>/bin/Player/Data/agentList.xml add the following lines:
<agent name="<aspect>" type="autodesk" scale="1">
	<all mesh="<nom du personnage>/<type>.mesh" />
</agent>

After the step 1. you will have a fbx file and some textures. To add the created agent in a Unity scene:

  • create a folder with the character name inside the "Asset" folder;
  • in the folder just creatd "Import a new asset" and select the .fbx file
  • once added the asset, select it and go to the inspector. In the Materials section click on Extract textures and select the folder with the agent texture downloaded at the step 1 (1. Create the character).

drawing

To make the Unity and Greta comunicate see the page GretaUnity.

For a more customized and realistic look in Unity, read the following instructions.

Getting started with Greta

Greta Architecture

Quick start

Advanced

Functionalities

Core functionality

Auxiliary functionalities

Preview functionality

Nothing to show here

Previous functionality (possibly it still works, but not supported anymore)

Clone this wiki locally