In this tutorial, we cover two fundamental concepts: cameras and light. Cameras are the views through which users can see a Sumerian scene. They can be static, move, follow objects, etc. Lights provide the digital lighting for a 3D, digital environment.
You’ll learn about:
- Light types
- Camera types
Before you begin, you should have completed the following tasks and tutorials:
- Sign in to Amazon Sumerian with your AWS account
- Amazon Sumerian Interface tutorial
- Sumerian Basics: Creating a TV Room
Step 1: Creating a New Scene
- Sign in to your Sumerian account.
- You are now looking at the Sumerian Dashboard. Under Templates, create an Empty Scene.
- Navigate to the Inspector panel on the right side of the interface.
- There are several tabs in the Inspector panel. Open the top tab, New Scene.
- Under Details, you’ll see the name text box. Change the name to “Camera and Light Tutorial”.
You now have a new, empty scene with nothing but a camera.
Step 2: Setting up the Scene
To have some reference points and objects to test Sumerian’s camera and light option, we’re going to add the Box and a Disk to our scene.
- Once you’re in your new scene, choose Create Entity.
Select the Box entity under the 3D Primitives category. You should see a very dark, unlit Box.
- Add some color by clicking Material in the Inspector panel.
- Click Color (Diffuse).
Open the color picker and select a red color.
Choose the Transform component and set the Y Translation value to 0.5. Be sure the uniform scale box is selected. This will scale the values on every axis in the same amount.
- Open the Create Entity menu, and then select Disk.
Choose the Transform component, and then set the X Rotation value to -90 and the Scale values to (30, 30, 30).
- With the Disk still selected, open the Material component. Open the Color (Diffuse) property.
Open the color picker and select a blue color.
Step 3: Adding Lights
To see our Box, we’re going to add some light.
Choose the Create Entity button (top center) to open the Create Entity menu. Under Lights, you’ll see three light types are available: Point, Directional, and Spot.
The following is a quick summary of each light type’s qualities:
- Point: Akin to a lightbulb, emanating light in all directions from the light source. The light source can be seen.
- Directional: Mimics sunlight. Directional light comes from a general direction. The light source can’t be seen.
- Spot: Acts much like a spotlight in a theater, or a flashlight, sending a strong beam in a specific, narrowly defined space. The light source can be seen.
Let’s start by adding a directional light.
In the Create entity menu, choose Directional light. You’ll notice that the light is coming from one side of the Box and the Disk is very dark.
To change the direction of the Directional light, select the light in the Entities panel and open the Transform component. Change the X Rotation value to -45. You can also click a Rotation value and move your mouse up and down (a technique called scrubbing). Notice how the light direction changes.
Note: Depending on your Translation values, you might be able to see the light source in your scene (a small, glowing sphere), but translation values will not change any effects from the directional light. Only rotation values can provide changes. This is due to the nature of directional lights. The source is infinitely distant.
To see a Spot light in action, be sure you still have the Light entity selected in the Entities panel.
Expand the Light component in the Inspector panel on the right. Change the type from Directional to Spot. You’ll notice the light disappears again. This is because Spot lights have Translation values (i.e., a position in 3D space) that currently place it inside the Box.
Change the Y Translation value to 10 and the X Rotation to -90.
You should now see a small light shining on top of the Box. Go ahead and experiment with the properties in the light component to see how they change the spot light effect.
Lastly, in the Light component of our Light entity, change the Type to Point.
Change the Y Translation value to 2.5.
It might first appear that a Point light looks similar to a spot light, but remember: point lights act as light bulbs; they emit light in all directions. Try moving the Box above the Light entity. See the result.