Workbook 5: Meshes, Texture and Appearance

Spring 2026 Sample Solution

This is a sample solution for the Workbook. You are welcome to refer to it to learn one way to do the assignment but only after you have turned in your own assignment

This week, we’ll move on to making the objects that we see in 3D worlds. We’ll learn about how we group triangles into meshes and use texturing to give them more interesting colors. Along the way, we’ll see how shading is computed to make lighting effects, and examine different kinds of effects we can use to make things look more interesting.

Workbook Operations

The workbook uses both type-in forms that rely on browser local storage and “page boxes” that are files that must be checked in to GitHub.

Right now, please put your name on the workbook and press the “checkpoint” button so that we know that you have at least seen this workbook.

This workbook contains type-ins that are part of the assignment. Some of these have specific rubric checkboxes at the end of the page.

The checkboxes for boxes and rubric elements are to help students keep track of their work. The Last Page (rubric) page has a list of all boxes and rubric items.

Remember to save your local storage to the JSON file periodically in case something goes wrong. You should also make a checkpoint periodically.

Remember to commit your work as you edit files in for_students (you should not need to edit files outside of that directory). Remember to push your work to GitHub - at least at the end, or periodically after you commit, to make a backup. And, when you have completed the workbook, remember to use the submit button on the last page to signal us that your workbook is ready for grading.

We only grade the main branch. It must be pushed to GitHub. And you must use the “submit” button.

You will probably add files to the workbook (especially textures). Remember to add them to the repository, so they will be committed and pushed.

Module Goals

In this workbook, we dig deeper into 3D graphics by exploring the techniques that we use to make shapes and appearance.

We will continue to explore using these methods in the context of a high-level API (three.js). Three implements all of the methods that we will learn about, and makes them easy to use. So this workbook is a mix of learning about the concepts, trying them out in simple cases, and learning a little bit about how they work “under-the-hood.” Understanding the concepts and a little about how they work is critical because these intuitions will help you know when to apply the methods.

  1. Understand meshes and use mesh data structures for describing objects.
  2. Practice the basic concepts of textures, especially texture coordinates.
  3. Understand how lighting and texturing are used to create appearance in interactice graphics systems.
  4. Practice using shape, material, and texture to create appearance.
  5. Understand how local lighting is computed and used in a practical system.
  6. Understand and apply advanced texturing types.

The Old Lectures

Lectures 18 and 19 are divided into parts: these were a sequence of shorter videos that covered focused topics. They were good enough that I used them repeatedly.

2023 Video: Lecture 17 Meshes and Lighting  |  Slides
2023 Video: Lecture 18A Texturing Overview  |  Slides
2023 Video: Lecture 18B Texturing Basics  |  Slides
2023 Video: Lecture 18C Texture in Three.JS  |  Slides
2023 Video: Lecture 18D How Texture Mapping Works  |  Slides
2023 Video: Lecture 19A Advanced Texturing: Normal and Bump Mapping  |  Slides
2023 Video: Lecture 19B Advanced Texturing: Layers, Lightmaps, Procedural, and Solid Textures  |  Slides
2023 Video: Lecture 19C Advanced Texturing: Sky Box and Environment Maps  |  Slides
2023 Video: Lecture 19D Advanced Texturing: Shadow Maps  |  Slides

Note: we won’t cover shadow maps in this workbook; I include them for completeness.

Exercises

There are a few “bigger” programming assignments scattered throughout the workbook:

  • Graphics Park - explore animation in the class software framework by making amusement park rides.
  • Construction Equipment - explore articulated figures and automatic user interfaces in the class software framework by making construction equipment.
  • Real Object - create an object that you see in the world by photographing textures.
  • Buildings - practice using textures by making a building.

There are several smaller exercises to expose you to using the ideas in three.js. These are still important requirements. This list is not exhaustive. Look at the rubric on Page  28  (Last Page (rubric)) for the complete list.

  • Mesh Exercises - orient triangles correctly, and make something else simple.
  • Dice and Dominos - apply textures to an object.
  • Material Property Map - make something with a Material Property Map.
  • Bump and Normal Maps - make things with bump and normal maps.
  • SkyBox - make a real and a fake skybox.
  • Environment Map - make a reflective object that shows reflections.

Readings

The workbook and videos should be self-contained. But, they don’t get as deep into the concepts as the books do. The readings are optional.

Accessing the Textbook(s)

I refer you to two textbooks, for different purposes.

If you want to learn the concepts, approached differently: Historically we used: Fundamentals of Computer Graphics. The book has a long author list (I contributed a chapter).

You can access the book from the UW Library (so you don’t need to buy it): Library Link.

If you want to dig deeper into the concepts and see the range of methods that get used in practice: I’ve recommended Real-Time Rendering by Thomas Moller, Eric Haines, Naty Hoffman, and some others (each edition adds authors). This book is 1200 pages, and they left some chapters out! (the webpage gives PDFs for these chapters).

The most recent 4th edition is already old (it’s from 2018). They do continue to update the website.

This book is an amazingly extensive reference book that surveys many approaches and details for a huge variety of topics. It’s an invaluable reference - if you’re going to be a real-time graphics programmer, you probably want to have this book. For a class, it’s overkill - it’s way too much depth. It’s also not the best way to learn the concepts: once you understand the concepts, you can learn about a lot of details and different implementation tricks.

The UW Library has an electronic copy of Real-Time Rendering, 4e (Real-Time Rendering 4e (library link).

These reading recommendations refer to Fundamentals of Computer Graphics (FCG) and Real-Time Rendering (RTR) - described in the aside above.

Shading: FCG Chapter 10 covers the basics. (10.3 covers stylized shading, which we will not cover in class). If you want to dig deeper into lighting, RTR Chapter 5 is “Shading Basics” (but goes way beyond the basics).

Texturing: FCG Chapter 11 is concise yet thorough. RTR Chapter 6 covers even more details and specifics.

Meshes: FCG Chapter 12 discusses many different aspects of data structures to represent graphics. Sections 12, 12.1 and 12.2 cover the material for class. Section 12.1.3 covers strips and fans (which we will touch on in class, but won’t use much). Section 12.1.4 discusses the fancy data structures used for representing meshes when they need to be manipulated - this is beyond what we will do in class - read this section to get a taste of a more advanced topic.

Three.js: You will undoubtedly need to look at the THREE documentation. You may also want to look at the framework code documentation. The documentation is generated from the comments in the code, so you can probably just get by with reading the code.

A note on the assignments

It is your responsibility to make sure that your scene shows off the texturing feature that it is supposed to. For example, if you are showing off the use of environment maps to simulate reflections, make sure that you have a shiny object that reflects things (and an environment map that gives something to be seen in the reflections). You may want to make your objects move in order to show off some of the lighting effects, or choose object views that make things clear (for example, in lecture I showed off when bump mapping becomes invisible). If you think that it’s not clear that you are using the required effect, you may want to describe (in the text box below the exercise) what we should be seeing and why it shows off the feature.

You will need to find/create your own texture maps. Over the course of the assignment, you will need a bunch of texture maps. Over the whole assignment you must use each of these creation methods at least once:

  1. A texture you made yourself by painting (digital painting, using a painting program/photo editor)
  2. A texture that you got from the web (document where you found it, and confirm that it is free to use)
  3. A texture that is a photograph (that you took) of a real object

You need to explain how you used each of these creation methods on the last page of the workbook to get credit.

Don’t forget to include the textures you use in your repo and push them to GitHub!

If you want to load in objects from model files, that is OK (but optional). Make sure to include the objects in your repo, and document where you got them from in the text areas on the workbook pages. You probably want to use the loader code built in the framework. Please choose objects that have appropriate licensing and be sure to give proper attribution.

A Note on Textures

Please be reasonable with your textures. Because many students are uploading files for grading, it uses up a lot of space very quickly. You don’t need massive texture files. When you find textures on the web (especially environment map textures) they tend to be huge. Please choose small-sized textures, or shrink them to reasonable size if need be. (It is very unlikely that you need a texture that is more than 1MB).

And please use compressed file formats (e.g., .png or .jpg). Use HDR formats (such as .exr) only when necessary.

You do need to add/commit textures to your repo, so they get pushed to GitHub.

If you get a texture from someplace, you need to give proper attribution. Use the type-in box on Page  28  (Last Page (rubric)).

Rubric for Grading

The requirements are pretty straightforward. You really only need to add a few lines on top of things you already know how to do.

Assessing effort beyond the minimum is difficult for the graders: it’s too subjective, and not necessarily a measure of your learning about graphics. For example, you might make a really cool scene just because you picked a nice environment map background from Poly Haven; in fact, that might look nicer than a simple one someone made themselves.

The rubric is provided on Page  28  (Last Page (rubric)).

AI Usage

The class policy requires you to disclose your usage of AI tools in completing the assignment. There is a text box on Page  28  (Last Page (rubric)).

I am disclosing my usage of AI tools: I used AI tools extensively in the preparation of this workbook. You need to give more detail than that.

AI Tools Used

The tools I used:

  • GitHub Co-Pilot in Visual Studio Code, with various models.
  • Gemini (both CLI and on the Web)
  • Claude (from the App, including co-work)
  • NotebookLM

AI was used extensively to design and write the programs in this workbook. Most of the new programs were written by AI (in collaboration). Even most of the old programs were edited by AI (I did various cleanup and checking tasks with it).

I used AI to help with writing and image creation. Generally it did not write large portions of text (although, I did try having it draft pages - usually, I needed to completely re-write these). Most of the text it wrote was edited a lot (for content and style). Most of the images it made were edited and adapted. Everything should have been checked.

Impressively, the AI agentic programmers figured out how to write code using the class software framework. I take this as a sign that the design isn’t that hard to figure out.

Get Started on Page  1  (The CS559 Framework Code)