Assets

In this section will discover how you can use the Assets tab of Hologram to manage all your assets - images/textures, sounds, videos and of course 3D objects. The assets tab is really easy to use, everything is in one place allowing you to quickly browse through all your project's assets. To add extra fun, it also integrate Google Blocks natively - download thousands of free 3D object create by the Google Blocks community.

Hologram's Assets interface is divided into two sections - the sidebar with all your items and the asset preview on the right.


Import

To import an asset, you have several options - you can click the Import button in the sidebar or you simply drag and drop what you wish to add to the project.

Here are the supported formats:
  • Image: .jpg, png, gif
  • Audio: .mp3
  • Video: .mp4
  • 3D Object: .obj/.mtl, .dae, .gltf

Note that to import .obj files with their .mtl, their names must be same. For instance if you import an .obj named house.obj, the .mtl must be named house.mtl.

Hologram supports gif right out of the box, you do not need to do anything else to display animated gifs.


Assets in Scene

Now that you have imported all the assets you need, you probably want to use them in your project. If you wish to apply a texture to an entity in the Scene tab, select the entity and click Source. The Asset picker will open and you will be able to choose the texture you imported previously.

Once selected, the texture will be loaded and applied to your entity. You can change or remove the entity texture at all time.

Note that the asset selection will work the same for other kinds of Assets such as video, sounds and 3D models.

Learn about Entities in Scene


Assets in Code

Alright, let say you want to get more out of Hologram, and you now wish to use your assets directly in the Code tab of Hologram on a entity that you created using code.

Let's say we imported a texture called cat.png, we do not need the path nor the extension of this file, as Hologram handles everything for you. All you have to care about is the name of the file: cat.

Now, let's create a simple box and add a texture to it:

myBox = new Box
    y: 1, z: -3
    src: "cat"

And that is it! You can do exactly the same with other entities:

# Insert an image with a texture
myImage = new Image
    width: 10
    height: 8
    src: "cat"

# Insert a model with 3D object
myModel = new Model
    src: "model_name"

Learn about Entities in Code


Google Blocks

One the coolest feature of Hologram is its native integration with Google Blocks. Google Blocks gives you access to a huge library of free 3D models created by the growing Google Blocks community. New 3D objects are added everyday and guess what? - you can use them in your project in just one click!

To use Google Blocks in Hologram, click the Google Blocks button in the sidebar. Now choose an Block you like and click Download. The downloaded Block will now appear in your Assets library ready to be used. Have fun!


Additional Features

In this section we cover all of the additional tools available to you in the Assets tab. You can access this set of features by right clicking on your assets in the item list.

Show in Folder/Finder

Use this to quickly access the original file in the assets folder.

Delete

Selecting an asset and right-clicking "delete" will immediately remove it.