Polygonal Mind
  • Home
  • SERVICES
  • Projects
  • Decentraland
  • Blog
  • Assets
  • / CryptoAvatars

Blog

Decentraland for Starters

2/28/2020

0 Comments

 
EspaƱol
Premise
The 20th of February Decentraland was launched. For the ones who do not know, Decentraland is a virtual world backed by the Ethereum blockchain where its community owns the shape and purpose of their LANDs, creating an innovative and a dynamic relationship between landowners and visitors. With this premise, the sky is the limit.
The Mission
Decentraland is aiming high with its innovative concept and content creation highlights where creatives can create, own and control its designs inside the blockchain. This beginning guide will take you to understand a basic pipeline through Unity and the GTLF exporter plugin.
Resources
  • Unity 2018.3.6f1
  • Decentraland SDK
  • Node.js

Deploy scene Unity to Decentraland preview
Before starting
For this workflow, we work with a Unity plug-in that you can find at GitHub [https://github.com/fairwood/DecentralandUnityPlugin/]. This plugin allows you to work natively from Unity, compose and create all the scenarios without heavy coding.
​
Also you need to install the DCL sdk and use Node.js to deploy local scenes. https://docs.decentraland.org/getting-started/installation-guide/

#00 Creating the project
Unpack the .zip from the GitHub plugin and duplicate the "Unity Project" in order to use it as your own new scenario for Decentraland. Open the project with Unity minimum 2018 version.

#01 Creating an export path
Once you have opened the project, a new tab in the Unity Editor will be available, drop down the menu and select Scene exporter.
​
Now you have a new window in the editor that will be your main ally during the journey of developing for Decentraland.
Decentraland Scene Exporter plugin Unity
I like to have the tab in the same place as the inspector, this way I can easily switch between the LAND settings and the asset settings I might be configuring.
Furthermore keep in mind that meanwhile the DCL Exporter tab is "visible", it will be checking frame by frame all the assets in scene. This plugin checks constantly the values and boundaries of the LAND, this might cause editor perfomance issues and I suggest you keep it hidden when working with large LAND states or if you are running a low-end PC.
Once you have opened the tab for the first time, you can set up all the parcel coordinates. By default the plug-in sets to 57,11 its coordinates. You can change it and set the values you desire by clicking "Edit".
Once you have set up your scene you can see how Unity will display in the Scene Tab the LANDs you have set. These planes are not objects and cannot be modified.
Unity 3D plane
The plane works as a visual boundary and you should not place anything out of bounds or will not be deployed.
In this test we will only place a cube, drop down the GameObject menu and select 3D Object > Cube.

Place it in the middle of the scene (8, 0.5, 8) or in the position of your choice, always inside the boundaries.
Unity 3D plane and cube
The cube in scene will be shown with the following Unity components. Things like the Box Collider will not get exported and is irrelevant for the plugin.

Because the plugin is active in the project, a new component will appear in EACH GameObject that contains a Mesh Renderer.
​
Note that if a MeshRenderer is a child of another MeshRenderer this DCL Object will be considered as a "ChildOfAGTLF"
Dcl object script
This value is telling you that this mesh will be "Combined" in the same GTLF file during export.
This DOES NOT mean that it will combine the meshes, they will be loaded together but as separated meshes.
Unity 3D hierarchy
A GTLF child is represented as an upwards arrow
DCL exporter tab in unity
Unity Inspector
With both cubes placed you can notice the change in the stats of the DCL Exporter tab
DCL exporter tab Unity 3D

Now it's time to do the first deploy.

Choose a DCL Project Path in the Standard Export option. I recommend creating a folder in the root of the project, previous to the Assets folder. This way you will take your exports with the project and keep all the files in the same place.
​
Click "Init Project" to set the basic DCL libraries and wait to the npm to finish.
Init DCL project Unity
This command places the basic SDK but not the LAND info nor the files of the scene. This will be exported with the command "Export".
npm console empty
You will know the command has ended the task
​once the window changes the name to cmd.exe
npm console cmd.exe

Now the project export path has been prepared is time to export the GTLF files.
​Click on the Export button and wait for a Log to rise in the Unity Console.
Unity console export
If you want to local deploy your export, you can do it by using the Node.js editor
Node.js editor new folder
Locate your export folder and run the command "dcl start"
npm dcl start command
Wait for the command to finish and a tab should be opened in your browser.
Test scene deployed into decentraland
And here you are! Your very first local deploy.
From this point, you can work as if it was Unity vanila when applying materials, importing new meshes and doing your very own compositions. Just keep in mind to use meshes instead of empty groups because the GTLFs are about meshes and wont export correctly to your scene otherwise.

Picture
Kourtin
Environment artist
I purr when you're not looking. I'm passionate about environments and all the techie stuff to make them look rad. Learning and improving everyday to be a better hooman.
Twitter
0 Comments

    Categories

    All
    Decentraland
    Decentraland En Español
    Maya
    Metaverse
    Mixamo
    Morphite
    Substance Painter
    The Sandbox
    Totally Reliable Delivery Service
    Unity 3D
    Updates
    VRChat

    Archives

    February 2021
    January 2021
    December 2020
    October 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    December 2019
    October 2019
    September 2019
    August 2019
    June 2019
    May 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2016

    Picture
Home
Projects
Assets

Picture
Crypto
Friendly
Picture

Subscribe to get some 💚 in your inbox once in a while.

Follow us and your visit will never be forgotten!
Picture
Picture
Picture

 © 2015-2020 POLYGONAL MIND LTD. ALL RIGHTS RESERVED.
  • Home
  • SERVICES
  • Projects
  • Decentraland
  • Blog
  • Assets
  • / CryptoAvatars