LogoLogo
HomeDiscordVideo TutorialsBuilder Opportunities
  • Welcome to MONA
    • What is a Space?
    • Unity Overview
  • ⬛Create
    • Getting Started Building
    • MONA Crash Course
      • Setting up MONA in Unity
      • Introduction to Unity
      • Setting up Simple Assets
      • Metaverse / WebGL Limitations
      • Creating 3D Assets
      • Applying Materials & Unwrapping UVs
      • Importing Assets into Unity
      • Adding Colliders
      • Adding Lighting
      • Adding a Custom Skybox
      • Setting up Canvases
      • Uploading to your Wallet
    • Building Spaces
      • Space Limitations
      • Create your Space
        • Space Overview
        • Colliders
        • Materials
        • Portals
        • Canvases
        • Artifacts
        • Add a Custom Skybox
        • Test Your Space
        • Troubleshooting
      • Improve your Space
        • Lightmaps (Unity Lightmapper)
        • Light Probes
        • Reflection Probes
        • Animation in Unity
        • Importing Animation
        • Player Property Volumes (PPV's)
        • Warp Volumes
        • Adding Audio
        • VRM Switcher
        • Custom Canvases
        • Embedded Video
        • User Interface (UI)
        • Creating Custom Shaders
        • Imported Assets
        • Lightmaps (Bakery Asset)
      • Optimise your Space
        • Prefabs
        • 3D Asset Specs
        • Optimizing your Space
      • Adding Interactivity
        • Visual Scripting
          • Web Request Node
        • Mona Reactor
          • Creating Animation
          • Using Animator
          • The Reactor Component
          • Reactor Overview
      • MONA Tools
        • Template Utility
        • MONA Capture
        • Light Probe Generator
        • VOX Importer
      • Submit Your Space
        • Submitting your Space
        • Creating an Image & Video Preview
        • QA Process
        • Mint Your Space
      • Update your Space
      • Frequently Asked Questions
      • Troubleshooting
    • Creating Assets
      • Asset Requirements
      • 3D Asset Types
      • Asset Creation Approaches
      • Optimizing your Mesh
      • GLB Considerations
      • Example - Cyberpunk Car
    • Creating Avatars
      • Getting Started with VRM
      • VRM Requirements
      • VRM Creation
        • Using Mixamo for Rigging
        • Adding Custom Bones to the Rig (Optional)
      • Creating your Avatar using UniVRM
        • Importing UniVRM into Unity
        • Creating the VRM using UniVRM
        • Adding Spring Bones in UniVRM (Optional)
      • Creating your Avatar using 'VRM for Blender'
        • Adding 'VRM for Blender' into Blender
        • Using 'VRM for Blender' for Rigging
        • Adding a Material
        • Assigning VRM Details
        • Exporting the Avatar
      • Uploading your VRM
      • Using Avatars in WebAR
      • Submitting your VRM to the Mona Marketplace
      • Mint Your Avatar
      • Troubleshooting
    • Resources
      • MONA Claim Asset Requirements
      • Unity Wallet SDK (Alpha)
      • MONA Playground
      • MONA Tutorials
        • Retrowave Modules
      • Asset Resources
        • 3rd Party Assets
        • Textures
        • Shaders
        • 3D Assets
        • Audio
        • Tools
        • Tutorials
      • MONA Library
        • MONA Library Submission
      • Useful Unity Packages
      • Updating the Template SDK
      • Importing Mozilla Hubs Spaces to MONA
      • Importing AltspaceVR spaces to MONA
    • MONA Marketplace
  • ⬛Explore
    • How to Use MONA
    • Using VRM Avatars
    • Audio Settings
    • Explorer's Frequently Asked Questions
  • ⬛Collect
    • Setting up a wallet
      • Delegating a Wallet
    • Own a Space
      • Host an Event
      • Uploading your Images
      • Add Images to a Canvas
      • Live Music Feed
      • Token Gated Access
      • Minted 3rd Party Assets
    • MONA Create
      • Create FAQ
    • Live Streaming in MONA
      • Setting up OBS Studio
      • Livestream using OBS Studio
      • Livestream using a Mobile Device
      • How to Stream Using Twitch or YouTube
      • Add a Livestream to a Canvas
    • Collector's Frequently Asked Questions
  • General Resources
    • Web3 Introduction
    • How to sell Art in Web3
    • Game Dev Glossary
    • Buildathons / Challenges
      • 3D Asset Buildathon (Current)
        • Frequently Asked Questions
      • Emote/Emoji Challenge (Completed)
      • Stream Challenge (Completed)
      • Custom Avatars (Completed)
      • Build : NY Challenge (Completed)
      • Sculpture Challenge (Completed)
      • Portal Hub (Completed)
      • Interact (Completed)
      • The Renaissance (Completed)
Powered by GitBook
On this page
  • Introduction to Lights in Unity
  • Adding and editing Lights
  • Lightmapping
  • Light Probes
  • Reflection Probes
  • Summary

Was this helpful?

  1. Create
  2. MONA Crash Course

Adding Lighting

PreviousAdding CollidersNextAdding a Custom Skybox

Last updated 1 year ago

Was this helpful?

Lighting plays a huge part in the appearance of a space. The issue is that real time lighting, or lighting that is processed every frame, is very expensive. Getting a balance between lighting quality that runs well is an art in itself.

Note that it is recommended to use no more than 4 realtime lights in a space. Usually 1-2 is enough. We will take a quick look at alternative approaches to more performant lighting towards the end.

Introduction to Lights in Unity

Unity has a number of light types to use in your scene. These include the following :

  • A Directional Light is the most performant. And is light coming from one direction.

  • A Point Light is light coming from one point.

  • A Spot Light is a light that looks like a spotlight.

  • An Area Light is more like a rectangle or oval of light. Note that this light is only used for Baked lighting which we’ll get into with the Lightmapping section.

Adding and editing Lights

You can of course edit the directional light that is present in the Mona SDK space. Otherwise you can add your own.

  • Right click on an asset location in the hierarchy window.

  • Under ‘Light’ you will have access to the lights mentioned.

Once you have added the light you can use the standard position and rotation tools, as well as modify its settings in the Inspector. Each light is slightly different but most have the same aspects such as Color, Range, Mode, Intensity, and Shadow Type.

Color is exactly that. What color is the light.

Range, depending on the light type, is how far do you want the light to travel.

Intensity is how strong the light is.

Shadow type is what kind of shadows, if any, does the light project. No shadows are the most performant of course. Hard shadows are a little more performant than soft shadows, but don’t look as nice.

Mode is used when setting if the light is Realtime. Baked is used for lightmapping. Mixed is both realtime and baked.

There are others but we will save those for another time.

Lightmapping

If you want an even better lighting result, that doesn’t cost as much in performance, you can use Lightmapping. Lightmapping is a technique that creates, or bakes, light information into textures. Spaces will run better and look great, at the expense of filesize.

You may recall using UVs to assign where the texture goes on an 3D model, lightmapping will bake the light information into a 2nd UV map that you can make manually in your 3D Creation tool, or Unity can create it for you.

The only issue with lightmaps is that they are static, meaning they cannot change. So dynamic objects, such as the avatars or animated objects, do not cast a shadow in realtime with this lighting information. A good compromise is creating a single directional light that casts a shadow, with much more complicated lighting being baked into the lightmap. This is the best of both worlds.

Light Probes

Note that only realtime lights will light dynamic objects. Lightmaps will not be considered.

You can work around this by adding light probes. Light probes can be placed around the space to take in the light information at that point in space, and light dynamic objects accordingly. This would allow a space that has no realtime lights to light dynamic objects properly.

Reflection Probes

The last thing to add into this section, which is on par with lighting but not exactly part of lighting, is reflection probes. Realtime reflections are very expensive, and generally not recommended to use in WebGL based spaces at all. It is best to use reflection probes to once again bake the information into a texture to reflect onto assets in the space and keep performance at the cost of filesize.

Reflection probes use the physics based rendering techniques in the materials to show polished and metallic surfaces well.

Summary

Lightmapping, lightprobes, and Reflection probes are not recommended for your first space due to the complexity that they bring, but they are good to know about for when you feel like creating better visuals in your space.

For more information on lightmapping, go to Lightmaps (Unity Lightmapper).

For more information on light probes, go to Light Probes.

For more information on reflection probes, go to Reflection Probes.

In this tutorial we looked at the different light types, how to add them to the scene and how to modify them. We also introduced lightmapping, light probes, and reflection Probes so that you know what to look for when you are ready to take your lighting to the next level.

⬛
Adding Lighting in Unity Video