Textures

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/32

flashcard set

Earn XP

Description and Tags

https://drive.google.com/file/d/1lyzAlYFn_m24J8BwkA58KyRlPYh-2k7F/view?usp=sharing

33 Terms

1
New cards

What are textures?

Textures are maps that affect the geometry in terms of:

  • light refraction

  • visibility, grayscale

  • vertex displacement.


2
New cards

Which texture map is notably purple?

Normal maps, because they use RGB color channels to store 3D direction vectors.

3
New cards

What texture maps fall under PBR or physics based rendering?

  • Metalness

  • Roughness


4
New cards

Which texture map is notably dependent on elevation to change vertices?

Height map. A subdivision dependent pixel brightness dictated by elevation.

5
New cards

What is Albedo?

Albedo is a texture map referencing the base color of a GM tree without lighting or shading.

6
New cards

What five texture maps fall under grayscale?

  • Alpha (white vis, black invis)

  • Height (white higher, black lower)

  • Ambient occlusion (fake shadows dark)

  • Metal (white metal, black non)

  • Roughness (white no light dissipation, black little light reflection)


7
New cards

What is the purpose of alpha texture map?

Boolean as white means visible, black means invisible.

8
New cards

What is the purpose of ambient occlusion?

Fake shadow in crevices, though not physically accurate.

9
New cards

What is the purpose of height?

Subdivision dependent, pixel brightness by elevation.

10
New cards

What is the purpose of metal-ness?

Metallic, white, black, non-metallic helps create reflection.

11
New cards

What texture maps fall under light refraction?

  • Normals, as it affects light orientation.

  • Roughness as it dictates little or a lot of light refraction. Example, a little would be water shining, a lot would be carpet and light.


12
New cards

What does PBR stand for? And what texture maps fall under it?

It stands for physics-based rendering to mimic real life. Metalness and roughness fall under this.

13
New cards

How do you initialize a texture loader with a loading manager?

const loadingManager = new THREE.LoadingManager();
// Loading manager states
// e.g., loadingManager.onStart = () => {}
const loadingTexture = new THREE.TextureLoader(loadingManager);

14
New cards

What is the point of the loading manager?

Gives states of texture, more detailed than just boolean of texture loader.

15
New cards

What is the point of minmapping?

Minmapping divides the texture size by powers of twos so that there is a texture for varying sized geometries when further/closer to camera.

16
New cards

Why is it best practice to have power-of-two texture maps?

Although WebGL2 does support non-power-of-two maps, its best practice in the case of using WebGL1.

17
New cards

What is the maximum size resolution that a texture should be?

Size 4096.

18
New cards

Is texture loader and texture a synchronous or asynchronous function? Write the parameters for both.

  • It is an asynchronous process

  • Synchronous: export default function LoadingManager({url}:Parameter) {}

  • Asynchronous: export default async function LoadingManager({url}:Paramer): Promise<THREE.Texture | null> {}


19
New cards

How does the syntax     let texture: THREE.Texture<HTMLImageElement>; work?

NOTHING YET

20
New cards

How does the syntax  if (!THREE.MathUtils.isPowerOfTwo(width)) work on a high level?

If width % 4 = 0, as 2²=4

21
New cards

Which filter is seen in both minificiation and magnification?

THREE.NearestFilter

22
New cards

How do you cause a moire pattern from the example?

Placing a THREE.NearestFilter on a perfectly sized checkered texture?

23
New cards

What causes a moire pattern in Three.js?


  • High-frequency textures: too many details squished into tiny pixels

Screen Pixels are like a checkerboard grid, squeezing a shirt with thousands of microscopic stripes makes a computer confuse on which pixel should be a colored or a space creating wavy bands.

  • No min-mapping

  • Anisotropy: “ Not the same in all directions”, when surface are tilted away such as a long highway stretching pixels become long oval across textures.


24
New cards


why does a checkered texture on a perfect cube cause Moire pattern?

3.nearest filter, disabled blending interpolation in min-mapping

25
New cards

what is a caveat of 3.nearest filter?

  • disable mini mapping

  • can deactivate by texture.generate mini maps false


26
New cards
() => {                      // argument 2: the callback ("onLoad")
    renderer.render(scene, camera);
  }

What is this function called?

A callback function.

27
New cards
textureLoader.load(
  '/textures/minecraft.png',   // argument 1: the path
  () => {                      // argument 2: the callback ("onLoad")
    renderer.render(scene, camera);
  }
);

What is the point of this callback function?

It redraws the scene with renderer.render after the asynchronous image is loaded.

This is also seen in the model load for GLTF.

28
New cards

When are magnification filters used?

When the default texture size cannot fill, the face of the mesh, texture grows.

29
New cards

When are minification filters used?

When The default texture size is too big for the mesh face.

30
New cards
<p>TO ADD LATER</p>

TO ADD LATER

31
New cards
<p>Although we used the <code>THREE.NearestFilter</code> here, the texture map is still blurry. From this practice, what did we learn? </p>

Although we used the THREE.NearestFilter here, the texture map is still blurry. From this practice, what did we learn?

  • I forgot to set the renderer's size to match that of the canvas.

  • As a result, it draws the buffer size as a default of 300 by 150. Smaller than the CSS canvas display size of 100vw x 100 vh.


32
New cards

What does minmapping do to the texture exactly?

It combines by averaging the pixel values for each smaller MIP level.

33
New cards
<p>In this example, we use <code>texture.magFilter = NearestMinMapNearestFilter</code> , and it doesn’t provide the same result as <code>texture.magFilter = NearestFilter</code> . Why is that?</p>

In this example, we use texture.magFilter = NearestMinMapNearestFilter , and it doesn’t provide the same result as texture.magFilter = NearestFilter . Why is that?

Although the first filter does apply nearest filter, it is choosing a mip level that closely resembles the size of the mesh. Since it is a small object, it chooses a heavily averaged down mip map.