1 minute read

phong shading์ด๋ž‘ thong shading์ด๋ž‘ ํ—ท๊ฐˆ๋ฆฌ๋ฉด ์•ˆ๋ฉ๋‹ˆ๋‹ค.

Phong Shading์ด๋ž€?

Phong Shading: Normals are interpolated across the polygon โ€“> normals์ด polygon ์ „์ฒด์— ๊ฑธ์ณ ๋ณด๊ฐ„๋ฉ๋‹ˆ๋‹ค.

Phong Shading์„ Normal Interpolation Shading์ด๋ผ๊ณ  ๋งํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Phong shading์€ ์‹ค์ œ geometry๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ํ•˜๋Š” ๋Œ€์‹  shading์„ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค.

  • flat shading์˜ ๋ฌธ์ œ๋Š” ๊ฐ์ฒด๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ๊ฐœ๋ณ„ ํด๋ฆฌ๊ณค์ด ์‰ฝ๊ฒŒ ๋ณด์ผ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋ณด์ด๋”๋ผ๋„ ๋ง์ด์ฃ . bandicam 2024-06-19 18-14-29-701

  • ์šฐ๋ฆฌ๋Š” ๋ฉ”์‰ฌ์— ๋” ๋งŽ์€ geometry๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์ด๋Š” ์ž‘์—…ํ•˜๊ธฐ ์–ด๋ ต๊ณ  ์„ฑ๋Šฅ ๋ฐ ๋ Œ๋”๋ง ์‹œ๊ฐ„์— ์˜ํ–ฅ์„ ๋ฏธ์น˜๋ฉฐ ์นด๋ฉ”๋ผ๊ฐ€ ์ถฉ๋ถ„ํžˆ ๊ฐ€๊นŒ์ด ์ ‘๊ทผํ•˜๋ฉด ์—ฌ์ „ํžˆ ๊ฐœ๋ณ„ ๋ฉด์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. bandicam 2024-06-19 18-14-29-701

  • ์ด๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด Phong shading์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Phong shading์—์„œ๋Š” ๊ฐ ๋ฉด์ด ๊ฐœ๋ณ„ ํ”ฝ์…€๋กœ ๋‚˜๋‰˜๊ณ  ๊ฐ ๋ฉด์˜ ๋…ธ๋ฉ€์ด ํ”ฝ์…€ ์ „์ฒด์— ๊ฑธ์ณ ๋ณด๊ฐ„๋ฉ๋‹ˆ๋‹ค. ์ด๋Š” ๊ฐ ๋ฉด์˜ ๋…ธ๋ฉ€ ๋ฐฉํ–ฅ์ด ์ฃผ๋ณ€ ๋ชจ๋“  ๋ฉด์˜ ๋ฐฉํ–ฅ์„ ๊ธฐ์ค€์œผ๋กœ ํ‰๊ท ํ™”๋œ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
  • ์ด๋กœ ์ธํ•ด ๊ฐ‘์ž‘์Šค๋Ÿฌ์šด ๋…ธ๋ฉ€ ๋ฐฉํ–ฅ์˜ ๋ณ€ํ™” ์—†์ด ๋ถ€๋“œ๋Ÿฌ์šด ๊ทธ๋ผ๋ฐ์ด์…˜์ด ์ƒ๊น๋‹ˆ๋‹ค. bandicam 2024-06-19 18-16-27-572

  • Phong shading์€ subdivision surface modifier์™€ ๋น„์Šทํ•˜๊ฒŒ ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์‹ค์ œ geometry๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ํ•˜๋Š” ๋Œ€์‹  shading์„ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค. bandicam 2024-06-19 18-17-23-300

  • Phong shading์€ ๋Œ€๋ถ€๋ถ„์˜ 3D ํŒจํ‚ค์ง€์—์„œ smooth shading ๋˜๋Š” ์œ ์‚ฌํ•œ ์ด๋ฆ„์œผ๋กœ ๋ถˆ๋ฆฌ๋ฉฐ ๋ช‡ ๊ฐ€์ง€ ์ œํ•œ ์‚ฌํ•ญ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ธ์ ‘ํ•œ ๋ฉด์˜ ๋ฐฉํ–ฅ์ด ๋งค์šฐ ์œ ์‚ฌํ•œ ๊ฒฝ์šฐ์— ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. bandicam 2024-06-19 18-19-01-164

  • ์˜ˆ๋ฅผ ๋“ค์–ด, ์ธ์ ‘ํ•œ ๋ฉด์˜ ๋ฐฉํ–ฅ์ด ๋งค์šฐ ์œ ์‚ฌํ•œ ๊ตฌ์˜ ๊ฒฝ์šฐ์—๋Š” Phong Shading (Blender์—์„œ๋Š” Shade Smooth๋กœ ๋ถˆ๋ฆผ)์€ ํšจ๊ณผ๊ฐ€ ์ข‹์Šต๋‹ˆ๋‹ค. bandicam 2024-06-19 18-19-39-671
  • ์•„๋ž˜์™€ ๊ฐ™์ด ๊ตฌ์— Phong Shading์„ ์ ์šฉํ–ˆ์„ ๋•Œ, ์‹ค์ œ geometery์˜ ๋ณ€ํ™”๋ฅผ ์ฃผ๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ shading์„ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค. bandicam 2024-06-19 18-21-00-034

  • ํ•˜์ง€๋งŒ ์ธ์ ‘ํ•œ ๋ฉด์ด ์œ ์‚ฌํ•˜์ง€ ์•Š์€ ๋ณต์žกํ•œ ๊ฐ์ฒด์— smooth shading (=phong shading)์„ ์ ์šฉํ•  ๋•Œ๋Š” ๋ฌธ์ œ์ ์ด ์ƒ๊น๋‹ˆ๋‹ค.
  • ์˜ˆ๋ฅผ ๋“ค์–ด ์ด ์‹ค๋ฆฐ๋”์— smooth shading์„ ์ ์šฉํ•˜๋ฉด bandicam 2024-06-19 18-23-14-310
  • ์œ„์•„๋ž˜์— ๋ฌผ๊ฒฐ ๋ชจ์–‘์˜ ๊ทธ๋ฆผ์ž๊ฐ€ ์ƒ๊น๋‹ˆ๋‹ค. bandicam 2024-06-19 18-23-33-627
  • ์ด๋Š” Blender๊ฐ€ ์ธก๋ฉด์˜ ๋ฉด๊ณผ ์œ„์•„๋ž˜ ๋ฉด์˜ ๋…ธ๋ฉ€ ๋ฐฉํ–ฅ์„ ํ‰๊ท ํ™”ํ•˜๋ ค ํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. bandicam 2024-06-19 18-23-53-319
  • Blender๋Š” ์ด๋“ค์ด ์—ฐ๊ฒฐ๋˜์–ด ์žˆ์œผ๋ฏ€๋กœ ๋…ธ๋ฉ€์— ์˜ํ–ฅ์„ ์ฃผ์–ด์•ผ ํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. bandicam 2024-06-19 18-24-08-686
  • ๊ทธ๋Ÿฌ๋‚˜ ์šฐ๋ฆฌ๋Š” ๊ทธ๊ฒƒ์ด ๋ฐœ์ƒํ•˜๋Š” ๊ฒƒ์„ ์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ๋Œ€๋ถ€๋ถ„์˜ ํ”„๋กœ๊ทธ๋žจ์—๋Š” auto smooth ๊ธฐ๋Šฅ์ด ์žˆ์Šต๋‹ˆ๋‹ค. bandicam 2024-06-19 18-24-47-368
  • auto smooth ๊ธฐ๋Šฅ์€ smooth shading์„ ์ ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ์ œํ•œ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. image
  • Blender์˜ ๊ธฐ๋ณธ auto smooth ์„ค์ •์€ 35๋„์ž…๋‹ˆ๋‹ค. ์ด๋Š” ์ด์›ƒํ•œ ๋ฉด๊ณผ์˜ ๊ฐ๋„๊ฐ€ 35๋„ ๋ฏธ๋งŒ์ธ ๋ฉด์—๋งŒ smooth๊ฐ€ ์ ์šฉ๋œ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ๊ฐ๋„๊ฐ€ 35๋„๋ณด๋‹ค ํฌ๋ฉด smoothing ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ์˜ํ•ด ๋ฌด์‹œ๋˜๊ณ  ๋‚ ์นด๋กœ์šด ๊ฐ€์žฅ์ž๋ฆฌ๋ฅผ ์–ป๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
  • ์•„๋ž˜์™€ ๊ฐ™์ด auto smooth์˜ ์„ค์ •์„ 4.6๋„๊นŒ์ง€ ์ค„์ด๋ฉด, 4.6๋„๋ณด๋‹ค ํฐ ๊ฐ๋„์— ๋Œ€ํ•ด์„œ๋Š” smoothing ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ์˜ํ•ด ๋ฌด์‹œ๋˜๊ณ  ๋‚ ์นด๋กœ์šด ๊ฐ€์žฅ์ž๋ฆฌ๋ฅผ ์–ป๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. image
  • ๋Œ€๋ถ€๋ถ„์˜ ํ”„๋กœ๊ทธ๋žจ์—๋Š” Phong shading์˜ ๋ถ„ํฌ๋ฅผ ์ œ์–ดํ•˜๋Š” ๋” ๋ณต์žกํ•œ ๋ฐฉ๋ฒ•๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
    • ์˜ˆ๋ฅผ ๋“ค์–ด, Blender์—๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์„ค์ •ํ•œ ๋‹ค์–‘ํ•œ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋” ์ ๊ทน์ ์œผ๋กœ ๋ฉด์„ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ํ•˜๋Š” weighted normal modifier๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. image
    • weighted normal modifier๋ฅผ ์ ์šฉํ•˜๊ณ  Weight์˜ ๊ฐ’์— ๋”ฐ๋ฅธ ๊ฒฐ๊ณผ์ž…๋‹ˆ๋‹ค.
      Image 1 Image 2 Image 3

Reference

Change Your Understanding of Normals In Eight Minutes

Leave a comment