3D графикадағы Phong көлеңкелеуі: беттік нормаларды интерполяциялау арқылы жарықтандыру әдісі. Phong моделі, интерполяциясы және көлеңкелеу техникасы туралы ақпарат.
Ағылшыншамен салыстырыңыз: абзацты басыңыз — түпнұсқа терезеде ашылады. Абзац астындағы EN түймесі оны мәтін ішінде көрсетеді.
Мазмұны
Кіріспе
Бет көлеңкелеуі үшін интерполяциялық техника
Бет көлеңкелеуі үшін Фонгтың қалыпты векторлық интерполяциялық техникасы
Interpolation technique for surface shading
Phong's normal vector interpolation technique for surface shading
3D компьютерлік графикада Фонг көлеңкелеуі, Фонг интерполяциясы немесе қалыпты векторлық интерполяциялық көлеңкелеу – компьютерлік графиканың негізін қалаушы Буи Туонг Фонг ойлап тапқан бет көлеңкелеуі үшін қолданылатын интерполяциялық техника. Фонг көлеңкелеуі растрленген көпбұрыштардың беттік нормалдарын интерполяциялайды және интерполяцияланған нормалдар мен шағылысу моделіне сүйенген пиксель түстерін есептейді. Фонг көлеңкелеуі Фонг интерполяциясы мен Фонг шағылысу моделінің нақты комбинациясын да білдіруі мүмкін.
In 3D computer graphics, Phong shading, Phong interpolation, or normal vector interpolation shading is an interpolation technique for surface shading invented by computer graphics pioneer Bui Tuong Phong. Phong shading interpolates surface normals across rasterized polygons and computes pixel colors based on the interpolated normals and a reflection model. Phong shading may also refer to the specific combination of Phong interpolation and the Phong reflection model.
Тарих
Фонг көлеңкесі және Фонг шағылысу моделі Юта университетінде Буи Туонг Фонгпен әзірленді, ол оларды 1973 жылғы Ph.D. диссертациясында және 1975 жылғы мақаласында жариялады. Фонгтың әдістері енгізілген кезде революциялық деп есептелді, бірақ содан бері көптеген рендеринг қолданбалары үшін де-факто стандартты көлеңкелеу әдісіне айналды. Фонгтың әдістерінің танымалдылығының себебі – олардың рендерингтелген пикселге жұмсалатын есептеу уақытын тиімді пайдалануы.
Phong shading and the Phong reflection model were developed at the University of Utah by Bui Tuong Phong, who published them in his 1973 Ph. D. dissertation and a 1975 paper. Phong's methods were considered radical at the time of their introduction, but have since become the de facto baseline shading method for many rendering applications. Phong's methods have proven popular due to their generally efficient use of computation time per rendered pixel.
Фонг интерполяциясы
Фонг көлеңкесі Горау көлеңкесінен жақсырақ және тегіс беттің көлеңдеуін жақсырақ жуықтайды. Фонг көлеңкесі тегіс өзгеретін беттік нормальдық векторды қабылдайды. Phong интерполяция әдісі, Phong көлеңкелі модель сияқты кішкентай айқын жарқыраулары бар шағылысу моделіне қолданғанда, Горау көлеңкесінен жақсы жұмыс істейді. Горау көлеңкесінің ең маңызды мәселесі үлкен көпбұрыштың ортасында жарқыраулардың пайда болуында. Бұл жарқыраулар көпбұрыштың төбелерінде болмағандықтан және Горау көлеңкесі төбелік түстерді интерполяциялайтындықтан, жарқырау көпбұрыштың ішкі бөлігінде болмайды. Бұл мәселе Фонг көлеңкесімен шешіледі. Горау көлеңкесі көпбұрыштар арқылы түстерді интерполяциялайтын болса, Фонг көлеңкесінде нормальдық вектор көпбұрыш беті бойынша сызықтық интерполяцияланады. Беттік нормаль әр пикселде интерполяцияланып, нормалданады, содан кейін соңғы пиксел түсін алу үшін, мысалы, Фонг шағылысу моделі сияқты шағылысу моделіне қолданылады. Фонг көлеңкесі Горау көлеңкесінен есептеу жағынан қымбат, себебі шағылысу моделі әр төбеде емес, әр пикселде есептелуі керек. Қазіргі заманғы графикалық аппараттарда осы алгоритмнің түрлері пиксельдік немесе фрагменттік шейдерлерді пайдаланып жүзеге асырылады.
Phong shading improves upon Gouraud shading and provides a better approximation of the shading of a smooth surface. Phong shading assumes a smoothly varying surface normal vector. The Phong interpolation method works better than Gouraud shading when applied to a reflection model with small specular highlights such as the Phong reflection model. The most serious problem with Gouraud shading occurs when specular highlights are found in the middle of a large polygon. Since these specular highlights are absent from the polygon's vertices and Gouraud shading interpolates based on the vertex colors, the specular highlight will be missing from the polygon's interior. This problem is fixed by Phong shading. Unlike Gouraud shading, which interpolates colors across polygons, in Phong shading, a normal vector is linearly interpolated across the surface of the polygon from the polygon's vertex normals. The surface normal is interpolated and normalized at each pixel and then used in a reflection model, e. g. the Phong reflection model, to obtain the final pixel color. Phong shading is more computationally expensive than Gouraud shading since the reflection model must be computed at each pixel instead of at each vertex. In modern graphics hardware, variants of this algorithm are implemented using pixel or fragment shaders.
Фонг шағылысу моделі
Фонг көлеңкелеуі Фонг интерполяциясы мен Фонг шағылысу моделінің нақты комбинациясын да білдіре алады, бұл жергілікті жарықтандырудың эмпирикалық моделі. Ол беткейдің жарықты қалай шағылыстыратынын, оның ішінде кедір-бөдір беттердің диффуздық шағылысын және жылтыр беттердің айқын шағылысын сипаттайды. Бұл Бюи Туонг Фонгтың жылтыр беткейлерде шағын, қарқынды жарқыраулар болатынын, ал күңгірт беткейлерде біртіндеп азайятын үлкен жарқыраулар болатыны туралы байқауына негізделген. Шағылысу моделі сонымен қатар бүкіл көріністе шашыраған жарықтың шағын мөлшерін ескеретін қоршаған орта компонентін де қамтиды.
Phong shading may also refer to the specific combination of Phong interpolation and the Phong reflection model, which is an empirical model of local illumination. It describes the way a surface reflects light as a combination of the diffuse reflection of rough surfaces with the specular reflection of shiny surfaces. It is based on Bui Tuong Phong's informal observation that shiny surfaces have small intense specular highlights, while dull surfaces have large highlights that fall off more gradually. The reflection model also includes an ambient term to account for the small amount of light that is scattered about the entire scene.