2008 | OriginalPaper | Buchkapitel
Creating geometric objects
Erschienen in: Writing mental ray® Shaders
Verlag: Springer Vienna
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by (Link öffnet in neuem Fenster)
So far, all of our mental ray API library functions have come from the library declared in the header file shader.h, like the illumination model functions in Chapter 12 to calculate the specular component—mi_phong_specular, mi_blinn_specular, and friends. Shaders can also call functions in mental ray’s
geometry shader API
, declared in geoshader.h. These functions mirror the language of the mi scene file, and can be used to define
geometry shaders
that create geometric data. Like displacement shaders, the role of the geometry shader isn’t to “shade.” Geometry shaders add elements to the geometric component of the scene database constructed by mental ray before the actual rendering begins. Some objects lend themselves to procedural construction, either because they are based on pre-existing data (CAD data that is translated into mental ray’s object representation) or because they use quasi-random techniques to model natural phenomena, like plants and trees.