Tutorial
Heading
Oct 22, 2022

How to add emissives and lights to Hyperfy for GLB archives

Find out how to add bloom effect to your Hyperfy scenes

Have you noticed that some Hyperfy metaverse worlds have a bloom-like shiny effect? In order to add that glowing effect to our Hyperfy scenes, I thought the solution was to increase our .glb archives emissives. However, in doing some research I found a more than optimal solution.

When exporting a scene as a .glb for Hyperfy, it's essential to keep in mind that the "Principled BSDF" shader's emissive property (which is the default shader in Blender) won't work in this platform.  But, don't worry! We can still achieve a high-quality emissive effect by manipulating the shader nodes in Blender. Let’s see how!

Resources

  • Blender V.3.0 onwards
  • Hyperfy account

Setting up the materials

When setting up materials for a Hyperfy scene, it's crucial to use lightweight textures that won't slow down performance. To achieve this, we recommend replacing the default images in the Shader Editor with your own textures, which you can reduce in size beforehand. This way, you can create the desired visual effect without sacrificing speed or efficiency.

We have a tip for you! If you want to work faster because you have a lot of materials to manage, I recommend that you install the Node Wrangler add-on that comes in Blender's default library. This feature is particularly useful when working with complex scenes that require many textures, as it allows you to quickly create the necessary nodes without the need for manual input.

By pressing Ctrl + T you will create the nodes for the default image texture:

After connecting all materials, our attention turns to the emissives. The Principled BSDF shader has an Emission connection, but it won't work in Hyperfy. To solve this issue, we need to mix two shaders - Principled BSDF and Emission - using a node called Mix Shader with Ctrl + A.

By connecting the two shaders to the node, we can make Hyperfy recognize the emissive effect.

However, if we have an image with transparency, we need to create a ColorRamp node to adjust the Alpha channel more precisely, which can help visualize the transparency well. Here's an example of how it would look like:

Now, you just have to export a .glb file using the export parameters indicated in the following image:

As we can see, in Operator Presets we can create our own template with all the custom export settings. Here we can see the before and after of setting up emissive material and transparencies:

Before Configuration
After Configuration

Setting up the lights

When it comes to lights, the process is much simpler. We can simply add the desired type of lighting, such as Point, Sun, Spot, or Area, and they will all function without any issues.

Spot Light Configuration

Conclusion

Although the differences at first glance are not extremely significant, it is important to keep in mind that implementing changes not only to Hyperfy, but to the way we work as 3D artists in general, is always worthwhile.

In that sense, the goal is accomplished: we have achieved that brilliant effect in our worlds in Hyperfy. Even the smallest changes can have a significant impact on system performance and translate into a better user experience with increased satisfaction and retention.

hyperfy
Blender
Web3
Javier Vicén Lucia
3D Artist

Enthusiastic about videogames, 3D impression and photography

Tutorial
How to import Decentraland SkyboxEditor into Unity
Tutorial
Doing a MANA transaction in a Decentraland scene
Tutorial
Canvas (2D UI) Manager in Decentraland