Please read the standard instructions for all assignments.
The emphasis in this assignment is working with textures. It’s not primarily
about geometry, though you will be modifying texture coordinates, which live
in the geometry object. Also, it uses material and lighting, but keep this
part simple. It’s also not about cameras, so feel free to use
TW.cameraSetup()
.
Here’s the goal, a barn with siding and roofing, which I’m calling a textured barn.
See the standalone version here, including additional debugging information.
I give you the model solution to clarify what I’m looking for. I expect that you will not try to reverse-engineer the solution. I have made it difficult (so you won’t accidentally see the solution), but it would not be impossible. Please don’t try.
Note the four modes that the GUI makes available:
These modes will help you understand where the faces are and how the textures are arranged (at least initially), though you have control of the texture coordinates. You only need to implement the last two modes.
Write your own program that mimicks this object:
THREE.MeshBasicColor
, though of course you can use them when debugging.addTextureCoords()
, in the file hw5-starter.js. You can use this function and then modify the assigned texture coordinates, or you can modify this function, or you can replicate its functionality in your own way; whatever you want. But if you use texture mapping and your geometry doesn’t have texture coordinates, you’ll get an “index out of bounds” error in the rendering.TW.createBarnMultipleMaterials()
, TW.setMaterialForFaces()
, and TW.stringifyGeometry()
.THREE.MeshFaceMaterial
to hold multiple materials. If you are using a more recent version, you can just pass an array of materials in to the constructor to THREE.Mesh
.Submit the URL to your pen via the dropbox on blackboard. Do not change your code after the deadline.
Grading will be broken down into two parts, basic functionality and style and documentation
Rating | Actual Points | |
---|---|---|
Basic functionality (80%) | ||
a good start | 50 | |
significant progress | 60 | |
good | 70 | |
excellent | 80 | |
Style and documentation (20%) | ||
missing | 0 | |
fair | 10 | |
good | 15 | |
excellent | 20 | |
Total (100%) |
Grading of the basic functionality will be in terms of the following requirements:
This page is based on https://cs.wellesley.edu/~cs307/assignments/hwk5-textured-barn.html. Copyright © Scott D. Anderson. This work is licensed under a Creative Commons License.