Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3d emotes #252

Merged
merged 17 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions content/creator/wearables-and-emotes/emotes/creating-emotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ You can find a more detailed explanation of the animation specifications [**belo

This documentation explains the set up for Rig 1.0, its controls, and features.

[Decentraland Blender Rig](https://raw.githubusercontent.com/decentraland/documentation-creators/main/images/emotes/BaseMale_Rig_1.0.blend)
[Decentraland Blender Rig](/images/emotes/Avatar_File.blend)

{{< hint info >}}
If you're using Maya you can download this [Maya Rig](/images/emotes/DCL_Maya_Rig.ma) and [picker](/images/emotes/emoteAvatar.pkr) provided by [SparkleStudios](https://www.sparkles.studio/) ❤️.
{{< /hint >}}

## **Frame Rate**

Expand All @@ -59,7 +63,7 @@ In the rig file provided, there’s already an action, the _**Starting_Pose**_.
**💡 Hint!**

If you want to do a loop animation, you don’t have to start the animation from the Starting Pose. Feel free to use the pose that makes more sense in your animation!\*\*
{{< /hint >}}


## **Blender Interface for Animations**

Expand Down Expand Up @@ -194,7 +198,7 @@ If the number of frames of the animation can be divided by the sampling rate, th

## **File Size**

The max file size is **1 MB**. If the file is over that after exporting, try checking if the mesh wasn’t exported by accident or if the animation isn’t over 10 seconds. If it is still over 1 MB, try experimenting with the Sampling Rate, as higher values will improve the optimization.
The max file size is **3 MB**. If the file is over that after exporting, try checking if the mesh wasn’t exported by accident or if the animation isn’t over 10 seconds. If it is still over 3 MB, try experimenting with the Sampling Rate, as higher values will improve the optimization.

# **Exporting**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ return false
<a onclick="changeProfile()" style="cursor: pointer">Change avatar ↺</a> - <a onclick="changeEmote()" style="cursor: pointer">Change emote ↺</a>


Emotes are animation sequences for avatars’ skeleton bones, which are defined in a transport file, usually in `.glb`, or `.gltf` formats.
Emotes are animation sequences for avatars’ skeleton bones, which are defined in a transport file, usually in `.glb`, or `.gltf` formats. An emote can include sound, or even an animated 3d geometry attached to it. For more information check [Adding Props and Sounds to your Emotes](/creator/emotes/props-and-sounds).

There are a selection of free default Emotes that are available to any user, but Decentraland also supports the creation and use of custom Emotes that are represented by non-fungible tokens ( NFTs). This allows a finite amount of different Emotes to be created, or minted, on the blockchain, similar to **[Wearables]({{< ref "/content/creator/wearables-and-emotes/wearables/wearables-overview.md" >}})**.

Expand Down
210 changes: 210 additions & 0 deletions content/creator/wearables-and-emotes/emotes/props-and-sounds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
---
date: 2023-21-09
title: Adding Props and Sounds to your Emotes
description: Guidelines to add props and sounds to the emotes.
categories:
- emotes
type: Document
aliases:
- /emotes/props-and-sounds/
url: /creator/emotes/props-and-sounds
weight: 5
---

<img src="/images/wearables-and-emotes/props-and-sound/01-props-and-sound-banner.png" width="900" />

In order to take your Decentraland Emotes to the next level you can add props (3d geometry) and/or sounds to them, doing the emotes much more fun and engaging! In this guideline you will find everything you need to know to export them correctly!

# **The Basics and Limitations**

To start adding the props to your emotes it's important to use the [Decentraland Template File](https://raw.githubusercontent.com/decentraland/documentation-creators/main/images/emotes/BaseMale_Rig_1.0.blend) which will have the rig for the avatar and also the Ground Reference to keep your work inside the allowed space boundaries.

**Currently, the props animations only work with **Armature/Bones Animations** meaning that _transform animations_ are not allowed.**

The emote with their props must be exported all together in one single _.glb_ file (Avatar_Armature + Props_Armature with its animations).

- The size limit per emote is 3MB (megabytes) in total (incluiding prop and sounds).

- The tris limit per emote is 3000 tris (including all props).

- No more than 2 materials and 2 textures for props.

- No more than 62 bones for the armature.

- The emote must have one animation for the avatar and one animation for the prop. _Currently multiple animations are not allowed._

- Both animations (Avatar and Prop) must have the same keyframe length.

- Each animation cannot exceed more than 299 frames or 10 seconds.

- The space boundaries are the same as standard emotes. For more information check [the space limitations](https://docs.decentraland.org/creator/emotes/creating-and-exporting-emotes/#the-animation-specifications).

# **Naming Conventions:**

Naming conventions must be strictly followed for the emotes to work! Otherwise they will not play correctly neither in the builder nor in world.

### Armatures Name Conventions:

**For Avatar:**

`Armature`

**For Props:**

`Armature_Prop`

### Animations Name Conventions:

**For Avatar:**

`AnimationName_Avatar`

- Example: `TennisServe_Avatar`, `GunShoot_Avatar`

**For Props:**

`AnimationName_Prop`

- Example: `TennisServe_Prop`, `GunShoot_Prop`

# **Getting Started**

Before starting you animation, you will have to create a rig for the prop. If you’re not familiar with the process, check [Create a Rig](https://www.notion.so/Create-a-Rig-686e6f59a1604585b059f990a36b2d55?pvs=21) for more information on how to do it.

Ensure that the prop object and armature have their origins located at the 0,0 location within Blender. Additionally, apply transformations to the prop object and armature, ensuring they are frozen at a scale of 1,1,1. This is crucial to prevent any potential issues with the prop's behavior when being utilized within the world or during animations.

<img src="/images/wearables-and-emotes/props-and-sound/18-freeze-transforms.png" width="600" />

### Making the Prop Follow the Avatar Rig

Some props might have to be attached to certain body parts, like a tennis racket to the hand. That can be done by simply adding a constraint. To do so, in **_Pose Mode_**, select the prop bone (the tennis racket one, for example), press **_CTRL + Shift + C_** on your keyborad and select **_Child of_** or just click on the **_Bone Constraint Properties_** tab and, in the drop down menu, select **_Child of_**.

<img src="/images/wearables-and-emotes/props-and-sound/14-add-constrain.png" width="400" />

_Add a constraint by pressing `Ctrl + Shift + C` on your keyboard._

<img src="/images/wearables-and-emotes/props-and-sound/15-add-constrain-02.png" width="400" />

Then, in **_Target_**, select the avatar armature and in **_Bone_** select the bone you want the prop to follow. To maintain the prop’s original position, click on **_Set Inverse_** once you add the constraint. If the influence is 1, the prop will fully follow the selected bone, if it’s 0, the constraint will be disabled. You can set keyframes on the influence to turn it on and off throughout the animation. To do that, just press I while the cursor is on top of **_Influence_**.

<img src="/images/wearables-and-emotes/props-and-sound/16-target.png" width="600" />

_***Chlid of*** constraint menu. Keyframe the influence to turn it on and off._

If you use the slide to turn off the Influence, the prop will not maintain its previous position, making it hard to keep the animation fluid. To avoid having to manually fix the position, instead of using the slide, click on the X next to Influence, set a keyframe on it and another one on all the transform attributes. This way the prop will keep the same poistion as when the Influence was on!

<img src="/images/wearables-and-emotes/props-and-sound/17-influence.gif" width="600" />

{{< hint info >}}
**💡Animation Tip**

Don’t leave the prop visible from the start! To avoid spoiling what’s about to happen and an abrupt transition, start the animation with the prop scaled down to 0.001 and only turn it to 1 when you want it to appear. Remember to scale back down to 0 by the end of the action. This will make the transitions much more fluid and cool!
{{< /hint >}}

# **Exporting**

In order for all the animations to be exported, the clips should be added to the NLA Tracks. Make sure there’s only one animation clip for the avatar and another one for the prop, **they must have the exact same number of frames.**

In Object Mode, select the avatar armature, select the respective animation clip in the Browse Action menu and click on the Push Down button.

Then, select prop armature, select the proper animation clip for it and click on the Push Down button again.

<img src="/images/wearables-and-emotes/props-and-sound/02-nla-tracks.png" width="600" />

{{< hint info >}}
**🔥 Optimization Tip**

**Before this step make sure to do a backup of your project.**

If you have different objects for your props you can merge them together in one single mesh. This would help to reduce the draw calls in game making the emote more performant.

<img src="/images/wearables-and-emotes/props-and-sound/03-merge-mesh.png" width="400" />

_Select objects and press `Ctrl+J` to merge them together._

<img src="/images/wearables-and-emotes/props-and-sound/04-merge-mesh-02.png" width="400" />

{{< /hint >}}

To export **be sure to select only both Avatar and Prop Armatures with its animations and the Prop mesh**. Then go to the export glb settings and be sure to export only selected objects and untoggle unnecessary features like _Shapekeys Animation_. Always remember to enable Export Deformation Bones Only, so you don’t end up exporting unnecessary bones, like controls.


<img src="/images/wearables-and-emotes/props-and-sound/05-export-props.png" width="600" />

<img src="/images/wearables-and-emotes/props-and-sound/06-export-settings.png" width="600" />

<img src="/images/wearables-and-emotes/props-and-sound/13-export-deformation-bones.png" width="600" />

_Under *Data>Armature* make sure to toggle **Export Deformation Bones Only**_

{{< hint info >}}
**💡 Attention!**
You should **NOT** export the avatar mesh into the .glb.
{{< /hint >}}

# **Add Audio to the Emotes**

## Format and Limitations for Audio Clips

- The correct format to export sounds for your emotes are `.mp3` and `.ogg`.

- The audio clip must have the same duration as the emote.

- While there is no limitation for size in the audio, the emote with props and sounds cannot be bigger than 3mb.

{{< hint info >}}
**💡 Attention!**
Take into consideration that audio clips used in the emote must be original IP (Intellectual Property), having the rights for reproducing and follows the [Content Policy](https://decentraland.org/content/)criteria.
{{< /hint >}}

## Editing Sounds

To add sounds to your emotes you can do it in different ways:

1. **Edit your sounds directly on Blender**

One way to add sounds to your emotes is using the video sequencer editor that Blender provides.

To start adding sounds go to _Editor Type> Video Sequencer._

<img src="/images/wearables-and-emotes/props-and-sound/07-video-sequencer.png" width="400" />

Drag and Drop you sounds to the channels interface.

<img src="/images/wearables-and-emotes/props-and-sound/08-drag-sound.png" width="600" />

Press the shortcut `N` to see more options to handle your sounds like displaying waveform, make your sounds Mono or changing the volume.

<img src="/images/wearables-and-emotes/props-and-sound/09-sound-properties.png" width="400" />

{{< hint info >}}
If you want to fade in and out you can simply do it by adding keyframes from 0 to 1 and viceversa to the volume property.
{{< /hint >}}

Once you finished to edit your sounds you can export it going to _Render> Render Audio_. In the exporting option you need to select `.mp3` or `.ogg` format in the _Container_ section and then _Mixdown_. **Only the audio within the frame range will be exported.**

<img src="/images/wearables-and-emotes/props-and-sound/10-export-sound.png" width="600" />

2. **Render animation and add sound with a sound edit software**

While editing sounds directly in Blender can be convenient, it is not very flexible because the software is not primarily focused on sound editing. The available tools are very basic. If you want to add a more professional touch to your sounds, we recommend using dedicated sound editing software of your choice.

There are several software options you can use, such as [Audacity](https://www.audacityteam.org/) (Free and OpenSource), Adobe Audition, Ableton Live, or ProTools. Using dedicated sound editing software will provide you with a wider range of tools, functionalities, and sound effects, allowing you to enhance your sounds and give them a more professional feel.

To render your emote you can simply add a camera to your Blender scene and position it in a way you can see all the elements as clearly as possible to later have a good reference to add sounds.

<img src="/images/wearables-and-emotes/props-and-sound/11-setting-render.png" width="600" />

When rendering an emote, it is important to only include the frame range of your emote and not more. Choose an aspect ratio that suits your needs and select the output folder where you want the video or image sequence to be saved.

{{< hint info >}}
**Hint!**

<img src="/images/wearables-and-emotes/props-and-sound/12-sampling-render.png" width="400" />

_Before rendering make sure you do a low sampling rendering to save time in your render!_

{{< /hint >}}

Once this step is completed, use your video as a reference to create the corresponding sounds using your preferred sound editing software. **Ensure that the video sequence matches the animation's framerate of 30 frames per second (fps)**

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,34 @@ You will be asked to enter a name for your emote, define its rarity, the categor

<img src="/images/wearables-and-emotes/uploading-emotes/02_new_emote.png" width="400" />

## **Uploading Emotes Using a .zip File**

If the emote has sound (*mp3* or *ogg*) it must be zipped with the `.glb`. After that, just drag and drop the `.zip` to the builder. Also, it is possible to add a `.json` file along with the other assets in the same `.zip` to add name, description, rarity, category, play mode and/or tags. These are the definitions for each:

- `name`: Name of the Emote
- `description`: Description of your Emote (no more than 64 characters in total, counting spaces)
- `category`: Category of the Emote ("dance", "stunt", "greetings", "fun", "poses", "reactions", "horror", "miscellaneous")
- `rarity`: Rarity of the Item ("unique", "mythic", "legendary", "epic", "rare", "uncommon", "common")
- `play_mode`: Simple or Loop Animation ("simple", "loop")
- `tags`: Tags for easy finding in the marketplace.

To add those definitions to the emote just create a text file, naming it **emote.json** and add the following lines as the example:

```
{
"name": "Tennis Shot",
"description": "Show me you can do tennis",
"category": "fun",
"rarity":"epic",
"play_mode": "simple",
"tags":["tennis", "emote", "shot"]

}

```

This way the builder is going to take all the .json information and it automatically to the emote.

## **Rarity**

Add rarity of the emote:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ You can set the price of your wearable by clicking on **_Set Price_**. This can

You could also **_Make it Free_**, which means that the price will be set as 0 MANA and the beneficiary address will be null. Know that making it free (primary sale) does not prevent it from being sold at any price as a secondary sale.

Don’t forget to set the beneficiary address, which is the one that will receive the MANA from your sales. You can use any Ethereum address you like. To automatically fill in the address you are logged in with, click **_I’m the Beneficiary._**
Don’t forget to set the beneficiary address, which is the one that will receive the MANA from your sales. You can use any Ethereum address you like. To automatically fill in the address you are logged in with, click **_I’m the Beneficiary._**

<img src="/images/wearables-and-emotes/uploading-wearables/12_set_price.png" width="400"/>

Expand All @@ -111,7 +111,7 @@ Overrides determine which Wearable categories or avatar body parts your item wil
- **Wearables**: This includes other Wearable categories. You can hide multiple categories. For more details on each category and how items interact, refer to **[Creating Wearables](https://docs.decentraland.org/creator/wearables/creating-wearables/)**.

{{< hint warning >}}
Note: The overrides you select will be the suggested default settings for your Wearable. However, users can customize which Wearables are hidden or showing from the Backpack.
Note: Overrides are suggested default settings for your wearables. However, users can choose to hide or unhide wearables from their backpack.
{{< /hint >}}

## **Tags**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ There’s a growing range of available wearables including cyberpunk themed snea

By default, Decentraland Wearables are minted on the Polygon/Matic side-chain so users can mint, buy, sell, or transfer items without having to pay gas fees.

# What Are Smart Wearables?

Smart wearables are portable experiences that are turned on when the player puts on a certain item of clothing. Smart wearables can grant players new abilities, like a jetpack that lets them fly, or add a new layer of content on top of the rest of the world, like randomly placing coins to be collected throughout the whole of genesis city.

To know how to create **Smart Wearables** you can follow these [guidelines.](https://docs.decentraland.org/creator/development-guide/sdk7/smart-wearables/)

{{< hint warning >}}
Smart wearables, as a subset of wearables, possess the capability to integrate advanced interactions and functionalities. Consequently, proficient skills in coding are necessary to unlock their full potential and enhance their features.
{{< /hint >}}

# Wearable Categories

Each wearable has a specific category that determines which body part in the avatar system (e.g. head, upper body, etc.) the wearable will be applied to. Certain wearables will impact whether or not other wearables are rendered, depending on the specific category. Some wearables will entirely replace others with sometimes unexpected and surprising results. See the list below for details.
Expand Down
Binary file added static/images/emotes/Avatar_File.blend
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.