DOCS

Update material

This section will guide you through updating the material of the Teapot entity.

Duplicate a Mesh

Duplicate the teapot:

  • Select the teapot_Mesh in the scene, hold the CTRL or CMD key_,_ and drag the Translate gizmo to create a duplicate.

  • Repeat twice to have three teapots in total.

  • Select one teapot, rename it Big_teapot_mesh and resize it by scaling it up to 30.

  • Rename the other two blue_teapot_mesh and red_teapot_mesh in the Scene Graph.

Apply colors to the small teapots**:**

  • Select the Blue_Teapot_mesh :
    • Find the Material Reference component in the Components panel. You’ll see the name of the Material applied to the mesh next to the paintbrush icon.
    • In the Material Editor extension right below it, update the Albedo color and set it to Blue.

You’ll notice that all the teapots change colors at the same time because both teapot meshes reference the same material.

💡 If by accident, you don’t see the Material Editor- just click on extensions in the bottom right and drag and drop it under Add a Component.

⚠️ The Material Editor extension updates a Material Asset but Meshes use a Material Reference to determine their Material.

For each teapot to be a different color.

  • Go to the asset browser, go into the Teapot folder, select the Teapot_Mat and duplicate it twice.
  • Name one duplicate teapot_mat_red and the other one teapot_mat_blue .
  • Click on red_teapot_mesh and change its Albedo color to red, do the same for blue.
  • Drag and drop the material on each teapot mesh.
    • Click on red_teapot_mesh then drag and drop the teapot_mat_red in the scene itself

💡 Try updating other Material properties such as metallic or roughness.

💡 In the next session, we’ll try to update the Material Reference of the Big teapot directly from your web app.


Previous
Environment