๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Personal

[๊ณต๋ชจ์ „ ํ™œ๋™] ์œ ๋‹ˆํ‹ฐ MP4 ์˜์ƒ ์‚ฝ์ž…ํ•˜๊ธฐ / ๊ฐ€์ ธ์˜ค๊ธฐ - ๊ฒŒ์ž„ ํ”„๋กค๋กœ๊ทธ

728x90
๋ฐ˜์‘ํ˜•

 

 

์•ˆ๋…•ํ•˜์„ธ์š”. ์ด๋ฒˆ ๊ธ€์€ Unity ๊ฒŒ์ž„์—”์ง„์—์„œ mp4 Video ํŒŒ์ผ์„ ๋„ฃ์–ด ๊ฒŒ์ž„์˜ ํ”„๋กค๋กœ๊ทธ ๋Š๋‚Œ์„ ๋‚ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. 

๊ณต๋ชจ์ „ ์ง„ํ–‰ํ•˜๋ฉด์„œ ์ฒ˜์Œ ๊ฒŒ์ž„์— ์˜์ƒ์„ ๋„ฃ์–ด๋ณด๋Š”๋ฐ, ์ƒ๊ฐ๋ณด๋‹ค ๊ฐ„๋‹จํ•ด์„œ ์‰ฝ๊ฒŒ ๋”ฐ๋ผ ํ•˜์‹ค ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

 

๋ฐฉ๋ฒ•์€ Canvas / UI๋ฅผ ์ด์šฉํ•œ ๋ฐฉ๋ฒ•๊ณผ 3D ์˜ค๋ธŒ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ด์„œ ์ง„ํ–‰ํ•œ ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ €๋Š” Canvas / UI ํ™˜๊ฒฝ์—์„œ ์ง„ํ–‰ํ•˜์˜€๊ณ , 3D ์˜ค๋ธŒ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•œ ๋ฐฉ๋ฒ•์€ ์žฌ๊ฐ€ ์ฐธ๊ณ ํ•œ ์˜์ƒ์„ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

 

https://www.youtube.com/watch?v=L6-vAtuN0h8&t=6s 

 

 

https://www.youtube.com/watch?v=ZtUz-zlxgwA

(2023.12.14) - ํ™œ์šฉ๋œ ๊ฒŒ์ž„ ์˜์ƒ ์ฒจ๋ถ€

 

 

 

 

 

 

 

 Unity์— MP4 ํŒŒ์ผ ๋„ฃ๊ธฐ

 

mp4 ํŒŒ์ผ

 

๋จผ์ €, ๊ฐ์ž ๊ฐ€์ง€๊ณ  ์žˆ๋Š” MP4 ํŒŒ์ผ์„ Unity์— ์˜ฎ๊ฒจ์ค๋‹ˆ๋‹ค.

 

 

 

UI - Panel

 

Hierarchy ์ฐฝ์— ์šฐํด๋ฆญ -> UI -> Panel์„ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค.

 

 

 

 

Panel - Image ์‚ญ์ œ

 

Panel - Raw Image ์‚ฝ์ž…

 

 

Panel์— Image๋ฅผ ์‚ญ์ œํ•˜๊ณ , Raw Image ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค.

 

 

 

 

Create - Render Texture

 

Assets ํด๋”์— ์šฐํด๋ฆญ -> Create -> Render Texture ๋งŒ๋“ค์–ด ์ค๋‹ˆ๋‹ค.

 

 

 

 

 

 

Size ์กฐ์ ˆ

 

๋งŒ๋“ค์–ด ๋†“์€ Render Texture Size๋ฅผ ์กฐ์ ˆํ•ด ์ค๋‹ˆ๋‹ค. FHD ๊ธฐ์ค€ 1920 x 1080์œผ๋กœ ๋งž์ถฐ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

 

 

 

 

Panel - Raw Image - Texture

 

์ด์ œ Panel - Raw Image - Texture ๊ฒฝ๋กœ์— Size๊นŒ์ง€ ์กฐ์ ˆํ•œ Render Texture๋ฅผ ์‚ฝ์ž…ํ•ฉ๋‹ˆ๋‹ค.

 

 

 

 

 

 

Video Player ์ปดํฌ๋„ŒํŠธ

 

 

Video Player - Video Clip

 

Panel์— Video Player ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค. ์ด์–ด์„œ, Video Player - Video Clip ๊ฒฝ๋กœ์— ๊ฐ€์ง€๊ณ  ์žˆ๋Š” MP4 ํŒŒ์ผ์„ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค.

 

 

 

Video Player - Target Texture

 

๋งˆ์ง€๋ง‰์œผ๋กœ, Video Player - Target Texture ๊ฒฝ๋กœ์— ๋งŒ๋“ค์—ˆ๋˜ Render Texture๋ฅผ ๋„ฃ์–ด์ฃผ๋ฉด ๋์ž…๋‹ˆ๋‹ค.

 

 

 

 

 

 

 


 

์‹คํ–‰ ํ™”๋ฉด

 

 

 

 

 

 

728x90
๋ฐ˜์‘ํ˜•