๐ŸŽฎ Unity Study/Unity

[Unity] Sound ๋ชจ๋ฐ”์ผ ์ตœ์ ํ™”

ibelieveinme 2024. 4. 30. 17:57
728x90

3D ์Œํ–ฅํšจ๊ณผ๊ฐ€ ๊ตฌ์ง€ ํ•„์š”์—†๋Š” ๊ฒฝ์šฐ(ex. ํšจ๊ณผ์Œ) ์ตœ์ ํ™”๋ฅผ ํ•ด์ฃผ์ž.

 

 

[Audio Source ์ตœ์ ํ™”]

 

1) AudioSource > 3D Sound Settings > Doppler Level ๋น„ํ™œ์„ฑํ™”.

: ๋„ํ”Œ๋Ÿฌ ํšจ๊ณผ 1 -> 0 ์œผ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ๋น„ํ™œ์„ฑํ™”ํ•˜๊ธฐ.

: ์ฝ”๋“œ์ƒ์—์„œ๋„ AudioSource๋ณ€์ˆ˜.dopplerLevel = 0.0f ๋กœ ๊ฐ€๋Šฅ.

 

2) AudioSource > Reverb Zon Mix ๋น„ํ™œ์„ฑํ™”.

: ๋™๊ตด ํšจ๊ณผ 1 -> 0 ์œผ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ๋น„ํ™œ์„ฑํ™”.

 

 

[Audio Clip ์ตœ์ ํ™”]

 

1) Audio Clip ํŒŒ์ผ > Force To Mono ์ฒดํฌ

: ๋ณต์ˆ˜ ์‚ฌ์šด๋“œ ์ฑ„๋„ ํ•˜๋‚˜๋กœ ํ•ฉ์น˜๊ธฐ. ์ž…์ฒด ์Œํ–ฅ ํšจ๊ณผ ์—†์• ๊ธฐ.

 

2) Normalize ์ฒดํฌ.

: ์‚ฌ์šด๋“œ ์ •๊ทœํ™”.

 

3) Load In Background ํ•ด์ œ.

: ๋น„๋™๊ธฐ ๋ฐฉ์‹์œผ๋กœ ์‚ฌ์šด๋“œ๋ฅผ ์„ค์ •ํ•จ. ๋ฏธ๋ฆฌ ์ค€๋น„ ๋œ ์ƒํƒœ๋กœ ๋‘”๋‹ค๋Š” ๊ฒƒ.

: ๋ฐฐ๊ฒฝ์Œ๋งŒ ์ฒดํฌํ•˜๊ณ  ๋‚˜๋จธ์ง€์˜ ๊ฒฝ์šฐ์—” ํ•ด์ œํ•˜๊ธฐ.

 

4) Ambisonic ํ•ด์ œ.

: ๋“ฃ๋Š” ์‚ฌ๋žŒ์˜ ๋ฐฉํ–ฅ์— ๋”ฐ๋ผ ํšŒ์ „ํ•˜๋Š” soundfield ๋ฅผ ์ง€์›ํ•˜๋Š” ํฌ๋งท. XR or 360๋„ ์˜์ƒ์—์„œ ์‚ฌ์šฉ๋จ.

: ์Œ์› ํŒŒ์ผ์— Ambisonic-encoded audio ๊ฐ€ ์žˆ์„ ๊ฒฝ์šฐ์—๋งŒ ์ฒดํฌ.

 

5) Load Type: ์••์ถ•๋ฐฉ์‹

- Decompress On Load: ๋ฏธ๋ฆฌ ์••์ถ• ํ•ด์ œํ•ด์„œ ๋ฉ”๋ชจ๋ฆฌ์— ์˜ฌ๋ ค๋‘๊ธฐ. ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์ฐจ์ง€ํ•˜์ง€๋งŒ, CPU ์˜ ๋ถ€๋‹ด์€ ์ค„์ผ ์ˆ˜ ์žˆ์Œ. ๋ฏธ๋ฆฌ ๋ฉ”๋ชจ๋ฆฌ์— ์˜ฌ๋ ค๋†“๊ธฐ ๋•Œ๋ฌธ์— ์žฌ์ƒ์ด ๋น ๋ฆ„. ๋น ๋ฅด๊ฒŒ ์žฌ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ํšจ๊ณผ์Œ์— ์ ํ•ฉ.

- Compressed In Memory: ์••์ถ• ์ƒํƒœ๋กœ ๋ฉ”๋ชจ๋ฆฌ์— ์˜ฌ๋ ค๋’€๋‹ค๊ฐ€ ์‚ฌ์šด๋“œ๊ฐ€ ์žฌ์ƒ๋  ๋•Œ ์••์ถ•์„ ํ•ด์ œํ•จ. ์‚ฌ์šด๋“œ๊ฐ€ ์‹คํ–‰๋  ๋•Œ ์••์ถ•์„ ํ•ด์ œํ•˜๋ฏ€๋กœ ์•ฝ๊ฐ„์˜ ๋ ‰์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Œ. ๋ฉ”๋ชจ๋ฆฌ์˜ ๋ถ€๋‹ด์ด ์ ์ง€๋งŒ ์‹คํ–‰ ์ˆœ๊ฐ„์— CPU ์˜ ๋ถ€๋‹ด์ด ๋ฐœ์ƒํ•จ. ๋ฐฐ๊ฒฝ์Œ์— ์ฃผ๋กœ ์‚ฌ์šฉํ•จ.

- Streaming: ์‚ฌ์šด๋“œ๋ฅผ ์ฆ‰์‹œ ๋””์ฝ”๋”ฉ ํ•จ. ๋งค์šฐ ํฐ ํŒŒ์ผ์— ์ ํ•ฉํ•˜๊ณ  ์ตœ์†Œํ•œ์˜ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•จ. default ๊ฐ’์€ true ์ด์ง€๋งŒ ๋ฐฐ๊ฒฝ์Œ์˜ ๊ฒฝ์šฐ false ๋กœ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด ์‚ฌ์šด๋“œ๋ฅผ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค.

 

6) Preload Audio Data: Audio ์—์…‹์„ ๋ฏธ๋ฆฌ ๋ถˆ๋Ÿฌ์˜ฌ ๊ฒƒ์ธ์ง€๋ฅผ ๊ฒฐ์ •ํ•œ๋‹ค. ๊ธฐ๋ณธ๊ฐ’์€ true ์ด์ง€๋งŒ ์ด ์—ญ์‹œ ๋ฐฐ๊ฒฝ์Œ์€ false ๋กœ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด ์‚ฌ์šด๋“œ๋ฅผ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค.

 

 

์ฐธ๊ณ  ์‚ฌ์ดํŠธ

 

์œ ๋‹ˆํ‹ฐ(Unity) ์‚ฌ์šด๋“œ ์ตœ์ ํ™” ๊ฐ€์ด๋“œ

  1. 3D Sound Settings ์‚ฌ์šด๋“œ ํŒŒ์ผ์ด๋‚˜ Audio Source ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ถ™์ด๊ฒŒ ๋˜๋ฉด 3D Sound Set...

blog.naver.com

 

728x90