Освітлення (комп'ютерна графіка): відмінності між версіями

[неперевірена версія][неперевірена версія]
Вилучено вміст Додано вміст
Створена сторінка: Файл:Radiosity_-_RRV,_step_79.png|міні|300x300пкс|Сцену винесено з RRV<ref>{{cite web|url=http://dudka.cz/rrv|title=RRV - Radiosity R...
 
Немає опису редагування
Рядок 1:
[[Файл:Radiosity_-_RRV,_step_79.png|міні|300x300пкс|Сцену винесено з RRV<ref>{{cite web|url=http://dudka.cz/rrv|title=RRV - Radiosity Renderer and Visualizer|last=Dudka|first=Kamil|accessdate=1 February 2013}}</ref> (проста реалізація освітлення візуалізатора на основі OpenGL) 79 ітерації.]]
У 3D комп'ютерній графіці, '''освітлення''' є застосуванням методу скінченних елементів для розв'язання рівняння візуалізації для сцен з поверхнями, які відбивають світло дифузно. На відміну від візуалізації методів, які використовують алгоритми Монте-Карло (таких як трасування шляху), які обробляють всі види легких шляхів, типове освітлення складають тільки шляхи (представлені кодом "LD*E"), які залишають джерело світла і відображаються дифузно деяке число раз (можливо нуль) до потрапляння в очі. Освітлення - це глобальне висвітлення в тому сенсі, що висвітлення потрапляє на поверхню не тільки безпосередньо від джерел світла, але і від інших поверхонь, що відбивають світло. Освітлення - це незалежна точка зору, яка збільшує необхідні розрахунки, але робить їх корисними для всіх точок зору.
In [[3D computer graphics]], '''radiosity''' is an application of the [[finite element method]] to solving the [[rendering equation]] for scenes with surfaces that [[Diffuse reflection|reflect light diffusely]]. Unlike [[Rendering (computer graphics)|rendering]] methods that use [[Monte Carlo method|Monte Carlo algorithms]] (such as [[path tracing]]), which handle all types of light paths, typical radiosity only account for paths (represented by the code "LD*E") which leave a light source and are reflected diffusely some number of times (possibly zero) before hitting the eye. Radiosity is a [[global illumination]] [[algorithm]] in the sense that the illumination arriving on a surface comes not just directly from the light sources, but also from other surfaces reflecting light. Radiosity is viewpoint independent, which increases the calculations involved, but makes them useful for all viewpoints.
 
RadiosityМетоди methodsосвітлення wereбули firstвперше developedрозроблені in aboutв 1950 inроці theприблизно engineeringв fieldінженерній ofгалузі [[heat transfer]]теплообміну. TheyПізніше wereвони laterбули refinedудосконалені specificallyспеціально forдля theзадачі problemвізуалізації ofкомп'ютерної renderingграфіки computer graphics inв 1984 byроці researchersдослідниками atз [[CornellКорнельського University]]університету<ref>"Cindy Goral, Kenneth E. Torrance, Donald P. Greenberg and B. Battaile,[http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/S07/lectures/goral.pdf Modeling the interaction of light between diffuse surfaces]",, ''[[Computer Graphics (Publication)|Computer Graphics]]'', Vol. 18, No. 3.</ref> andі [[HiroshimaУніверситету University]]Хіросіми.<ref>"T. Nishita, E. Nakamae,[http://nishitalab.org/user/nis/cdrom/japanese/mscan.pdf Half-Tone Representation of 3-D Objects with Smooth Edges by Using a Multi-Scanning Method]",,''Journal of IPSJ, Vol.25, No.5, pp.703-711,1984 (in Japanese)''</ref>
 
NotableВідомі commercialкомерційні radiosity engines areдвигуни Enlighten від by [[Geomerics]]  (usedвикористовується forдля gamesігор, включаючи including [[Battlefield 3]] and [[ і Need forFor Speed: The Run]]); [[ 3ds Max]]; [[Form- form·Z|form•Z]]; [[ LightWave 3D]] and the [[і Electric Image Animation System]].
 
== Візуальні характеристики ==
[[Файл:Radiosity_Comparison.jpg|праворуч|міні|484x484пкс|DifferenceРізниця betweenміж standardстандартним directпрямим illuminationосвітленням withoutбез shadowтіні umbraUmbra, andі radiosityосвітлення withз shadowтінню umbraUmbra.]]
The inclusion of radiosity calculations in the rendering process often lends an added element of realism to the finished scene, because of the way it mimics real-world phenomena. Consider a simple room scene.
 
Рядок 23:
Progressive radiosity solves the system iteratively with intermediate radiosity values for the patch, corresponding to bounce levels. That is, after each iteration, we know how the scene looks after one light bounce, after two passes, two bounces, and so forth. This is useful for getting an interactive preview of the scene. Also, the user can stop the iterations once the image looks good enough, rather than wait for the computation to numerically converge.
 
[[Файл:Radiosity_Progress.png|праворуч|міні|680x680пкс|AsОскільки theалгоритм algorithm iteratesповторюється, lightто canсвітло beможна seenрозглядати toяк flowпотік intoна the sceneсцену, asу multipleтой bouncesчас, areяк computed.декілька Individualвідскоків patchesобчислюються. areОкремі visibleплями asвидно squaresяк onквадрати theна wallsпідлозі andі floorстінах.]]
 
Another common method for solving the radiosity equation is "shooting radiosity," which iteratively solves the radiosity equation by "shooting" light from the patch with the most error at each step. After the first pass, only those patches which are in direct line of sight of a light-emitting patch will be illuminated. After the second pass, more patches will become illuminated as the light begins to bounce around the scene. The scene continues to grow brighter and eventually reaches a steady state.
Рядок 45:
* Vis(''x'',''x' '') is a visibility function, defined to be 1 if the two points ''x'' and ''x' '' are visible from each other, and 0 if they are not.
 
[[Файл:Nusselt_analog.svg|міні|Геометричний форм-фактор (або "проектування тілесного кута") ''F''<sub>ij</sub>.<p><br> ''F''<sub>ij</sub> можуть бути отримані шляхом проектування елемента ''A''<sub>j</sub> на зовнішню частину півсфери, а потім - на одиничне коло. Форм-фактор при цьому дорівнює частці одиничного кола, яка охоплюється цією проекцією.</p><p>Форм-фактори підкоряються взаємному співвідношенню ''A''<sub>i</sub>''F''<sub>ij</sub> = ''A''<sub>j</sub>''F''<sub>ji</sub></p>]]
[[Файл:Nusselt_analog.svg|праворуч|міні|The geometrical form factor (or "projected solid angle") ''F''<sub>ij</sub>.<br>
<br>
''F''<sub>ij</sub> can be obtained by projecting the element ''A''<sub>j</sub> onto the surface of a unit hemisphere, and then projecting that in turn onto a unit circle around the point of interest in the plane of ''A''<sub>i</sub>. The form factor is then equal to the proportion of the unit circle covered by this projection.<br>
<br>
Form factors obey the reciprocity relation ''A''<sub>i</sub>''F''<sub>ij</sub> = ''A''<sub>j</sub>''F''<sub>ji</sub>]]
If the surfaces are approximated by a finite number of planar patches, each of which is taken to have a constant radiosity ''B<sub>i</sub>'' and reflectivity ''&#x3C1;<sub>i</sub>'', the above equation gives the discrete radiosity equation,
 
Рядок 86 ⟶ 82:
 
== Переваги ==
[[Файл:Utah_teapot_simple_2.png|міні|AСучасна modernвізуалізація renderчайника of the iconic [[Utah teapot]]Юта. '''RadiosityОсвітлення''' was usedвикористовувалось forдля allвсіх diffuseдифузних illuminationвисвітлень inв thisцій sceneсцені.]]
One of the advantages of the Radiosity algorithm is that it is relatively simple to explain and implement. This makes it a useful algorithm for teaching students about global illumination algorithms. A typical direct illumination renderer already contains nearly all of the algorithms ([[Perspective transform|perspective transformations]], [[texture mapping]], [[hidden surface removal]]) required to implement radiosity. A strong grasp of mathematics is not required to understand or implement this algorithm{{Citation needed|date=March 2011}}.