JP2009500730A - Computer graphic shader system and method - Google Patents
Computer graphic shader system and method Download PDFInfo
- Publication number
- JP2009500730A JP2009500730A JP2008519658A JP2008519658A JP2009500730A JP 2009500730 A JP2009500730 A JP 2009500730A JP 2008519658 A JP2008519658 A JP 2008519658A JP 2008519658 A JP2008519658 A JP 2008519658A JP 2009500730 A JP2009500730 A JP 2009500730A
- Authority
- JP
- Japan
- Prior art keywords
- shader
- phenomenon
- node
- metanode
- shaders
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/50—Lighting effects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
- Debugging And Monitoring (AREA)
- Processing Or Creating Images (AREA)
Abstract
種々のシェイディングアプリケーションを、単一の言語のもとで統合する方法とシステムが記載され、それにより、シェイダーの簡単な再使用および再目的化が可能になり、コンピュータプログラミングの必要なくシェイダーの設計および構築が促進され、シェイダーのグラフィカルなデバッグが可能になる。
【選択図】図16A method and system for integrating various shading applications under a single language is described, which allows for easy reuse and re-use of shaders, and shader design without the need for computer programming And building is facilitated, allowing shader graphical debugging.
[Selection] Figure 16
Description
本発明は、一般的には、コンピュータグラフィック、コンピュータ支援デザインなどの分野に関し、特に、シェイダー(shader)システムを生成し、そのようにして生成されたシェイダーシステムを、シーンのイメージのレンダリングに使用するシステムと方法に関する。本発明は、特に、コンピュータグラフィックシステムにおいて有用な新しいタイプの構成要素を提供し(それはここでは「フェノメノン(phenomenon)」として識別され)、パッケージ化およびカプセル化されたシェイダーDAG(「有向非循環グラフ(directed acyclic graph)」)または協働(cooperating)シェイダーDAGのセットを含むシステムを備え、そのそれぞれは1つまたは2つ以上のシェイダーを含むことができ、シェイダーが正確にレンダリング中に協働できることを保証するような方法で、シーンの少なくとも一部を規定することを支援するために生成されカプセル化される。 The present invention relates generally to the fields of computer graphics, computer-aided design, and more particularly to generating a shader system and using the generated shader system for rendering an image of a scene. The system and method. The present invention provides a new type of component that is particularly useful in computer graphics systems (identified here as “phenomenon”) and is packaged and encapsulated shader DAG (“Directed Acyclic” A system that includes a set of "directed acyclic graphs") or cooperating shader DAGs, each of which can include one or more shaders, where the shaders collaborate accurately during rendering Generated and encapsulated to help define at least a portion of the scene in a manner that ensures that it can.
コンピュータグラフィック、コンピュータ支援幾何学デザインなどにおいては、アーティスト、製図家、または他のユーザー(一般的にはここでは「オペレータ」と称される)は、コンピュータにより維持されるように、あるシーンにおけるオブジェクトの三次元表現を生成し、その後、当該シーンにおける前記オブジェクトの各二次元イメージを、1つまたは2つ以上の方向からレンダリングしようとする。第1の表現生成フェーズにおいては、従来は、コンピュータグラフィックシステムが、例えば、シーンにおけるオブジェクトの輪郭および/また断面を含む種々の二次元線画から三次元表現を生成し、そのような線画に対して数多くの操作を施して、三次元空間における二次元表面を生成し、それに続くパラメータおよびそのような表面のコントロール点の修正により、オブジェクトの表現結果の形状を補正または修正する。 In computer graphics, computer-aided geometric design, etc., an artist, drafter, or other user (commonly referred to herein as an “operator”) is an object in a scene that is maintained by the computer. And then each 2D image of the object in the scene is to be rendered from one or more directions. In the first representation generation phase, conventionally, a computer graphics system generates a three-dimensional representation from various two-dimensional line drawings including, for example, the contours and / or cross-sections of objects in the scene, and for such line drawings. Numerous operations are performed to generate a two-dimensional surface in three-dimensional space, and then correct or correct the shape of the representation of the object by modifying the parameters and control points of such surface.
この工程の間、オペレータは、オブジェクト表面の種々の特質、シーンを照明する光源の構造および特性、およびイメージを生成する1台または2台以上のシミュレートされたカメラの構造および特性も定義する。シーン、光源、およびカメラの構造および特性が定義された後、第2フェーズにおいて、オペレータは、特別な視点方向からのシーンのイメージをコンピュータがレンダリングできるようにする。 During this process, the operator also defines various characteristics of the object surface, the structure and characteristics of the light source that illuminates the scene, and the structure and characteristics of one or more simulated cameras that generate the image. After the structure and characteristics of the scene, light source, and camera are defined, in a second phase, the operator allows the computer to render an image of the scene from a special viewpoint direction.
シーンにおけるオブジェクト、光源、およびカメラは、第1シーン定義フェーズにおいて、少なくとも3つの空間次元を、そしておそらく1つの時間次元を含む、個々の複次元数学的表現により定義される。数学的表現は、典型的には、ツリー構造化されたデータ構造に格納される。オブジェクトの表面の特質は、その結果、「シェードツリー(shade trees)」により定義され、そのそれぞれは、1つまたは2つ以上のシェイダーを含み、そのシェイダーは、第2シーンレンダリングフェーズの間に、コンピュータが個々の表面のレンダリングできるようにし、実際には、個々の表面のカラーを表現するカラー値を提供する。シェードツリーのシェイダーは、オペレータにより生成されるか、コンピュータグラフィックシステムにより、共に第2シーンレンダリングフェーズにおいて個々の表面のイメージをコンピュータにレンダリングさせることができるCまたはC++のような高レベル言語により演繹的に提供される。 Objects, light sources, and cameras in the scene are defined in the first scene definition phase by individual multidimensional mathematical representations, including at least three spatial dimensions and possibly one time dimension. The mathematical representation is typically stored in a tree structured data structure. The surface qualities of the object are consequently defined by “shade trees”, each of which includes one or more shaders, which during the second scene rendering phase Enables the computer to render individual surfaces and in practice provides color values that represent the color of the individual surfaces. Shade tree shaders can be generated by an operator, or deduced by a computer graphics system, both in a high level language such as C or C ++, that allows the computer to render images of individual surfaces in the second scene rendering phase. Provided to.
コンピュータグラフィック機構において典型的にもたらされるように、シェイダーおよびシェードツリーの生成および使用からは数多くの問題が発生する。第1に、シェイダーは、一般的に、そうするようにプログラムされない限り、お互いに協働することはできない。典型的には、シェイダーに提供される入力値は定数値であり、それにより、シェイダーの柔軟性、および、興味ある実写のような方法での特徴のレンダリング機能に制限を与えてしまう。更に、その入力値を共通のソースから得ることができる協働シェイダーのシステムを設定することは一般的に難しい。 Numerous problems arise from the generation and use of shaders and shade trees, as typically provided in computer graphics mechanisms. First, shaders generally cannot cooperate with each other unless programmed to do so. Typically, the input value provided to the shader is a constant value, thereby limiting the shader's flexibility and ability to render features in an interesting live-like manner. Furthermore, it is generally difficult to set up a collaborative shader system that can obtain its input values from a common source.
そのような問題に解決法を提供するために、上記に引用した米国特許第6,496,190号明細書は、「フェノメノン」と称される新しいタイプのエンティティを作成でき、インスタンス化でき、シーンのイメージのレンダリングにおいて使用できるコンピュータグラフィックシステムを記載している。フェノメノンは、1つまたは2つ以上のノードを備えるカプセル化シェイダーDAG(「有向非循環グラフ」)であり、それぞれのノードはシェイダーまたは、協働するように相互接続され、インスタンス化されて、シーンにおけるエンティティに付加されるそのようなDAGのカプセル化されたセットを備える。ここにおいて、エンティティは、シーンにおけるオブジェクトの表面のカラーおよびテクスチャ特性を含む、シーンの多様なタイプの特性、シーンにおけるボリュームおよび幾何学的図形の特性、シーンを照明する光源の特徴、レンダリング中にシミュレートされるシミュレートされたカメラの特性、およびレンダリングにおいて有効な他の多くの特徴を定義するための、シーン定義処理の間に作成される。 In order to provide a solution to such a problem, the above-cited US Pat. No. 6,496,190 can create and instantiate a new type of entity called “phenomenon” A computer graphics system is described that can be used in the rendering of an image. Phenomenon is an encapsulated shader DAG (“Directed Acyclic Graph”) with one or more nodes, where each node is shader or interconnected and instantiated to work together, With an encapsulated set of such DAGs attached to entities in the scene. Here, entities are the various types of scene characteristics, including the surface color and texture characteristics of objects in the scene, the volume and geometric characteristics of the scene, the characteristics of the light sources that illuminate the scene, and the simulation during rendering. Created during the scene definition process to define the characteristics of the simulated camera being simulated and many other features useful in rendering.
オペレータにより、シーンとの関連において使用するために選択されたフェノーミナは、予め定義することができ、または、オペレータがフェノメノンクリエータを使用して、基本シェイダーノードから構築することもできる。フェノメノンクリエータは、DAGまたは協働DAGにおけるシェイダーが、シーンのイメージのレンダリング中に正しく協働できるように、フェノーミナが構築されることを保証する。 The phenomenon selected by the operator for use in the context of the scene can be pre-defined, or the operator can be constructed from the basic shader node using the Phenomenon creator. The Phenomenon Creator ensures that the Phenomena is constructed so that shaders in the DAG or collaborative DAG can work correctly during the rendering of the scene image.
シーンに付加される前に、フェノメノンエディタを使用して、フェノメノンのパラメータのそれぞれに対して値を定義するために使用される値、または関数を提供することによりフェノメノンはインスタンス化される。
シーンの表現が定義され、フェノーミナが付加された後、シーンイメージジェネレータは、シーンのイメージを生成できる。その操作において、シーンイメージジェネレータは、前処理フェーズ,レンダリングフェーズ,及び後処理フェーズを含む、一連のフェーズにおいて作動する。前処理フェーズの間に、シーンイメージジェネレータは、シャドウ(shadow)およびフォトンマッピング(photon mapping)、多重継承分析(multiple inheritance resolution)のような前処理を実行できる。シーンイメージジェネレータは、例えば、シーンに付加されたフェノメノンが、それによりシーンに対して定義された幾何学的図形を生成する幾何学的シェイダーを含む場合は、前処理操作を実行できる。レンダリングフェーズの間、シーンイメージジェネレータはイメージのレンダリングを行なう。後処理フェーズの間、シーンイメージジェネレータは、シーンに付加されたフェノメノンが、例えば、被写界深度または、レンダリングされたイメージの各ピクセル値に関連して格納されている速度および深度情報に依存する動きによるブレ計算のような後処理操作を定義するシェイダーを含む場合は、後処理操作を実行できる。
Prior to being added to the scene, the Phenomenon is instantiated by providing a value, or function, that is used to define a value for each of the Phenomenon parameters using the Phenomenon Editor.
After the scene representation is defined and the phenomina is added, the scene image generator can generate an image of the scene. In operation, the scene image generator operates in a series of phases, including a preprocessing phase, a rendering phase, and a postprocessing phase. During the preprocessing phase, the scene image generator can perform preprocessing such as shadow and photon mapping, multiple inheritance resolution. The scene image generator can perform pre-processing operations, for example, if the phenomenon added to the scene includes a geometric shader that generates a geometric shape defined for the scene. During the rendering phase, the scene image generator renders the image. During the post-processing phase, the scene image generator relies on the velocity and depth information that the Phenomenon added to the scene is stored in relation to, for example, depth of field or each pixel value of the rendered image. If it includes a shader that defines a post-processing operation such as motion blur calculation, the post-processing operation can be performed.
米国特許第6,496,190号明細書に記載されたフェノーミナシステムは、非常に有効である。しかし、近年、多くのシェイディングプラットフォームおよび言語が開発され、そのため、ビデオゲームのシェイディングを行なうハードウェアであれ、動画の視覚的効果のためのシェイディングを行なうソフトウェアであれ、現存のシェイダー言語は、特別なプラットフォームおよびアプリケーションに、より狭い範囲で焦点をおいたものとなっている。この、従来のシェイダーシステムおよび言語に典型的なプラットフォームへの依存性は、大きな制限となり得る。 The Phenomina system described in US Pat. No. 6,496,190 is very effective. However, in recent years, many shading platforms and languages have been developed, so existing shader languages, whether hardware for video game shading or software for shading video visual effects, A narrower focus on special platforms and applications. This platform dependency typical of traditional shader systems and languages can be a major limitation.
プラットフォームに依存せず、種々のシェイディングツールおよびアプリケーションを、単一の言語またはシステム構成概念のもとで統合できるシェイダーの方法およびシステムを提供することが望ましい。
また、効率的で簡単な、シェイダーの再使用と再目的化を可能にし、頻繁に普通に発生する(例えば、Lara Croft-Tomb Raider)、ビデオゲームおよび特作映画の統合に有効である方法とシステムを提供することも望ましい。
It would be desirable to provide a shader method and system that is platform independent and that allows various shading tools and applications to be integrated under a single language or system construct.
It also enables efficient and simple shader reuse and re-purpose, and is effective in integrating video games and feature films that occur frequently and frequently (eg, Lara Croft-Tomb Raider) It is also desirable to provide a system.
また、アーティストにとっては有効な、コンピュータプログラミングの必要がなく、シェイダーの設計および構築を容易にする方法およびシステムを提供することも望ましい。
更に、シェイダーのグラフィカルデバッグを可能にし、シェイダークリエータが、シェイダーにおける欠陥を見つけて解決できるようにする方法とシステムを提供することが望ましい。
It would also be desirable to provide a method and system that facilitates the design and construction of shaders without the need for computer programming that is useful to artists.
In addition, it would be desirable to provide a method and system that enables graphical debugging of a shader and enables a shader writer to find and resolve defects in the shader.
本発明は、その種々の形態は、ここでは集合的に「メンタルミル(Mental Mill)」と称されるが、従来技術の上記の制限に取り組み、種々のシェイディングアプリケーションを単一の言語(ここでは「MetaSLシェイディング言語(MetalSL shading language)」と称される)のもとで統合でき、シェイディングの簡単な再使用および目的変更を可能にし、コンピュータプログラミングの必要なく、シェイダーの設計および構築を容易にし、シェイダーのグラフィカルデバッグを可能にし、多くの他の機能を達成する、プラットフォームに依存しない方法およびシステムを提供する。 The present invention, whose various forms are collectively referred to herein as "Mental Mill", addresses the above limitations of the prior art and allows various shading applications to be described in a single language (here. Can be integrated under the “MetaSL shading language”, allowing easy re-use and re-purpose of shading to design and build shaders without the need for computer programming Provide a platform-independent method and system that facilitates, enables graphical debugging of shaders, and achieves many other functions.
本発明の1つの形態は、シェイダーネットワークにおいて、組み合わせて、より複雑かつ視覚的に興味あるシェイダーを構築できる、簡単かつコンパクトな構成要素化シェイダー(ここではメタノード(Metanode)と称される)の作成を容易にする方法とシステムに関連する。
本発明の更なる形態は、ここではMetaSL(Meta Shading Language)と称される、メンタルミルシェイディング言語である。MetaSLは、簡単ではあるが、特にシェイダーを実装するための表現豊かな言語として設計されている。MetaSLは、また、以前は特別なプラットフォームおよび状況(例えば、ゲームためのハードウェアによるシェイディング、特作映画の視覚効果のためのソフトウェアによるもの)に焦点が置かれていた既存のシェイディングアプリケーションを、単一の言語および管理構造の下で統合するようにも設計されている。
One form of the invention is the creation of a simple and compact componentized shader (referred to herein as a Metanode) that can be combined to build more complex and visually interesting shaders in a shader network. Related to methods and systems that facilitate.
A further form of the invention is a mental mill shading language, referred to herein as MetaSL (Meta Shading Language). MetaSL is a simple but particularly expressive language designed to implement shaders. MetaSL also has existing shading applications that previously focused on special platforms and situations (eg, hardware shading for games, software for visual effects in feature films). It is also designed to integrate under a single language and management structure.
メンタルミルは、このようにMetaSLで書かれたメタノード(つまり、シェイダーブロック(shader block))の作成を可能にし、それを洗練されたシェイダーグラフおよびフェノーミナを形成するために付加し組み合わせることができる。
シェイダーグラフは、シェイダーを作成するための、直感的なグラフィカルユーザーインタフェースを提供し、それは、シェイダーソフトウェアコードを書くための技術的専門知識がないユーザーにとってもアクセス可能である。
Mental mills thus allow the creation of metanodes (ie shader blocks) written in MetaSL, which can be added and combined to form sophisticated shader graphs and phenomina.
The shader graph provides an intuitive graphical user interface for creating shaders that is accessible to users who do not have technical expertise to write shader software code.
本発明の別の形態は、シェイダー作成を管理するAPIのライブラリに関する。
本発明の更なる形態においては、メンタルミルGUIライブラリは、シェイダーグラフパラダイムを利用して、シェイダーグラフおよびフェノーミナを構築するための完全なGUIを提供する。
本発明の別の形態においては、MetaSLシェイディング言語は、特別なハードウェアプラットフォームに対する、現存および将来のシェイディング言語すべてのスーパーセットとして効果的に構築でき、そのため、特別な目的のグラフィックハードウェアのそのようなインスタンス化には依存しないので、単一の、再使用可能なフェノメノンのMetaSL記述(結果としてMetaSLにおけるメタノードから構成される)から、特別な目的のシェイダー言語(Cg、HLSLなど)における特別な目的のプラットフォームに対する、最適化されたソフトウェアコードを生成するメンタルミルシステムにおける専用コンパイラの使用が可能になる。
Another embodiment of the present invention relates to an API library for managing shader creation.
In a further form of the invention, the mental mill GUI library provides a complete GUI for building shader graphs and phenomina using the shader graph paradigm.
In another aspect of the present invention, the MetaSL shading language can be effectively constructed as a superset of all existing and future shading languages for a special hardware platform, and thus special purpose graphics hardware. Since it does not depend on such instantiations, a single, reusable Phenomenon MetaSL description (consisting of resulting Metanodes in MetaSL), and special in special purpose shader languages (Cg, HLSL, etc.) It is possible to use a dedicated compiler in a mental mill system that generates optimized software code for a specific target platform.
特別な目的のプラットフォーム/言語に対し、プラットフォーム/言語に関して最適化されたコードは、問題のシェイディング言語に対する固有のコンパイラにより、特別なハードウェア(集積回路チップ)のインスタンス化に対するマシン語に変換できる。(固有コンパイラは、メンタルミルの一部である必要はなく、一般的な場合もそうでない)。これは、例えば、ある所与の時期において特別なチップが利用できるが、すぐにそのチップの次世代版により置き換えられてしまう場合に特に有効である。 For special purpose platforms / languages, platform / language optimized code can be translated into machine language for special hardware (integrated circuit chip) instantiation by a compiler specific to the shaded language in question. . (The native compiler does not have to be part of the mental mill, and in general it is not). This is particularly useful when, for example, a special chip is available at a given time but is quickly replaced by the next generation version of the chip.
この点に関して、複雑な視覚効果、つまりフェノーミナを、Cgのようなシェイディング言語で表現する従来の試みは、マシン語へのコンパイル処理に対して最適でないコードという結果になったことに注意されたい。そしてそのような場合、コンパイル処理は極端に遅く、それにより、所望のリアルタイム性能を頓挫させ、またはハードウェアレベルのシェイダーコードはそれが可能なほどには効率的でなく、従ってコードは非常に緩慢に実行された。本発明の前記の形態は、そのような従来の試みに関するこの問題に対処し解決する。 In this regard, note that previous attempts to represent complex visual effects, or phenomina, in shaded languages such as Cg resulted in code that was not optimal for compiling into machine language. . And in such a case, the compilation process is extremely slow, thereby ruining the desired real-time performance, or the hardware-level shader code is not as efficient as it can be, so the code is very slow Was executed. The foregoing aspects of the invention address and solve this problem with such prior attempts.
本発明の更なる形態は、フェノメノン作成環境における、シェイダープログラマ/ライター(つまり、MetaSLシェイディング言語におけるプログラマ)に対しての、新しく、相互作用的、視覚的、そしてリアルタイムなデバッガに関する。このデバッガは、下記に詳細に記述されるが、コードのわずか1行における変更の効果さえも、開発中のシェイダー、メタノード、すなわちフェノメノンによるテストシーンが常にレンダリングされる、「ビューポート(viewport)」において、視覚的フィードバックにより即座に明白にする。 A further aspect of the invention relates to a new interactive, visual and real-time debugger for shader programmers / writers (ie programmers in the MetaSL shading language) in the Phenomenon creation environment. The debugger is described in detail below, but the "viewport" where the test scene with the shader, metanode, or Phenomenon in development is always rendered, even with the effect of changes in just one line of code. , Immediately clarified by visual feedback.
本発明の更なる形態、例、詳細、実施形態、および実践は、下記の「発明の詳細な説明」で記載される。
本発明は、付随する請求項における特殊性により指定される。本発明の上記の更なる利点は、添付された図面との連係における下記の記述を参照することにより、更に理解される。
Additional aspects, examples, details, embodiments, and practices of the invention are described below in the Detailed Description of the Invention.
The invention is specified by the particularity of the appended claims. The above further advantages of the present invention will be further understood by reference to the following description in conjunction with the accompanying drawings.
・関連出願への相互参照
本特許出願は、同一所有されている、2002年12月17日付けで特許公開された、米国特許第6,496,190号明細書(「コンピュータグラフィックシステムにおいて使用される、協働およびカプセル化シェイダーとシェイダーDAGのシステムの生成および使用のためのシステムと方法」)を、参考文献として参照により本願明細書に引用したものとする。また、共有されている、2005年7月1日付けで出願した、米国仮出願第60/696,120号明細書(「コンピュータグラフィックシェイダーシステムおよび方法」(弁理士審理予定表番号MNTL-103-PR))、及び、2005年8月11日付けで出願した、米国仮出願第60/707,424号明細書(「改善されたコンピュータグラフィックシェイダーシステムおよび方法」(弁理士審理予定表番号MNTL-105-PR))の利益を主張するものであって、参照により本願明細書に引用したものとする。
Cross-reference to related applications This patent application is commonly owned and issued on December 17, 2002, US Pat. No. 6,496,190 (“Used in Computer Graphic Systems”). Systems and methods for the generation and use of collaborative and encapsulated shader and shader DAG systems "), which is incorporated herein by reference. In addition, the US Provisional Application No. 60 / 696,120, filed July 1, 2005 (“Computer Graphic Shader System and Method” (patent attorney trial schedule number MNTL-103- PR)) and US Provisional Application No. 60 / 707,424 ("Improved Computer Graphic Shader System and Method") filed on August 11, 2005 (patent attorney schedule number MNTL- 105-PR)), which is incorporated herein by reference.
本発明は、参考文献として本明細書に取り込まれた、共有の米国特許第6,496,190号明細書に記載された、「フェノメノン」と称されるコンピュータグラフィックエンティティに対する改良を提供する。従って、下記の第I節においては、米国特許第6,496,190号明細書に記載されたコンピュータグラフィック「フェノメノン」の種々の形態を検討し、次に、4つの項に分割された第II節において、フェノメノンエンティティに対する本改良を検討する。 The present invention provides an improvement to the computer graphic entity called “phenomenon” described in commonly owned US Pat. No. 6,496,190, incorporated herein by reference. Thus, in Section I below, various forms of the computer graphic “phenomenon” described in US Pat. No. 6,496,190 are discussed, and then divided into four sections. In section we consider this improvement to the Phenomenon entity.
第I節 コンピュータグラフィック「フェノーミナ」
米国特許第6,496,190号明細書は、シェイダーDAGにおけるシェイダーが、レンダリングの間に正しく協働できることを保証するような方法で生成された、1つまたは2つ以上のシェイダーをそれぞれ含むことができる、パッケージ化およびカプセル化されたシェイダーDAGの生成を容易にすることで、シェイダー間の強化された協働を提供する、新しいコンピュータグラフィックシステムおよび方法を記載している。
Section I Computer Graphic “Phenomena”
U.S. Pat. No. 6,496,190 includes one or more shaders each generated in such a way as to ensure that the shaders in the shader DAG can work together correctly during rendering. A new computer graphics system and method is described that provides enhanced collaboration between shaders by facilitating the generation of packaged and encapsulated shader DAGs.
要約すると、「フェノメノン」と称されるエンティティの新しいタイプが作成でき、インスタンス化でき、シーンのイメージのレンダリングに使用できる、コンピュータグラフィックシステムが提供される。フェノメノンは、それぞれがシェイダーを備える1つまたは2つ以上のノードを備えるカプセル化されたシェイダーDAG、または、協働するように相互接続され、インスタンス化されて、シーンにおける、シーン定義処理の間に作成されて、シーンにおけるオブジェクトの表面のカラーおよびテクスチャの特徴、シーンにおけるボリュームおよび幾何学的図形の特性、シーンを照明する光源の特徴、レンダリング中にシミュレートされるシミュレートされたカメラの特徴、およびレンダリングに有効な他の多数の特徴を含む、シーンの多様なタイプの特徴を定義するエンティティに付加されるそのようなDAGのカプセル化されたセットである。 In summary, a new type of entity called “phenomenon” can be created, instantiated, and used to render an image of a scene. Phenomenon can be an encapsulated shader DAG with one or more nodes, each with a shader, or interconnected and instantiated to cooperate during the scene definition process Created, surface color and texture features of objects in the scene, characteristics of volume and geometric shapes in the scene, features of light sources that illuminate the scene, simulated camera features that are simulated during rendering, And an encapsulated set of such DAGs attached to entities that define various types of features of the scene, including numerous other features useful for rendering.
オペレータにより使用のために選択された、シーンと関連するフェノーミナは、前もって定義してもよく、または、オペレータがフェノメノンクリエータを使用して、基本シェイダーノードから構築してもよい。フェノメノンクリエータは、DAGまたは協働するDAGにおけるシェイダーが、シーンのイメージのレンダリング中に正確に協働できるようにフェノーミナが構築されることを保証する。 The phenomenon associated with the scene selected for use by the operator may be defined in advance, or the operator may be constructed from the basic shader node using the Phenomenon creator. The Phenomenon Creator ensures that the Phenomena is constructed so that shaders in the DAG or cooperating DAGs can collaborate accurately during the rendering of the scene image.
シーンに付加される前に、フェノメノンは、フェノメノンエディタを使用して、フェノメノンのパラメータのそれぞれに対して、値を定義するために使用される値、または関数を提供することによりインスタンス化される。
シーンの表現が定義され、フェノーミナが付加された後、シーンイメージジェネレータは、シーンのイメージを生成できる。その操作において、シーンイメージジェネレータは、前処理フェーズ、レンダリングフェーズ、および後処理フェーズを含む、一連のフェーズにおいて作動する。前処理フェーズにおいては、シーンイメージジェネレータは、シャドウ(shadow)およびフォトンマッピング(photon mapping)、多重継承分析(multiple inheritance resolution)などの前処理操作を実行できる。シーンイメージジェネレータは、例えば、シーンに付加されたフェノメノンが、シーンに対して、それにより定義される幾何学的図形を生成する幾何学シェイダーを含む場合は、前処理操作を実行できる。レンダリングフェーズの間、シーンイメージジェネレータはイメージのレンダリングを行なう。後処理フェーズの間、シーンイメージジェネレータは、例えば、シーンに付加されたフェノメノンが、レンダリングされるイメージにおける各ピクセル値と関連して格納されている速度および深度情報に依存する被写界深度または動きによるブレの計算のような、後処理操作を定義するシェイダーを含むならば、後処理操作を実行できる。
Prior to being added to the scene, the Phenomenon is instantiated using the Phenomenon Editor by providing a value, or function, used to define a value for each of the Phenomenon parameters.
After the scene representation is defined and the phenomina is added, the scene image generator can generate an image of the scene. In that operation, the scene image generator operates in a series of phases including a pre-processing phase, a rendering phase, and a post-processing phase. In the preprocessing phase, the scene image generator can perform preprocessing operations such as shadow and photon mapping, multiple inheritance resolution, and the like. The scene image generator can perform a pre-processing operation, for example, if the phenomenon added to the scene includes a geometric shader that generates a geometric shape defined thereby for the scene. During the rendering phase, the scene image generator renders the image. During the post-processing phase, the scene image generator, for example, has a depth of field or motion where the phenomenon added to the scene depends on the speed and depth information stored in association with each pixel value in the rendered image. A post-processing operation can be performed if it includes a shader that defines a post-processing operation, such as the blur calculation by.
図1は、本発明に従って構築されるコンピュータグラフィックシステム10を備える構成要素を示している。コンピュータグラフィックシステム10は、レンダリングで使用されるシーンの特徴を定義するために使用される、ここでは「フェノメノン(単数)」または「フェノーミナ(複数)」と称される、新しいコンピュータグラフィック構成要素の生成を容易にすることにより、シェイダー間の強化された協働を提供する。フェノメノンは、1つまたは2つ以上のシェイダーを備えるパッケージ化およびカプセル化されたシステムであり、シェイダーは、1つまたは2つ以上のシェイダーを含む各DAGと、1つまたは2つ以上の有向非循環グラフ(「DAG」)の形式で組織化および相互接続される。コンピュータグラフィックシステム10により生成されたフェノーミナは、各シェイダーDAGにおけるシェイダー(または複数のシェイダー)が、現実的なまたは複雑な視覚効果のレンダリングを容易にするために、レンダリング中に正しく協働できることを保証するような方法で生成されている。更に、複数の協働するシェイダーDAGを備えるフェノーミナに対して、コンピュータグラフィックシステム10は、シェイダーDAGすべてにおけるシェイダーが、進行する現実的なまたは複雑な視覚効果のレンダリングを容易にするために、レンダリング中に正しく協働できるようにフェノーミナを生成する。 FIG. 1 illustrates components comprising a computer graphics system 10 constructed in accordance with the present invention. The computer graphics system 10 is used to define the features of the scene used in the rendering, creating a new computer graphics component, referred to herein as “Phenomenon” or “Phenomena” By providing enhanced collaboration between shaders. Phenomenon is a packaged and encapsulated system with one or more shaders, which are each DAG containing one or more shaders, and one or more directed Organized and interconnected in the form of an acyclic graph (“DAG”). Phenomina generated by computer graphics system 10 ensures that shaders (or multiple shaders) in each shader DAG can work together correctly during rendering to facilitate the rendering of realistic or complex visual effects. It is generated in such a way. Furthermore, for Phenomena with multiple cooperating shader DAGs, the computer graphics system 10 is rendering in order to facilitate the rendering of realistic or complex visual effects that the shaders in all shader DAGs will progress. The phenomina is generated so that it can cooperate correctly.
図1を参照すると、1つの実施形態におけるコンピュータグラフィックシステム10は、プロセッサモジュール11と、キーボード12Aおよび/またはマウス12B(一般的には、オペレータ入力要素12と特定される)のようなオペレータ入力構成要素を備えるオペレータインタフェース要素と、ビデオディスプレイ装置13のようなオペレータ出力要素を含むコンピュータを含む。例示されているコンピュータシステム10は、従来のプログラム格納コンピュータアーキテクチャのタイプである。プロセッサモジュール11は、例えば、プロセッサ、メモリ、および、そこに提供されるデジタルデータと連係しての処理および格納操作を行なうディスクおよび/またはテープ格納要素(分離しては示していない)のような大容量格納装置を含む。オペレータ入力要素12は、オペレータが処理のための情報を入力するために設けられる。ビデオディスプレイ装置13は、プロセッサモジュール11により生成された出力情報を、オペレータのためにスクリーン14上に表示するために設けられ、オペレータが処理のために入力するデータ、処理を制御するためにオペレータが入力する情報が、処理中に生成された情報と共に含まれる。プロセッサモジュール11は、いわゆる「グラフィカルユーザーインタフェース(「GUI」)」を使用して、ビデオディスプレイ装置13による表示のための情報を生成し、種々のアプリケーションプログラムに対する情報が、種々の「ウィンドウ」を使用して表示される。コンピュータシステム10は、オペレータから入力情報を受け取るためのキーボード12Aおよびマウス12Bと、オペレータへの出力情報を表示するためのビデオディスプレイ装置13のような特別な構成要素を備えるように示されているが、コンピュータシステム10は、図1に示された構成要素に加えて、あるいはその代わりに種々の構成要素を含んでもよい。 Referring to FIG. 1, a computer graphics system 10 in one embodiment includes a processor module 11 and an operator input configuration such as a keyboard 12A and / or mouse 12B (generally identified as an operator input element 12). An operator interface element comprising elements and a computer including an operator output element such as a video display device 13. The illustrated computer system 10 is a type of conventional program storage computer architecture. The processor module 11 is, for example, a processor, memory, and disk and / or tape storage element (not shown separately) that performs processing and storage operations in conjunction with digital data provided thereto. Includes mass storage. The operator input element 12 is provided for an operator to input information for processing. The video display device 13 is provided for displaying output information generated by the processor module 11 on the screen 14 for the operator, and the operator inputs data for processing, and the operator controls the processing. The information to be entered is included along with the information generated during processing. The processor module 11 uses a so-called “graphical user interface (“ GUI ”)” to generate information for display by the video display device 13 and information for various application programs uses various “windows”. Is displayed. The computer system 10 is shown to include special components such as a keyboard 12A and mouse 12B for receiving input information from an operator, and a video display device 13 for displaying output information to the operator. The computer system 10 may include various components in addition to or instead of the components shown in FIG.
更に、プロセッサモジュール11は、一般的に参照番号14で特定され、コンピュータシステム10をコンピュータネットワーク内で接続する通信リンクに接続された1つまたは2つ以上のネットワークポートを含んでもよい。ネットワークポートにより、コンピュータシステム10は、ネットワーク内の他のコンピュータシステムおよび他の装置へ情報を送信、およびそれらから情報を受信できるようになる。例えば、クライアント−サーバーパラダイムにより構成された典型的ネットワークにおいては、ネットワークにおけるあるコンピュータシステムは、サーバーとして指定され、他のクライアントコンピュータシステムによる処理のためにデータおよびプログラム(一般的には「情報」)を格納し、それにより、クライアントコンピュータシステムは便利に情報を共有できる。特別なサーバーにより維持された情報へアクセスする必要のあるクライアントコンピュータシステムは、サーバーがネットワークを介してそこに情報をダウンロードできるようにする。データの処理後は、クライアントコンピュータシステムは、また、処理されたデータを格納のためにサーバーに戻す。コンピュータシステム(上記のサーバーおよびクライアントを含む)に加えて、ネットワークはまた、例えば、プリンタ、ファクシミリ装置、デジタルオーディオまたはビデオ格納装置および配布装置など、ネットワーク内で接続された種々のコンピュータシステム間で共有できる装置を含んでもよい。ネットワーク内でコンピュータシステムを相互接続する通信リンクは、従来のように、コンピュータシステム間で信号を搬送するためのワイヤ、光ファイバー、または他の媒体を含む、任意の便利な情報搬送媒体を備えてもよい。コンピュータシステムは、通信リンクを介して転送されるメッセージにより、ネットワーク上で情報を転送し、各メッセージは、情報と、そのメッセージを受信する装置を特定する識別子を含む。 In addition, the processor module 11 may include one or more network ports, identified generally by the reference numeral 14, and connected to a communication link that connects the computer system 10 within a computer network. The network port allows the computer system 10 to send information to and receive information from other computer systems and other devices in the network. For example, in a typical network configured with a client-server paradigm, one computer system in the network is designated as a server and data and programs (generally “information”) for processing by other client computer systems. So that client computer systems can conveniently share information. Client computer systems that need access to information maintained by a special server allow the server to download information there over the network. After processing the data, the client computer system also returns the processed data to the server for storage. In addition to computer systems (including the servers and clients described above), the network is also shared among various computer systems connected within the network, such as printers, facsimile machines, digital audio or video storage and distribution devices, for example. A possible device may be included. Communication links interconnecting computer systems within a network may comprise any convenient information carrying medium, including wires, optical fibers, or other media for carrying signals between computer systems, as is conventional. Good. Computer systems transfer information over a network by means of messages transferred over a communication link, each message including information and an identifier that identifies the device that receives the message.
上述したように、コンピュータグラフィックシステム10は、パッケージ化およびカプセル化されたシェイダーDAGまたは協働シェイダーDAGを備えるフェノーミナの生成を容易にすることによりシェイダー間の強化された協働を提供し、各シェイダーDAGは、少なくとも1つのシェイダーを備え、それは三次元シーンの特徴を規定する。フェノーミナはシーンの種々の特徴を規定するために使用でき、それには、シーンにおけるオブジェクトの表面のカラー、テクスチャの特徴、シーンにおけるボリュームおよび幾何学的図形の特性、シーンを照明する光源の特徴、レンダリング中にシミュレートされるシミュレートされたカメラまたは他のイメージ記録装置の特徴、および下記の記述から明白になる、レンダリングにおいて有効な数多くの他の特徴が含まれる。フェノーミナは、シーンのイメージのレンダリング中に、DAGまたは協働DAG内のシェイダーが正確に協働できることを保証するように構築される。 As described above, the computer graphics system 10 provides enhanced cooperation between shaders by facilitating the generation of phenomines with packaged and encapsulated shader DAGs or collaborative shaders DAG, with each shader The DAG comprises at least one shader that defines the characteristics of the 3D scene. Phenomina can be used to define various aspects of the scene, including the surface color of objects in the scene, texture characteristics, volume and geometric characteristics of the scene, the characteristics of the light source that illuminates the scene, rendering Included are features of a simulated camera or other image recording device that are simulated in, and numerous other features useful in rendering that will become apparent from the description below. Phenomina is built to ensure that shaders in a DAG or collaborative DAG can collaborate correctly while rendering an image of the scene.
図2は、本発明の1つの実施形態において使用されるコンピュータグラフィックシステム10の機能ブロック図を示している。図2に示されるように、コンピュータグラフィックシステム10は、2つの一般的な部分、つまり、シーン構造生成部20と、シーンイメージ生成部21を含む。シーン構造生成部20は、アーティスト、製図者など(一般的に、「オペレータ」)により、種々の要素の表現を生成するシーンエンティティ生成フェーズ中に使用され、この表現はシーンのレンダリングにおいてシーンイメージ生成部21により使用され、例えば、シーンにおけるオブジェクトおよびその表面の特性、シーンを照明する光源またはソースの構造と特性、および、イメージのレンダリング中に、イメージを生成する際にシミュレートされるカメラのような特別な装置の構造と特性を含む。シーン構造生成部20により生成された表現は数学的表現であり、シーンオブジェクトデータベース22に格納される。数学的表現は、オペレータへの表示のためにイメージレンダリング部21により評価される。シーン構造生成部20とシーンイメージ生成部21は、同一のコンピュータ上に常駐でき、その一部を形成してもよく、その場合、シーンオブジェクトデータベース22もまた、同じコンピュータ上に常駐してもよく、またはコンピュータ20がクライアントであるサーバー上に常駐してもよい。または、シーン構造生成部20とシーンイメージ生成部21は、異なるコンピュータ上に常駐し、その一部を形成してもよく、その場合は、シーンオブジェクトデータベース22は、コンピュータか両者のコンピュータのサーバーのいずれかに常駐してよい。 FIG. 2 shows a functional block diagram of a computer graphics system 10 used in one embodiment of the present invention. As shown in FIG. 2, the computer graphic system 10 includes two general parts, that is, a scene structure generation unit 20 and a scene image generation unit 21. The scene structure generator 20 is used during the scene entity generation phase by artists, drafters, etc. (generally “operators”) to generate representations of various elements, and this representation is used for scene image generation in scene rendering. Used by the unit 21, for example, the characteristics of the object and its surface in the scene, the structure and characteristics of the light source or source that illuminates the scene, and the camera that is simulated in generating the image during image rendering Including special equipment structure and characteristics. The expression generated by the scene structure generation unit 20 is a mathematical expression and is stored in the scene object database 22. The mathematical representation is evaluated by the image rendering unit 21 for display to the operator. The scene structure generation unit 20 and the scene image generation unit 21 can be resident on the same computer and can form a part thereof. In this case, the scene object database 22 can also be resident on the same computer. Or the computer 20 may reside on a server that is a client. Alternatively, the scene structure generation unit 20 and the scene image generation unit 21 may reside on different computers and may form a part thereof. In this case, the scene object database 22 is stored in a computer or a server of both computers. May be resident in either.
より特別には、シーン構造生成部20は、オペレータにより使用されて、シーンにおけるオブジェクトの幾何学的構造、シーンを照明する光源の幾何学的特性、およびレンダリングされるイメージの生成の際にシミュレートされるカメラの位置、幾何学的および光学的特性を定義する数学的表現を生成する。数学的表現は、好ましくは3つの空間的寸法を定義し、それによりシーンにおけるオブジェクトの位置、およびオブジェクトの特徴を特定する。オブジェクトは、三次元空間に埋め込まれた直線または曲線、三次元空間に埋め込まれた二次元表面、1つまたは2つ以上の区切られたおよび/または閉じた三次元表面、またはそれらの任意の組み合わせを含む、一次、二次、または三次元の特徴で定義されてもよい。更に、数学的表現はまた、オブジェクトおよびそれらの個々の特徴が、時間の関数として動くと考えられるコンピュータアニメーションに関連して特に有効である時間的な寸法を定義する。 More specifically, the scene structure generator 20 is used by the operator to simulate the object's geometric structure in the scene, the geometric properties of the light source that illuminates the scene, and the generation of the rendered image. Generate a mathematical representation that defines the position, geometric and optical properties of the camera to be played. The mathematical representation preferably defines three spatial dimensions, thereby specifying the position of the object in the scene and the characteristics of the object. An object can be a straight line or curve embedded in three-dimensional space, a two-dimensional surface embedded in three-dimensional space, one or more delimited and / or closed three-dimensional surfaces, or any combination thereof May be defined with primary, secondary, or three-dimensional features. In addition, the mathematical representation also defines temporal dimensions that are particularly useful in connection with computer animation where objects and their individual features are considered to move as a function of time.
レンダリングされる、シーンにおけるオブジェクトの幾何学的構造の数学的表現に加えて、数学的表現は、更に、シーンとカメラを照明する1つまたは2つ以上の光源を定義する。光源の数学的表現は、特に、シーンに関しての光源の位置および/または方向、光源が点光か、直線または曲線か、平坦か曲面かなどを含む、光源の構造的特徴を定義する。カメラの数学的表現は、特に、レンズが1つか複数か、焦点距離、撮像面の向きなどを含む、従来のカメラパラメータを定義する。 In addition to the mathematical representation of the object's geometric structure in the scene being rendered, the mathematical representation further defines one or more light sources that illuminate the scene and the camera. The mathematical representation of the light source defines, among other things, the structural features of the light source, including the location and / or orientation of the light source with respect to the scene, whether the light source is point light, straight or curved, flat or curved. The mathematical representation of the camera defines conventional camera parameters including, among others, one or more lenses, focal length, orientation of the imaging surface, and the like.
シーン構造生成部20はまた、下記に詳細を記載するフェノーミナの生成、およびシーンの個々の要素に関してのフェノーミナの関連付けを容易にする。フェノーミナは、概ね、レンダリングに使用されるシーンの定義の完成に必要な他の情報を定義する。この情報には、それに制限されることはないが、カラー、テクスチャなどの特性、シーン構造生成部20により定義された幾何学的エンティティの表面の特性が含まれる。フェノメノンは、数学的表現または他のオブジェクトを含んでもよく、それらは、レンダリング操作の間に評価される時、レンダリングされたイメージを生成するコンピュータが、所望の方法で個々の表面を表示することを可能にする。オペレータの制御のもとで、シーン構造生成部20は、フェノーミナを、それと共に使用される個々の要素(つまり、オブジェクト、表面、ボリュームなど)に対する数学的表現と関連付け、フェノーミナを個々の要素に効率よく「付加する」。 The scene structure generator 20 also facilitates the generation of phenomena described in detail below and the association of the phenomenon with respect to individual elements of the scene. Phenomina generally defines other information necessary to complete the definition of the scene used for rendering. This information includes, but is not limited to, characteristics such as color and texture, and characteristics of the surface of the geometric entity defined by the scene structure generation unit 20. Phenomenon may include mathematical representations or other objects that, when evaluated during a rendering operation, allow the computer that produces the rendered image to display individual surfaces in the desired manner. enable. Under the control of the operator, the scene structure generator 20 associates the phenomina with a mathematical representation for the individual element (ie, object, surface, volume, etc.) used with it, and efficiently converts the phenomina to the individual element. "Add" well.
数学的表現がシーン構造生成部20により生成され、シーン表現データベース22に格納された後、シーンイメージ生成部21が、オペレータによりレンダリングフェーズの間に使用されて、例えば、ビデオディスプレイ装置13(図1)上のシーンのイメージを生成する。
シーン構造生成部20は、いくつかの要素を含み、エンティティ幾何学的表現ジェネレータ23、フェノメノンクリエータ24、フェノメノンデータベース25、フェノメノンエディタ26、基本シェイダーノードデータベース32、フェノメノンインスタンスデータベース33、およびシーンアセンブラ34を含み、これらはすべてオペレータインタフェース27を介して入力されたオペレータ入力情報の制御のもとで作動する。オペレータインタフェース27は、一般的に、図1と関連して上記したように、コンピュータグラフィックシステム10のオペレータ入力装置12及びビデオディスプレイ装置13を含んでもよい。エンティティ幾何学的表現ジェネレータ23は、オペレータインタフェース27からのオペレータ入力の制御のもとで、上記のように、シーンにおけるオブジェクト,光源及びカメラの数学的表現の生成を容易にする。フェノメノンクリエータ24は、それによりオペレータがオペレータインタフェース27と基本シェイダーノードデータベース32からの基本シェイダーノードを使用して、シーンと関連して、あるいは他の方法で(下記に記載するように)使用できるフェノーミナを生成できる機構を提供する。フェノメノンが、フェノメノンクリエータ24により生成された後、それは(つまり、フェノメノンは)フェノメノンデータベース25に格納される。フェノメノンがフェノメノンデータベース25に格納された後は、フェノメノンのインスタンスをフェノメノンエディタ26により作成できる。その操作において、オペレータはフェノメノンエディタ26を使用して、フェノメノンの種々のパラメータ(もしあれば)に対して値を提供する。例えば、オペレータからの入力に基づいて、付加するとき、またはそれ以降に、確立、調整、または修正されるフェノメノンがカラーバランス、テクスチャの粗さ、光沢のような特徴を提供するように作成されると、フェノメノンエディタ26により、オペレータはオペレータインタフェース27を介して、特別な特徴の確立、調整、または修正が可能となる。パラメータに対する値は、固定または、変数(例として、時間)の関数に従って変化してもよい。オペレータは、シーンアセンブラ34を使用して、フェノメノンエディタ26を使用して生成されたフェノメノンインスタンスを、エンティティ幾何学的表現ジェネレータ23により生成されたように、シーンの要素に付加できる。
After the mathematical representation is generated by the scene structure generator 20 and stored in the scene representation database 22, the scene image generator 21 is used by the operator during the rendering phase, for example, the video display device 13 (FIG. 1). ) Generate an image of the above scene.
The scene structure generation unit 20 includes several elements, and includes an entity geometric expression generator 23, a phenomenon creator 24, a phenomenon database 25, a phenomenon editor 26, a basic shader node database 32, a phenomenon instance database 33, and a scene assembler 34. All of which operate under the control of operator input information entered via the operator interface 27. The operator interface 27 may generally include the operator input device 12 and the video display device 13 of the computer graphics system 10 as described above in connection with FIG. The entity geometric representation generator 23 facilitates the generation of mathematical representations of objects, light sources and cameras in the scene as described above under the control of operator input from the operator interface 27. Phenomenon Creator 24 allows the operator to use Phenomena in conjunction with the scene or otherwise (as described below) using the operator interface 27 and basic shader nodes from the basic shader node database 32. Provides a mechanism that can generate After the Phenomenon is generated by Phenomenon Creator 24, it is stored in the Phenomenon database 25 (ie, Phenomenon). After the phenomenon is stored in the phenomenon database 25, an instance of phenomenon can be created by the phenomenon editor 26. In that operation, the operator uses the Phenomenon Editor 26 to provide values for various Phenomenon parameters (if any). For example, based on input from an operator, a phenomenon that is established, adjusted, or modified when added or later is created to provide features such as color balance, texture roughness, and gloss. The Phenomenon Editor 26 allows the operator to establish, adjust or modify special features via the operator interface 27. The value for the parameter may be fixed or change according to a function of a variable (eg, time). An operator can use the scene assembler 34 to add a phenomenon instance generated using the phenomenon editor 26 to elements of the scene as generated by the entity geometric representation generator 23.
フェノメノンエディタ26が、フェノメノンデータベース25から、コンピュータグラフィックシステム10のシーン構造生成部20のフェノメノンクリエータ24により生成されたフェノメノンを検索するように記載したが、コンピュータグラフィックシステム10において提供されたフェノーミナの1つまたは2つ以上、そしておそらくそのすべてを、他の装置(図示せず)により予め定義して作成し、フェノメノンエディタ26による使用のために、フェノメノンデータベース25に格納してもよい。そのような場合は、オペレータは、オペレータインタフェース27を介してフェノメノンエディタを制御して、シーンへの付加のために適切な、予め規定されたフェノーミナを選択できる。 Although the phenomenon editor 26 has been described to retrieve the phenomenon generated by the phenomenon creator 24 of the scene structure generation unit 20 of the computer graphics system 10 from the phenomenon database 25, one of the phenomena provided in the computer graphics system 10 is described. Alternatively, two or more, and possibly all, may be pre-defined and created by other devices (not shown) and stored in the Phenomenon database 25 for use by the Phenomenon Editor 26. In such a case, the operator can control the Phenomenon editor via the operator interface 27 to select a pre-defined phenomenon suitable for addition to the scene.
シーンイメージ生成部21は、イメージジェネレータ30とオペレータインタフェース31とを含むいくつかの構成要素を含む。シーンイメージ生成部21が、シーン構造生成部20と同じコンピュータの一部を形成する場合、オペレータインタフェース31は、その必要はないが、オペレータインタフェース27と同じ構成要素を含んでもよい。他方、シーンイメージ生成部21が、異なるコンピュータの一部を形成する場合は、その2つのオペレータインタフェース31と27の構成要素は類似しているが、オペレータインタフェース31は、オペレータインタフェース27として異なる構成要素を一般的に備える。イメージジェネレータ30は、オペレータインタフェース31の制御のもとで、レンダリングされるシーンの表現をシーン表現データベース22から検索して、オペレータインタフェース31のビデオディスプレイ装置上の表示のためのレンダリングされたイメージを生成する。 The scene image generation unit 21 includes several components including an image generator 30 and an operator interface 31. When the scene image generation unit 21 forms part of the same computer as the scene structure generation unit 20, the operator interface 31 may include the same components as the operator interface 27 although it is not necessary. On the other hand, when the scene image generation unit 21 forms part of a different computer, the components of the two operator interfaces 31 and 27 are similar, but the operator interface 31 is a different component as the operator interface 27. Is generally provided. The image generator 30 retrieves a scene representation to be rendered from the scene representation database 22 under the control of the operator interface 31 and generates a rendered image for display on the video display device of the operator interface 31. To do.
先に進む前に、本発明において使用される「フェノメノン」を更に説明することは有益であろう。フェノメノンは、エンティティ幾何学的表現ジェネレータ23により生成された数学的表現に加えて、それに制限されることはないが、シーン構造生成部20により定義された幾何学的エンティティの表面のカラー、テクスチャ、閉じたボリュームなどの特徴を含むレンダリングに使用されるシーンの定義を完全なものにするために使用される情報を提供する。フェノメノンは、有向非循環グラフ(DAG)または複数の協働DAGの形式で相互接続された1つまたは2つ以上のノードを備える。ノードの1つは主要ルートノードであり、シーンにおけるエンティティへ、より具体的には、エンティティの数学的表現にフェノメノンを付加するために使用される。フェノメノンにおいて使用できる他のタイプのノードは、オプションのルートノードおよびシェイダーノードからなる。シェイダーノードは、従来の単純なシェイダーを含めて、従来の複数のシェイダーの任意のものを備えることができ、同時に、テクスチャシェイダー、マテリアルシェイダー、ボリュームシェイダー、環境シェイダー、シャドウシェイダー、変位シェイダー、およびレンダリングされる表現の生成と関連して使用されるマテリアルシェイダーを備えることができる。更に、フェノメノンには、多数の他のタイプのシェイダーノードを使用することが可能で、それらには次のものが含まれる。(i)シーンに幾何学的オブジェクトを追加するのに使用可能な幾何学的シェイダー。幾何学的シェイダーは、本質的に、三次元空間における、前もって定義された静的な、または手順化可能なエンティティの数学的表現を備え、それは、シーンにおいてエンティティと関連してエンティティ幾何学的表現ジェネレータ23により生成される表現と類似しているが、それらが前処理時に、例えば、個々のフェノメノンにおいて使用された他のシェイダーの限界が定められる個々の領域を定義するために提供できることが異なる。幾何学的シェイダーは、本質的に、エンティティ幾何学的表現ジェネレータ23のエンティティのシーン構築要素へのアクセスを有しており、それにより、それは、例えば、静的または手順化可能な方法で、シーンの新しい幾何学的要素を修正または作成するために、シーンオブジェクトデータベースに格納されるときに、シーン表現を変更できる。その全体が幾何学的シェイダーDAGまたは協働幾何学的シェイダーDAGのセットから構成されているフェノメノンは、手順化可能な方法でシーンにおけるオブジェクトを表現するために使用できるとういうことに留意されたい。これは、人間のオペレータにより、コンピュータにおけるオブジェクトの所望する表現を得るために、一連のモデル化操作を行なうことによるモデル化において達成される、典型的モデル化とは対照的である。そのため、本質的には、幾何学的フェノメノンは、カプセル化され、自動化され、パラメータ化された抽象的モデル化操作を表現する。幾何学的フェノメノンのインスタンス(つまり、固定の、または、時間などと共に所定の方法で変化するパラメータ値のセットに関連する幾何学的フェノメノン)は、それが、前処理フェーズの間の起動時にシーンイメージジェネレータ30により評価されるときに、特別な幾何学的シーンの拡張という結果になる。(ii)シーンにおけるフォトンの経路と、吸収、反射などの、シーンにおけるオブジェクトの表面とのフォトンの相互作用の特徴を制御するために使用できるフォトンシェイダー。フォトンシェイダーにより、レンダリングに関連する全体的な照明と火線の物理的補正シミュレーションを容易にする。1つの実施形態において、フォトンシェイダーは、前処理操作の間に、シーンイメージジェネレータ30により、レンダリング中に使用される。(iii)フォトンシェイダーと類似しているが、オブジェクトの表面上の代わりに、シーンの空間の三次元体積と関連して作動することが異なる、フォトンボリュームシェイダー。これにより、ボリュームにまで拡張され、空気中の埃または霧粒子、または雲などの中の水蒸気によるフォトンの散乱のような、閉じた介在媒体を伴う、火線と全体照明のシミュレーションが可能になる。(iv)フォトンシェイダーに類似しているが、それらが光源に関連し、そのためフォトンの放射に関連しているところが異なる、フォトンエミッタシェイダー。フォトンエミッタシェイダーに関連して放射がシミュレートされるシミュレートされたフォトンは、シミュレートされたフォトンの経路および表面相互作用の特徴をシミュレートするために使用できるフォトンシェイダーと、特に個々の経路に沿って、三次元ボリュームにおける経路および他の特徴をシミュレートするために使用できるフォトンボリュームシェイダーと関連して処理してもよい。(v)レンダリング中に輪郭線の生成と関連して使用される、輪郭シェイダー。1つの実施形態においては、輪郭シェイダーの3つのサブタイプがあり、それは、輪郭格納シェイダーと、輪郭コントラストシェイダーと、輪郭生成シェイダーである。輪郭格納シェイダーは、例えば、表面に対する輪郭サンプリング情報を収集するために使用される。輪郭コントラストシェイダーは、輪郭格納シェイダーの使用により収集されたサンプリング情報の2つのセットを比較するために使用される。最後に、輪郭生成シェイダーは、バッファーへの格納のための生成輪郭ドット情報に使用され、それは輪郭線の生成の際に出力シェイダー(下記に記載)により使用される。(vi)レンダリング中に、シーンイメージジェネレータ30により生成された、バッファー内の情報を処理するために使用される、出力シェイダー。出力シェイダーは、レンダリング中に生成されたピクセル情報にアクセスでき、1つの実施形態においては、構成操作、複雑変動、および上述したように、輪郭生成シェイダーにより生成された輪郭ドット情報からの輪郭線描画を行なう。(vii)シーンにおいて空の三次元空間の一部またはその全体を、光または他の可視光線などがどのように通過するかを制御するために使用される、三次元ボリュームシェイダー。三次元ボリュームシェイダーは、例えば、霧を含むボリューム効果、および煙、炎、毛、および粒子性雲のような手順化可能効果の多くの中からのいずれに対しても使用できる。更に、三次元ボリュームシェイダーは、光との関連において使用されるので、それらは、手順化可能効果に起因するシャドウとの関連においてもまた有効である。(viii)例えば、カラー、方向、および減衰の特徴であって、個々の光源の形状、テクスチャの突起、シャドウイング(shadowing)および他の光の特質のような特質に起因する特徴を含む、光源の放射特徴を制御するために使用される、。 Before proceeding, it would be beneficial to further describe the “phenomenon” used in the present invention. Phenomenon is not limited to the mathematical representation generated by the entity geometric representation generator 23, but is limited thereto, but the surface color, texture, Provides information used to complete the definition of the scene used for rendering, including features such as closed volume. Phenomenon comprises one or more nodes interconnected in the form of a directed acyclic graph (DAG) or multiple collaborative DAGs. One of the nodes is the main root node and is used to add a phenomenon to an entity in the scene, and more specifically to the mathematical representation of the entity. Other types of nodes that can be used in Phenomenon consist of optional root nodes and shader nodes. Shader nodes can include any of several traditional shaders, including traditional simple shaders, and at the same time texture shaders, material shaders, volume shaders, environment shaders, shadow shaders, displacement shaders, and rendering A material shader can be provided that is used in connection with generating the rendered representation. In addition, Phenomenon can use many other types of shader nodes, including: (I) A geometric shader that can be used to add geometric objects to the scene. A geometric shader essentially comprises a mathematical representation of a predefined static or procedural entity in three-dimensional space, which is associated with the entity in the scene. Similar to the representation generated by the generator 23, except that they can be provided during preprocessing, for example to define individual regions where other shader limits used in individual Phenomenon are defined. The geometric shader essentially has access to the entity's scene building elements of the entity geometric representation generator 23 so that it can, for example, in a static or procedural manner, The scene representation can be changed when stored in the scene object database to modify or create new geometric elements. Note that Phenomenon, composed entirely of a geometric shader DAG or a set of collaborative geometric shaders DAG, can be used to represent objects in the scene in a procedural manner. This is in contrast to typical modeling, which is achieved in modeling by performing a series of modeling operations to obtain a desired representation of an object in a computer by a human operator. Thus, in essence, geometric Phenomenon represents an abstract modeling operation that is encapsulated, automated, and parameterized. An instance of a geometric Phenomenon (ie, a geometric Phenomenon that is related to a set of parameter values that are fixed or change in a predetermined manner over time, etc.) is the scene image at startup during the preprocessing phase When evaluated by the generator 30, this results in a special geometric scene extension. (Ii) A photon shader that can be used to control the characteristics of photon interactions with the surface of an object in the scene, such as absorption and reflection, of photon paths in the scene. The photon shader facilitates physical correction simulation of the overall lighting and fire rays associated with rendering. In one embodiment, the photon shader is used during rendering by the scene image generator 30 during the pre-processing operation. (Iii) A photon volume shader that is similar to a photon shader but differs in that it operates in relation to the three-dimensional volume of the space of the scene instead of on the surface of the object. This extends to volume and allows simulation of fire and global illumination with closed intervening media such as scattering of photons by dust or fog particles in the air, or water vapor in clouds or the like. (Iv) Photon emitter shaders that are similar to photon shaders, but differ in that they are related to the light source and thus related to the emission of photons. Simulated photons whose radiation is simulated in relation to photon emitter shaders are photon shaders that can be used to simulate simulated photon paths and surface interaction characteristics, and in particular for individual paths. Along with the photon volume shader that can be used to simulate paths and other features in the three-dimensional volume. (V) A contour shader used in conjunction with contour generation during rendering. In one embodiment, there are three subtypes of contour shaders: contour store shaders, contour contrast shaders, and contour generation shaders. A contour storage shader is used, for example, to collect contour sampling information for a surface. The contour contrast shader is used to compare two sets of sampling information collected through the use of a contour store shader. Finally, the contour generation shader is used for generated contour dot information for storage in the buffer, which is used by the output shader (described below) in generating the contour line. (Vi) An output shader used to process information in the buffer generated by the scene image generator 30 during rendering. The output shader can access the pixel information generated during rendering, and in one embodiment, the contour drawing from the configuration operations, complex variations, and the contour dot information generated by the contour generation shader, as described above. To do. (Vii) A three-dimensional volume shader used to control how light or other visible light passes through part or all of the empty three-dimensional space in the scene. Three-dimensional volume shaders can be used for any of a number of procedural effects such as, for example, volume effects including fog and smoke, flame, hair, and particulate clouds. Furthermore, since 3D volume shaders are used in the context of light, they are also effective in the context of shadows due to procedural effects. (Viii) light sources, including, for example, color, orientation, and attenuation characteristics due to characteristics such as individual light source shapes, texture protrusions, shadowing and other light characteristics Used to control the radiation characteristics of.
シーンの定義に関連して有効であるシェイダーの他のタイプもまたフェノメノンにおいて使用できる。
フェノメノンは下記により定義される。(i)フェノメノンの外部制御可能なパラメータの記述、(ii)1つの主要ルートノードおよび、随意的に、1つまたは2つ以上のオプショナルルートノード、(iii)ノードとして使用されるシェイダーと、それがどのようにしてDAGまたは複数の協働DAGを形成するように相互接続されるかの特定を含む、フェノメノンの内部構造の記述、(iv)随意的に、フェノメノンエディタ26による使用のために、フェノメノンにより定義されて、オペレータが、個々のフェノメノンの評価に使用されるパラメータまたは特質の値を提供できるようになる、ダイアログボックスなどの記述。更に、フェノメノンは、プログラミングでは標準である、外部宣言文およびライブラリからの、リンクで実行可能なコードを含むことができる。
Other types of shaders that are valid in connection with the definition of the scene can also be used in Phenomenon.
Phenomenon is defined by: (I) a description of Phenomenon's externally controllable parameters; (ii) one primary root node and optionally one or more optional root nodes; (iii) a shader used as a node; A description of the internal structure of the Phenomenon, including specifying how it is interconnected to form a DAG or multiple cooperating DAGs; (iv) optionally for use by the Phenomenon Editor 26, A description, such as a dialog box, defined by Phenomenon that allows an operator to provide values for parameters or attributes that are used to evaluate individual Phenomenon. In addition, Phenomenon can contain code that can be linked and executed from external declaration statements and libraries, which is standard in programming.
上記したように、フェノメノンは、複数の協働DAGを含むことができる。そのようなフェノメノンにおいては、レンダリング中に、フェノメノンにおける第1DAGの1つまたは2つ以上のノードの処理により生成される情報が、フェノメノンにおける第2DAGの1つまたは2つ以上のノードと関連する処理に使用できる。2つのDAGは、それにも拘わらず、独立して処理され、レンダリング処理における異なるステージで処理できる。第2DAGにおけるノードと「協働」できる(つまり、その処理において、第2DAGにおけるノードにより使用できる)第1DAGにおける個々のノードにより生成される情報は、第1DAGにおける個々のノードから、第2DAGにおけるノードへ、そのために割り当てることができるバッファーのような、任意の都合のよい通信チャネルを介して転送できる。単一のフェノメノンにおいて上記の方法で協働する必要のあるすべてのDAGを提供することにより、協働のためのすべての条件が満たされる。この条件は、DAGが別個のフェノメノンまたは他のエンティティにおいてカプセル化されず、また分離もされずに提供される場合には満たされない。 As noted above, Phenomenon can include multiple cooperating DAGs. In such a Phenomenon, during rendering, information generated by processing of one or more nodes of the first DAG in the Phenomenon is associated with one or more nodes of the second DAG in the Phenomenon. Can be used for The two DAGs are nevertheless processed independently and can be processed at different stages in the rendering process. The information generated by the individual nodes in the first DAG that can "cooperate" with the nodes in the second DAG (that is, can be used by the nodes in the second DAG in its processing) from the individual nodes in the first DAG Can be transferred over any convenient communication channel, such as a buffer that can be allocated for it. By providing all DAGs that need to work together in the above manner in a single Phenomenon, all conditions for cooperation are met. This condition is not met if the DAG is not encapsulated in a separate Phenomenon or other entity and provided without separation.
いくつかの協働DAGを含むフェノメノンの例として、フェノメノンは、マテリアルシェイダーDAG,出力シェイダーDAG及びラベルフレームバッファーを生成するための指令を含む、いくつかのDAGを含む。マテリアルシェイダーDAGは、材料に対するカラー値を生成するための少なくとも1つのマテリアルシェイダーを含み、ラベルフレームバッファー生成指令の処理と関連して確立されるラベルフレームバッファーにおけるマテリアルシェイダーDAGの処理の間に遭遇するオブジェクトについてのラベル情報の格納も行なう。出力シェイダーDAGは、その結果として、少なくとも1つの出力シェイダーを含み、出力シェイダーは、ラベルフレームバッファーからラベル情報を検索して、オブジェクト特有な合成操作の実行を容易にする。ラベルフレームバッファー生成指令に加えて、フェノメノンは、両者のDAGが機能して協働できるように、シーンイメージジェネレータ30の操作モードを制御する指令も有することができる。例えば、そのような指令は、評価される2つのDAGに対して要求される最小サンプル密度を制御できる。 As an example of a phenomenon that includes several cooperating DAGs, the phenomenon includes a number of DAGs including instructions for generating a material shader DAG, an output shader DAG, and a label frame buffer. The material shader DAG includes at least one material shader to generate color values for the material and is encountered during the processing of the material shader DAG in the label frame buffer established in connection with the processing of the label frame buffer generation command. It also stores label information about the object. The output shader DAG consequently includes at least one output shader that retrieves label information from the label frame buffer to facilitate the execution of object specific composition operations. In addition to the label frame buffer generation command, Phenomenon can also have a command to control the operation mode of the scene image generator 30 so that both DAGs can function and cooperate. For example, such a directive can control the minimum sample density required for the two DAGs being evaluated.
複数の協働シェイダーDAGを含むフェノメノンの第2の例として、材料フェノメノンは、少なくとも1つのフォトンシェイダーを含むフォトンシェイダーDAGと、少なくとも1つのマテリアルシェイダーを含むマテリアルシェイダーDAGの両者によりシミュレートされる材料を表現できる。レンダリング中、フォトンシェイダーDAGは、火線および全体照明前処理の間に評価され、マテリアルシェイダーDAGは、後のイメージのレンダリングの間に評価される。フォトンシェイダーDAGの処理中に、シミュレートされたフォトンを表現する情報は、それが後のマテリアルシェイダーDAGの領域表現に使用できて、火線または全体照明前処理段階からの照明の貢献を追加するように格納される。1つの実施形態においては,フォトンシェイダーDAGは、フォトンマップにシミュレートされたフォトン情報を格納し、フォトンシェイダーDAGはそれを使用してシミュレートされたフォトン情報をマテリアルシェイダーDAGに送信する。 As a second example of a Phenomenon containing multiple cooperating shaders DAG, the Material Phenomenon is a material simulated by both a Photon shader DAG containing at least one photon shader and a Material shader DAG containing at least one material shader. Can be expressed. During rendering, the photon shader DAG is evaluated during fire and global illumination pre-processing, and the material shader DAG is evaluated during subsequent image rendering. During photon shader DAG processing, the information representing the simulated photon can be used for subsequent material shader DAG region representations to add lighting contributions from the fireline or global lighting pre-processing stage. Stored in In one embodiment, the photon shader DAG stores simulated photon information in a photon map, and the photon shader DAG uses it to send simulated photon information to the material shader DAG.
複数の協働シェイダーDAGを含むフェノメノンの第3の例として、フェノメノンは、少なくとも1つの輪郭シェイダータイプのシェイダーを含む輪郭シェイダーDAGと、少なくとも1つの出力シェイダーを含む出力シェイダーDAGを含むことができる。輪郭シェイダーDAGは、選択されたカラーの「ドット」、透明度、幅、および他の属性を格納することにより、輪郭線をどのように描くかを決定するために使用される。出力シェイダーDAGは、レンダリング中に作成されたすべてのセルの収集に使用され、レンダリングが完了したときに、それらを輪郭線に結合する。輪郭シェイダーDAGは、輪郭格納シェイダーと、輪郭コントラストシェイダーと、輪郭生成シェイダーを含む。輪郭格納シェイダーは、輪郭コントラストシェイダーによる後の使用のためのサンプリング情報を収集するために使用される。輪郭コントラストシェイダーは、その結果、輪郭格納シェイダーにより収集されたサンプリング情報が、輪郭ドットがイメージ内に置かれるようなものかどうかを判定するために使用され、もしそうであれば、輪郭生成シェイダーは実際に輪郭ドットを置く。この例としてのフェノメノンは、(1)サンプリング情報が(輪郭格納シェイダーにより)収集される第1ステージ、(2)輪郭セルを置くかどうかの決定が(輪郭コントラストシェイダーにより)なされる第2ステージ、(3)輪郭ドットが(輪郭生成シェイダーにより)作成される第3ステージ、および、(4)作成された輪郭ドットが(出力シェイダーDAGにより)作成される第4ステージを含む、4つのステージの協働を例示している。 As a third example of a Phenomenon that includes a plurality of cooperating shaders DAG, the Phenomenon may include a contour shader DAG that includes at least one contour shader type shader and an output shader DAG that includes at least one output shader. The contour shader DAG is used to determine how the contour is drawn by storing the “dots”, transparency, width, and other attributes of the selected color. The output shader DAG is used to collect all the cells created during rendering and combines them into a contour line when rendering is complete. The contour shader DAG includes a contour storage shader, a contour contrast shader, and a contour generation shader. The contour store shader is used to collect sampling information for later use by the contour contrast shader. The contour contrast shader is then used to determine if the sampling information collected by the contour storage shader is such that contour dots are placed in the image, and if so, the contour generation shader is Actually put contour dots. The example Phenomenon is (1) a first stage where sampling information is collected (by the contour storage shader), (2) a second stage where the decision whether to place a contour cell is made (by the contour contrast shader), (3) A four-stage collaboration that includes a third stage in which contour dots are created (by the contour generation shader) and (4) a fourth stage in which the created contour dots are created (by the output shader DAG). Illustrates the work.
いずれのステージにおいても、シェイダーは別のステージの別のシェイダーを利用することはなく、異なる時間において、個々に処理され、評価されるが、最終結果の生成を可能にするために協働する。
複数の協働シェイダーDAGを含むフェノメノンの第4の例として、フェノメノンは、ボリュームシェイダーDAGと幾何学的シェイダーDAGを含むことができる。ボリュームシェイダーDAGは、例えば、区切られたボリューム内の毛をシミュレートする毛シェイダーのような、区切られたボリュームの特質を定義する、少なくとも1つのボリュームシェイダーを含む。幾何学的シェイダーDAGは、外部境界表面を、新しい幾何学図形としてレンダリングが始まる前にシーンに含むために使用される少なくとも1つの幾何学的シェイダーを含み、適切な材料およびボリュームシェイダーDAGが外部境界表面に付加されて、元のボリュームシェイダーDAGに関連する毛に関連して実行される計算を定義する。この例示されたフェノメノンにおいて、協働は、幾何学的シェイダーDAGとボリュームシェイダーDAGの間で行なわれ、幾何学的シェイダーDAGは、幾何学的シェイダーDAGがボリュームシェイダーDAGをサポートする手順に従う幾何学図形を導入する。ボリュームシェイダーDAGは、この幾何学図形を利用するが、幾何学図形はレンダリングに先立ち前処理操作の間に幾何学的シェイダーDAGを使用して生成され、一方、ボリュームシェイダーDAGはレンダリング中に使用されるので、ボリュームシェイダーDAGは、幾何学図形それ自身を作成することはできない。この第4の例示的な例と関連して例示された協働は、幾何学的シェイダーを備えるシェイダーまたは複数のシェイダーは、ボリュームシェイダーDAGによる使用される要素を手順に従うように提供するが、第1から第3の例示の例との関連における協働のようにデータを格納することはしないので、第1から第3の例示的な例と関連して例示されたものとは異なる。
In either stage, shaders do not utilize another shader in another stage, but are processed and evaluated individually at different times, but work together to enable the production of the final result.
As a fourth example of a phenomenon that includes multiple cooperating shaders DAG, the phenomenon may include a volume shader DAG and a geometric shader DAG. The volume shader DAG includes at least one volume shader that defines the characteristics of the delimited volume, such as, for example, a hair shader that simulates hair in the delimited volume. The geometric shader DAG includes at least one geometric shader that is used to include the outer boundary surface in the scene before rendering begins as a new geometric shape, with the appropriate material and volume shader DAG Defines the calculations performed on the hair associated with the original volume shader DAG attached to the surface. In this illustrated Phenomenon, the collaboration is between a geometric shader DAG and a volume shader DAG, which is a geometric figure that follows the procedure that the geometric shader DAG supports the volume shader DAG. Is introduced. The volume shader DAG takes advantage of this geometric shape, but the geometric shape is generated using the geometric shader DAG during pre-processing operations prior to rendering, while the volume shader DAG is used during rendering. So the volume shader DAG cannot create the geometric shape itself. The cooperation illustrated in connection with this fourth exemplary example provides that the shader or shaders with geometric shaders provide the elements used by the volume shader DAG to follow the procedure, It does not store data like the collaboration in the context of the first to third example examples, so it differs from that illustrated in connection with the first to third example examples.
これらすべての例は、シーンのイメージが、単一のフェノメノンに束ねられ、カプセル化された複数の協働する、しかし独立しているシェイダーDAGを使用してレンダリングができるというコンピュータグラフィック効果を例示している。
このような背景により、フェノメノンクリエータ24とフェノメノンエディタ26と関連して実行される操作は、図3と図5それぞれに関連して記載される。更に、フェノメノンクリエータ24と関連して作成される例示的なフェノメノンは、図4と関連して記載され、図4と関連して示されるフェノメノンと関連するフェノメノンエディタ26により実行される操作の詳細は、図6Aと図6Bと関連して記載される。図3は、フェノメノンクリエータウィンドウ40を示し、フェノメノンクリエータ24が、オペレータインタフェース27にこのウィンドウをオペレータに表示できるようにし、それによりオペレータは、新しいフェノメノンを定義し、既存のフェノメノンの定義を修正できる。フェノメノンクリエータウィンドウ40は、複数のフレーム、つまり、シェルフフレーム41,サポートされたグラフノードフレーム42,制御フレーム43及びフェノメノングラフキャンバス・フレーム44を含む。シェルフフレーム41は、1つまたは2つ以上のフェノメノンアイコンを含むことができ、それらのアイコンはまとめて参照番号45により特定され、それぞれは、シーン構造生成部20における使用のために少なくとも部分的に定義されたフェノメノンを表現している。サポートされたグラフノードフレーム42は、1つまたは2つ以上のアイコンを含み、それらのアイコンはまとめて参照番号46により特定され、インタフェース、フェノメノンにおいて使用できる種々のタイプのシェイダーなど、オペレータがフェノメノンにおける使用のために選択できるエンティティを表現している。下記に記載されるように、サポートされたグラフノードフレーム42に示されるアイコンは、オペレータが、作成または修正されるフェノメノンを定義する有向非循環グラフのノードを形成するために使用することができる。1つの実施形態においては、多数のタイプのノードがあり以下のものを含む。(i)有向非循環グラフのルートを形成し、シーンへの接続を形成し、典型的にはレンダリング中にカラー値を提供する、主要ルートノード。(ii)フェノメノンDAGにおけるアンカーポイントとして使用でき、主要ルートノード(上記の(i)項)を支援する、いくつかのタイプのオプショナルルートノード。オプショナルルートノードの例示的なタイプとしては以下のものが含まれる。(a)レンズシェイダーまたはレンズシェイダーDAGを、レンダリング中の使用のためにカメラに挿入するために使用できる、レンズルートノード。(b)グローバルボリューム(または雰囲気)シェイダーまたはシェイダーDAGを、レンダリング中の使用のためにカメラに挿入するために使用できる、ボリュームルートノード。(c)グローバル環境シェイダーまたはシェイダーDAGを、レンダリング中の使用のためにカメラに挿入するために使用できる、環境ルートノード。(d)レンダリング中に前処理でき、シーンの手順に従うサポート幾何学図形または他の要素をシーンデータベースに追加可能にする幾何学的シェイダーまたはシェイダーDAGを指定するために使用できる、幾何学ルートノード。(e)輪郭格納シェイダーを、シーンオプションデータ構造に挿入するために使用できる、輪郭格納ルートノード。(f)レンダリングフェーズの後、後工程と関連して使用できる、出力ルートノード。そして、(g)輪郭コントラストシェイダーを、シーンオプションデータ構造に挿入するために使用できる、輪郭コントラストルート。(iii)シェイダー、つまり、CまたはC++のような高級言語で記述される関数を表現する、シェイダーノード。(iv)光源と連係して使用される。光ノードは光源に、光シェイダー、カラー、強度、原点および/または方向、およびオプションとしてフォトンエミッタシェイダーを提供する、光ノード。(v)表面と連係して使用される。材料ノードは表面に、カラー値を提供し、表面が不透明かどうかを示す不透明表示、材料、ボリューム、環境、シャドウ、変位、フォトン、フォトンボリューム、および輪郭シェイダーに対する入力を有する、材料ノード。(vi)フェノメノンのインスタンスである、フェノメノンノード。(vii)他の任意のノードへの入力である、一定値を提供する、一定ノード。一定値は、シェイダーのようなエンティティに対して使用されるプログラミング言語のほとんどのデータタイプであってよく、スカラー、ベクトル、ロジック(ブーリアン(Boolean))、カラー、変換などのような他のノードのいずれによっても表現できる。(viii)フェノメノンエディタ26によりオペレータに表示できるダイアログボックスを表現し、オペレータが使用して、レンダリングの前またはその最中にフェノメノンを制御するための入力情報を提供できる、ダイアログノード。ダイアログノードは、フェノメノンエディタ26がプッシュボタン、スライダ、ホイールなどを表示できるようにして、オペレータが、例えば、ダイアログノードを含むフェノメノンが接続されている表面と関連して使用されるカラーおよび他の値を指定できるようにすることが可能である。図3に示されるように、シェルフフレーム41およびサポートされたグラフノードフレーム42は両者とも、まとめて参照番号47として特定される、左および右矢印を含み、それにより、個々のフレームに示されるアイコンが、左または右へシフトでき(図3に示すように)、一度に表示できる以上のエンティティがある場合は、アイコンをシフトしてフェノメノンクリエータウィンドウ40に表示されるようにできる。
All these examples illustrate the computer graphic effect that an image of a scene can be rendered using a number of cooperating but independent shader DAGs bundled in a single Phenomenon. ing.
With this background, the operations performed in connection with Phenomenon Creator 24 and Phenomenon Editor 26 are described in connection with FIGS. 3 and 5, respectively. Further, an exemplary phenomenon created in connection with the phenomenon creator 24 is described in connection with FIG. 4 and details of operations performed by the phenomenon editor 26 associated with the phenomenon shown in FIG. 6A and 6B will be described. FIG. 3 shows a Phenomenon Creator window 40 that allows the Phenomenon Creator 24 to display this window to the operator on the operator interface 27 so that the operator can define new Phenomenon and modify existing Phenomenon definitions. The Phenomenon Creator window 40 includes a plurality of frames: a shelf frame 41, a supported graph node frame 42, a control frame 43, and a Phenomenon graph canvas frame 44. The shelf frame 41 may include one or more Phenomenon icons, which are collectively identified by reference numeral 45, each at least partially for use in the scene structure generator 20. Expresses the defined phenomenon. The supported graph node frame 42 includes one or more icons, which are collectively identified by the reference number 46 and allow the operator in the Phenomenon, such as various types of shaders that can be used in the interface, Phenomenon. Represents an entity that can be selected for use. As described below, the icons shown in the supported graph node frame 42 can be used by an operator to form a node in a directed acyclic graph that defines the phenomenon to be created or modified. . In one embodiment, there are multiple types of nodes, including: (I) The main root node that forms the root of the directed acyclic graph, forms the connection to the scene, and typically provides color values during rendering. (Ii) Several types of optional root nodes that can be used as anchor points in the Phenomenon DAG and support the main root node (section (i) above). Exemplary types of optional root nodes include the following: (A) A lens root node that can be used to insert a lens shader or lens shader DAG into the camera for use during rendering. (B) A volume root node that can be used to insert a global volume (or atmosphere) shader or shader DAG into the camera for use during rendering. (C) An environment root node that can be used to insert a global environment shader or shader DAG into the camera for use during rendering. (D) A geometric root node that can be preprocessed during rendering and can be used to specify a geometric shader or shader DAG that can be added to the scene database to support geometry or other elements that follow the scene's procedures. (E) A contour storage root node that can be used to insert a contour storage shader into the scene option data structure. (F) An output root node that can be used in conjunction with a post process after the rendering phase. And (g) a contour contrast route that can be used to insert a contour contrast shader into the scene option data structure. (Iii) A shader node that represents a shader, that is, a function written in a high-level language such as C or C ++. (Iv) Used in conjunction with a light source. An optical node that provides a light source with a light shader, color, intensity, origin and / or direction, and optionally a photon emitter shader. (V) Used in conjunction with the surface. The material node provides color values to the surface and has inputs to the opaque display indicating whether the surface is opaque, material, volume, environment, shadow, displacement, photon, photon volume, and contour shader. (Vi) A Phenomenon node that is an instance of Phenomenon. (Vii) A constant node that provides a constant value that is an input to any other node. Constant values can be most data types in programming languages used for entities such as shaders, and can be of other nodes such as scalars, vectors, logic (Boolean), colors, transformations, etc. Any of them can be expressed. (Viii) A dialog node that represents a dialog box that can be displayed to the operator by the Phenomenon Editor 26 and can be used by the operator to provide input information to control the Phenomenon before or during rendering. Dialog nodes allow the Phenomenon Editor 26 to display push buttons, sliders, wheels, etc. so that the operator can use colors and other values used in connection with the surface to which the Phenomenon containing the dialog node is connected, for example. Can be specified. As shown in FIG. 3, the shelf frame 41 and the supported graph node frame 42 both include left and right arrows, collectively identified as reference numeral 47, whereby the icons shown in the individual frames. Can be shifted to the left or right (as shown in FIG. 3), and if there are more entities than can be displayed at once, the icons can be shifted to be displayed in the Phenomenon Creator window 40.
制御フレーム43は、オペレータが、例えば、シェルフフレーム41またはサポートされたグラフノードフレーム42におけるノードを消去または複製、新しいフェノメノンの構築の開始、オンラインヘルプシステムの開始、フェノメノンクリエータ24の終了などの制御操作を行なうために使用できるボタンを表現するアイコン(図示せず)を含む。
フェノメノングラフキャンバス44は、フェノメノンがオペレータにより作成または修正できる領域を提供する。オペレータが既存のフェノメノンを修正したいと所望するときは、オペレータはマウスのようなポインティングデバイスを使って、「ドラッグアンドドロップ」の方法によりアイコン45を選択して、フェノメノンを表現しているシェルフフレーム41から、フェノメノングラフキャンバス44にドラッグできる。修正されるフェノメノンに関連する、選択されたアイコン45がフェノメノングラフキャンバス44にドラッグされた後、オペレータは、アイコン45を、矢印により相互接続され、フェノメノンを定義するグラフを表現している、1つまたは2つ以上のノードを示すように拡張することができる。例示的なフェノメノンを表現しているグラフ50は、図3に示されている。図3に示すように、グラフ50は、複数のグラフノードを含み、円およびブロックを備え、それぞれは、フェノメノンにおいて使用できるエンティティと関連しており、ノードは、矢印により相互接続され、フェノメノンに関連するグラフを定義する。
The control frame 43 allows the operator to perform control operations such as deleting or duplicating nodes in the shelf frame 41 or the supported graph node frame 42, starting construction of a new phenomenon, starting an online help system, ending the phenomenon creator 24, etc. It includes an icon (not shown) representing a button that can be used to perform
The phenomenon graph canvas 44 provides an area where the phenomenon can be created or modified by the operator. When the operator desires to modify the existing phenomenon, the operator selects the icon 45 by a “drag and drop” method using a pointing device such as a mouse, and the shelf frame 41 expressing the phenomenon. To the Phenomenon graph canvas 44. After the selected icon 45 associated with the modified Phenomenon has been dragged onto the Phenomenon graph canvas 44, the operator is connected to the icon 45 by arrows to represent a graph defining the Phenomenon. Or it can be expanded to show more than one node. A graph 50 representing an exemplary phenomenon is shown in FIG. As shown in FIG. 3, the graph 50 includes a plurality of graph nodes, comprising circles and blocks, each associated with an entity that can be used in the Phenomenon, the nodes interconnected by arrows and associated with the Phenomenon. Define the graph to be used.
フェノメノングラフキャンバス44にドラッグされたアイコン45に関連するグラフが拡張されてアイコン45に関連するフェノメノンを定義するグラフを示すようになった後、オペレータは、フェノメノンを定義するグラフを修正できる。その操作において、オペレータは、対応する「ドラッグアンドドロップ」の方法を使用して、アイコン46を選択して、グラフに追加されるエンティティを表現するサポートされるグラフノードフレーム42から、フェノメノングラフキャンバス44へドラッグして、それにより、グラフの新しいノードが確立される。新しいノードが確立された後、オペレータは、適切な方法で、両者のノードをクリックして、その間に矢印が表示されるようにして、それを既存のグラフにおけるノードに相互接続できる。グラフにおけるノードはまた、個々のノードの間に延伸する矢印を削除することにより、他のノードから切離すことも、制御フレーム43にある削除プッシュボタンの適切な起動によりグラフから削除することもできる。 After the graph associated with the icon 45 dragged to the phenomenon graph canvas 44 has been expanded to show the graph defining the phenomenon associated with the icon 45, the operator can modify the graph defining the phenomenon. In that operation, the operator uses the corresponding “drag and drop” method to select an icon 46 from the supported graph node frame 42 representing the entity to be added to the graph, from the phenomenon graph canvas 44. To establish a new node in the graph. After the new node is established, the operator can click on both nodes in an appropriate way, and an arrow will appear between them to interconnect it to the nodes in the existing graph. Nodes in the graph can also be disconnected from other nodes by deleting the arrows that extend between the individual nodes, or removed from the graph by appropriate activation of the delete push button in the control frame 43. .
同様に、オペレータが新しいフェノメノンを作成したいときは、オペレータは、対応する「ドラッグアンドドロップ」の方法を使用して、アイコン46を選択して、グラフに追加されるエンティティを表現するサポートされるグラフノードフレーム42から、フェノメノングラフキャンバス44へドラッグすることにより、作成すべきグラフに対して新しいノードを確立できる。新しいノードがフェノメノングラフキャンバス44に確立された後は、オペレータは、適切な方法で、両者のノードをクリックして、その間に矢印が表示されるようにして、それを既存のグラフにおけるノードに相互接続できる。グラフにおけるノードはまた、個々のノードの間に延伸する矢印を削除することにより、他のノードから切離すことも、制御フレーム43にある削除プッシュボタンの適切な起動によりグラフから削除することもできる。 Similarly, when an operator wants to create a new phenomenon, the operator uses the corresponding “drag and drop” method to select an icon 46 to represent a supported graph that represents the entity being added to the graph. By dragging from the node frame 42 to the Phenomenon graph canvas 44, a new node can be established for the graph to be created. Once a new node has been established on the Phenomenon graph canvas 44, the operator clicks on both nodes in an appropriate manner so that an arrow appears between them, and cross-connects it to the nodes in the existing graph. Can connect. Nodes in the graph can also be disconnected from other nodes by deleting the arrows that extend between the individual nodes, or removed from the graph by appropriate activation of the delete push button in the control frame 43. .
オペレータがフェノメノンのためのDAGまたは協働DAGのセットを指定した後、新しいフェノメノンまたは修正されたフェノメノンのいずれかに対して、グラフにより表現されているフェノメノンがフェノメノンデータベース25に格納される前に、フェノメノンクリエータ24は、それが矛盾のない、レンダリング中に処理できるかどうかを検証するためにフェノメノングラフを調べる。その操作において、フェノメノンクリエータ24は、グラフノード間の相互接続が、循環を形成しないことを確実にし、それにより、フェノメノンに関連するグラフまたは複数のグラフが有向非循環グラフを形成することを確実にし、グラフノード間の相互接続が、矛盾のない個々の入力および出力データタイプを表現していることを確実にする。フェノメノンクリエータ24が、グラフノードは循環を形成すると判定すると、フェノメノンは本質的に、一般的には適切に処理できないエンドレスループを形成する。これらの操作により、そのように作成または修正されたフェノメノンが、フェノメノンが付加されたシーンのイメージがレンダリングされるときに、シーンイメージ生成部により処理できることが保証される。 After the operator specifies a DAG or a set of collaborative DAGs for Phenomenon, before the Phenomenon represented by the graph is stored in the Phenomenon Database 25 for either a new Phenomenon or a modified Phenomenon, The Phenomenon Creator 24 examines the Phenomenon graph to verify that it is consistent and can be processed during rendering. In that operation, the Phenomenon Creator 24 ensures that the interconnection between graph nodes does not form a cycle, thereby ensuring that the graph or graphs associated with the Phenomenon form a directed acyclic graph. And ensure that the interconnections between graph nodes represent consistent input and output data types. If the Phenomenon Creator 24 determines that the graph node forms a cycle, the Phenomenon essentially forms an endless loop that cannot generally be handled properly. These operations ensure that the phenomenon created or modified as described above can be processed by the scene image generator when an image of the scene to which the phenomenon is added is rendered.
オペレータがフェノメノンを作成または修正した後、それはフェノメノンデータベース25に格納される。
図4は、図3に関連して記載したフェノメノンクリエータウィンドウを使用して生成できるフェノメノンクリエータ24に関連して作成されたフェノメノンの例を示す。図4に示されるフェノメノンの例は、参照番号60で特定され、木材料の表面の特徴に対して使用できる1つである。図4を参照すると、フェノメノン60は、参照番号61で特定される1つのルートノードを含み、それはフェノメノン60をシーンの要素に付加するために使用される。グラフにおける他のノードには、マテリアルシェイダーノード62、テクスチャシェイダーノード63、コヒーレントノイズシェイダー・ノード64が含まれ、それぞれマテリアルシェイダー、テクスチャシェイダー、およびコヒーレントノイズシェイダーを表現し、そしてダイアログノード65が含まれる。ダイアログノード65は、フェノメノンエディタ26により表示され、オペレータが、イメージがレンダリングされるときにフェノメノンと共に使用される入力情報を提供できるダイアログボックスを表現する。
After the operator creates or modifies the phenomenon, it is stored in the phenomenon database 25.
FIG. 4 shows an example of a phenomenon created in conjunction with the phenomenon creator 24 that can be generated using the phenomenon creator window described in connection with FIG. The example of Phenomenon shown in FIG. 4 is one identified by reference number 60 and can be used for the surface features of wood material. Referring to FIG. 4, Phenomenon 60 includes one root node identified by reference numeral 61, which is used to add Phenomenon 60 to scene elements. Other nodes in the graph include a material shader node 62, a texture shader node 63, a coherent noise shader node 64, which represent the material shader, texture shader, and coherent noise shader, respectively, and include a dialog node 65. . Dialog node 65 represents a dialog box that is displayed by Phenomenon Editor 26 and that allows an operator to provide input information that is used with Phenomenon when the image is rendered.
マテリアルシェイダー、テクスチャシェイダー、およびコヒーレントノイズシェイダーの詳細は、この技術に精通した者には知られており、ここではこれ以上の記載はしない。一般的に、マテリアルシェイダーは、1つまたは2つ以上の、「結果」により表現される出力を有し、これはルートノード61に提供される。マテリアルシェイダーは、その結果、「光沢度」入力、「周囲」カラー入力、「拡散」カラー入力、「透明度」入力、および「照明」入力を含むいくつかの入力を有し、それにより表現されるマテリアルシェイダーノード62が、それらに対する入力をダイアログノード65(光沢度入力の場合)から、テクスチャシェイダーノード63(周囲および拡散カラー入力の場合)から、ハードワイヤード定数(透明度入力の場合)から、そして照明リスト(照明入力の場合)から受け取るものとして示されている。「0.0」と表示され、透明度入力に提供されるハードワイヤード定数値は、材料が不透明であることを示している。「光沢度」入力は、ダイアログノード65により提供される「光沢度」出力に接続され、ノード62により表現されるマテリアルシェイダーがレンダリング中に処理されるときに、それに対する光沢度入力値を、ダイアログノードにより表現されるダイアログボックスから取得し、この様子は図6Aと図6Bにより、下記に記載する。 Details of material shaders, texture shaders, and coherent noise shaders are known to those skilled in the art and will not be described further here. In general, a material shader has one or more outputs represented by “results”, which are provided to the root node 61. The material shader thus has several inputs including and represented by "glossiness" input, "ambient" color input, "diffuse" color input, "transparency" input, and "lighting" input Material shader node 62 receives input from them from dialog node 65 (for gloss input), texture shader node 63 (for ambient and diffuse color inputs), hardwired constant (for transparency inputs), and lighting Shown as received from the list (in the case of lighting input). The hardwired constant value displayed as “0.0” and provided for the transparency input indicates that the material is opaque. The "Glossiness" input is connected to the "Glossiness" output provided by dialog node 65, and when the material shader represented by node 62 is processed during rendering, the glossiness input value for it is This is obtained from the dialog box represented by the node, and this state is described below with reference to FIGS. 6A and 6B.
ノード62により表現されるマテリアルシェイダーの周囲および拡散入力は、ノード63の「結果」出力の、ノード62の個々の入力への接続により示されているように、テクスチャシェイダーの出力により提供される。木材料フェノメノン60が、レンダリング操作中に処理されるとき、そして特に、ノード62により表現されるマテリアルシェイダーが処理されるときは、処理されるノード63により表現されるテクスチャシェイダーが、周囲および拡散カラー入力値を提供することを可能にする。その結果、テクスチャシェイダーは、ノード63上に示される「カラー1」および「カラー2」入力で表現される周囲および拡散カラー入力と、「混合」入力を含む、3つの入力を有することになる。周囲および拡散カラー入力に対する値は、ダイアログノード65からのそれぞれの拡散および周囲カラー出力から、図4のテクスチャシェイダーノード63への接続により表現されるように、オペレータが、ダイアログノード65により表現されるダイアログボックスを使用することにより提供される。 The perimeter and diffuse input of the material shader represented by node 62 is provided by the output of the texture shader, as shown by the connection of the “result” output of node 63 to the individual inputs of node 62. When the wood material Phenomenon 60 is processed during a rendering operation, and particularly when the material shader represented by node 62 is processed, the texture shader represented by the processed node 63 is the ambient and diffuse color. Allows you to provide input values. As a result, the texture shader will have three inputs, including the ambient and diffuse color inputs represented by the “Color 1” and “Color 2” inputs shown on node 63, and the “Mixed” input. The values for the ambient and diffuse color inputs are represented by the dialog node 65 by the operator as represented by connections from the respective diffuse and ambient color outputs from the dialog node 65 to the texture shader node 63 of FIG. Provided by using a dialog box.
更に、ノード63により表現されるテクスチャシェイダーの入力に対する入力値は、ノード64により表現されるコヒーレントノイズシェイダーにより提供される。このように、ノード63により表現されるテクスチャシェイダーが、レンダリング操作中に処理されるとき、処理されるノード64により表現されるコヒーレントノイズシェイダーが、混合入力値を提供することが可能になる。コヒーレントノイズシェイダーは、「乱流(turbulence)」入力と「円柱形(cylindrical)」入力を含む2つの入力を有する。乱流入力に対する値は、ダイアログノード65からの乱流出力から、コヒーレントノイズシェイダー・ノード64への接続で表現されるように、ダイアログノード65により表現されるダイアログボックスを使用して、オペレータにより提供される。ロジック値「真」で示される、円柱形入力に対する入力値は、フェノメノン60へハードワイヤードされている。 Further, the input value for the input of the texture shader represented by node 63 is provided by the coherent noise shader represented by node 64. In this way, when the texture shader represented by node 63 is processed during a rendering operation, the coherent noise shader represented by the processed node 64 can provide a mixed input value. The coherent noise shader has two inputs including a “turbulence” input and a “cylindrical” input. The value for the turbulent input is provided by the operator using the dialog box represented by dialog node 65, as represented by the connection from the turbulent output from dialog node 65 to the coherent noise shader node 64. Is done. The input value for the cylindrical input, indicated by the logic value “true”, is hardwired to the Phenomenon 60.
フェノメノンエディタ26により実行される操作を図5により記載する。図5は、フェノメノンエディタウィンドウ70を示し、それはフェノメノンエディタ26が、オペレータインタフェース27により表示できるようにし、本発明の1つの実施形態においては、オペレータはそれを使用して、シーンに付加されたフェノメノンに対する入力値を確立および調整する。特に、オペレータは、フェノメノンエディタウィンドウを使用して、図3で上述したように、作成または修正中に個々のフェノメノンに対して確立された、ダイアログノード65(図4)のようなダイアログノードに関連するダイアログボックスにより提供されるフェノメノン用の値を確立することができる。フェノメノンエディタウィンドウ70は、シェルフフレーム71および制御フレーム72を含む複数のフレームを含み、また、フェノメノンダイアログウィンドウ73とフェノメノンプレビューウィンドウ74を含む。シェルフフレーム71は、シーンに付加するために使用できる種々のフェノメノンを表現するアイコン80を示す。フェノメノンクリエータウィンドウ40(図3)と同様に、シェルフフレームは、まとめて参照番号81として特定される、左および右矢印アイコンを含み、それにより、個々のフレームに示されるアイコンが、左または右へシフトでき(図3に示すように)、一度に表示できる以上のアイコンがある場合は、アイコンをシフトしてフェノメノンエディタウィンドウ70に表示されるようにできる。 The operations executed by the phenomenon editor 26 will be described with reference to FIG. FIG. 5 shows a Phenomenon Editor window 70 that allows the Phenomenon Editor 26 to be displayed by an operator interface 27, which in one embodiment of the present invention is used by an operator to add a Phenomenon added to a scene. Establish and adjust input values for. In particular, the operator uses the Phenomenon Editor window to associate dialog nodes, such as dialog node 65 (FIG. 4), established for each Phenomenon during creation or modification, as described above in FIG. A value for the phenomenon provided by the dialog box can be established. The Phenomenon editor window 70 includes a plurality of frames including a shelf frame 71 and a control frame 72, and also includes a Phenomenon dialog window 73 and a Phenomenon preview window 74. The shelf frame 71 shows icons 80 representing various phenomena that can be used to add to the scene. Similar to the Phenomenon Creator window 40 (FIG. 3), the shelf frame includes left and right arrow icons, collectively identified as reference numeral 81, so that the icons shown in the individual frames are left or right. If there are more icons that can be shifted (as shown in FIG. 3) and can be displayed at once, the icons can be shifted and displayed in the Phenomenon Editor window 70.
制御フレーム73は、オペレータが、シェルフフレーム71におけるノードを消去または複製、オンラインヘルプシステムの開始、フェノメノンエディタ26の終了などの制御操作を行なうために使用できるボタンを表現するアイコン(図示せず)を含む。
オペレータは、そのパラメータ値が、フェノメノンのインスタンスを作成するために、マウスのようなポインティングデバイスを適切に操作することにより確立されるフェノメノンを選択できる。(フェノメノンのインスタンスはそのパラメータ値が固定されたフェノメノンに対応する。)オペレータがフェノメノンを選択した後、フェノメノンエディタ26は、オペレータインタフェース27が、そのダイアログノードに関連するダイアログボックスを、フェノメノンダイアログウィンドウに表示できるようにする。図4に関して上述した木材料フェノメノン60の1つの実施形態と関連して使用される例としてのダイアログボックスは、図6Aと図6Bにより下記に記載される。オペレータが、ダイアログボックスを介して提供できる入力値を提供および調整すると、フェノメノンエディタ26は、効率的にフェノメノンを処理して結果としての出力をフェノメノンプレビューウィンドウ74に表示する。このように、オペレータは、フェノメノンエディタウィンドウ70を使用して、フェノメノンダイアログウィンドウに表示されたダイアログボックスを介して利用できる入力を使用してオペレータが確立する値の結果を見ることができる。
The control frame 73 has icons (not shown) representing buttons that can be used by the operator to perform control operations such as deleting or duplicating nodes in the shelf frame 71, starting an online help system, ending the phenomenon editor 26, and the like. Including.
An operator can select a phenomenon whose parameter value is established by appropriately operating a pointing device, such as a mouse, to create an instance of phenomenon. (A Phenomenon instance corresponds to a Phenomenon whose parameter value is fixed.) After the operator selects a Phenomenon, the Phenomenon Editor 26 causes the operator interface 27 to display a dialog box associated with that dialog node in the Phenomenon dialog window. Enable display. An example dialog box used in connection with one embodiment of the wood material Phenomenon 60 described above with respect to FIG. 4 is described below with reference to FIGS. 6A and 6B. When the operator provides and adjusts input values that can be provided via a dialog box, the phenomenon editor 26 efficiently processes the phenomenon and displays the resulting output in the phenomenon preview window 74. In this way, the operator can use the Phenomenon Editor window 70 to view the results of the values established by the operator using the inputs available through the dialog box displayed in the Phenomenon dialog window.
図6Aと6Bは、図4に示された木材料フェノメノン60に関連して使用される、ダイアログノード(図6Aの場合)と、例としての関連するダイアログボックス(図6Bの場合)の詳細を示している。図4において参照番号65で特定されるダイアログノードは、オペレータが、フェノメノンクリエータ24を使用して、それに関連付けられる特別なフェノメノンの作成または修正の処理中にオペレータにより定義および作成される。図6Aを参照すると、ダイアログボックス65は、複数のタイル、つまり、周囲カラータイル90と、拡散カラータイル91と、乱流タイル92と、光沢度タイル93を含む。図4で上述したように、個々のタイル90から93は、ダイアログノード65により提供された周囲、拡散、乱流、および光沢度出力値それぞれに関連しているということは理解されよう。周囲および拡散カラータイルは、カラー値に関連付けられ、従来の赤/緑/青/アルファ、または「RGBA」のカラー/透明度仕様を使用して指定することができ、このようにして、各カラータイルは、それぞれがカラー表現における赤、緑、および青色と、透明度(アルファ)に対して、複数の入力値に実際には関連付けられる。他方、乱流と光沢度タイル92と93のそれぞれは、スカラー値に関連付けられる。 6A and 6B show details of the dialog node (in the case of FIG. 6A) and an example associated dialog box (in the case of FIG. 6B) used in connection with the wood material Phenomenon 60 shown in FIG. Show. The dialog node identified by reference numeral 65 in FIG. 4 is defined and created by the operator using the Phenomenon Creator 24 during the process of creating or modifying the special Phenomenon associated therewith. Referring to FIG. 6A, the dialog box 65 includes a plurality of tiles: an ambient color tile 90, a diffuse color tile 91, a turbulent tile 92, and a gloss tile 93. It will be appreciated that the individual tiles 90-93 are associated with the ambient, diffuse, turbulent, and gloss output values provided by the dialog node 65, respectively, as described above in FIG. Ambient and diffuse color tiles are associated with color values and can be specified using traditional red / green / blue / alpha, or “RGBA” color / transparency specifications, thus each color tile Are actually associated with multiple input values, each for red, green and blue in the color representation and transparency (alpha). On the other hand, each of the turbulent and glossy tiles 92 and 93 is associated with a scalar value.
図6Bは、フェノメノンエディタ26の制御のもとでオペレータインタフェース27により表示されるように、ダイアログノード65(図6A)に関連する例としてのダイアログボックス100を示している。ダイアログボックス100において、ダイアログノード65の周囲および拡散カラータイル90と91のそれぞれは、オペレータインタフェース27により、全体として参照番号101と102で特定される個々のスライダセットとしてそれぞれ表示され、その各々は、レンダリング中に関連するフェノメノンの処理中に使用されるカラー表現のカラーの1つに関連付けられる。更に、ダイアログノード65の乱流および光沢度タイル92と93はそれぞれ、オペレータインタフェースにより個々のスライダ103と104として表示される。個々のスライダセット101と102におけるスライダは、従来の方法で、マウスのようなポインティングデバイスを使用して、オペレータにより操作され、それにより、フェノメノンエディタ26が、ダイアログノード65によりフェノメノン60(図4)の他のノードに関連するシェイダーに提供された個々の周囲および拡散カラー値に対するカラーの個々の組み合わせを調整することが可能になる。更に、乱流と光沢度入力に関連するスライダ103と104はオペレータが操作することができ、それにより、フェノメノンエディタ26が、ダイアログノード65により、木材料フェノメノン60の他のノードに関連するシェイダーに提供された個々の乱流および光沢度値を調整することができるようになる。 FIG. 6B shows an example dialog box 100 associated with the dialog node 65 (FIG. 6A) as displayed by the operator interface 27 under the control of the Phenomenon editor 26. In the dialog box 100, each of the perimeter of the dialog node 65 and each of the diffuse color tiles 90 and 91 is displayed by the operator interface 27 as an individual slider set, generally identified by reference numerals 101 and 102, respectively. Associated with one of the color representation colors used during the processing of the associated Phenomenon during rendering. Further, the turbulence and glossiness tiles 92 and 93 of the dialog node 65 are displayed as individual sliders 103 and 104 by the operator interface, respectively. The sliders in the individual slider sets 101 and 102 are manipulated by an operator using a pointing device such as a mouse in a conventional manner so that the Phenomenon editor 26 is connected to a Phenomenon 60 (FIG. 4) by a dialog node 65. It is possible to adjust individual combinations of colors for individual ambient and diffuse color values provided to shaders associated with other nodes. In addition, the sliders 103 and 104 associated with turbulence and gloss input can be manipulated by the operator so that the Phenomenon Editor 26 can be moved by dialog nodes 65 to shaders associated with other nodes of the wood Phenomenon 60. It will be possible to adjust the individual turbulence and gloss values provided.
図2に戻って、オペレータがフェノメノンエディタ26を使用して、種々のフェノメノンに対する値と、シーンに関連するフェノメノンインスタンスを確立した後、これらの値は、シーンと共にシーンオブジェクトデータベース22に格納される。その後、シーンイメージ生成部21、特にシーンイメージジェネレータ30によりシーンのイメージのレンダリングが可能になり、オペレータインタフェース31により表示される。シーンイメージジェネレータ30により実行される操作は、図7に示されるフローチャートにより概略が記載される。図7を参照すると、シーンイメージジェネレータ30は、前処理フェーズ、レンダリングフェーズ、および後処理フェーズを含む一連のフェーズにおいて作動する。前処理フェーズにおいては、シーンイメージジェネレータ30は、シーンに付加されたフェノメノンを調べて、前処理および/または後処理操作を、それに関連して実行する必要があるかどうかを判定する(ステップ100)。その後、シーンイメージジェネレータ30は、ステップ100における操作が、前処理操作がシーンに付加された少なくとも1つのフェノメノンに関連して必要かどうかを判定し(ステップ101)、もし必要であれば、前処理操作を実行する(ステップ102)。例としての処理操作には、例えば、シーンに付加されたフェノメノンが幾何学シェイダーを含むならば、それによりシーンに対して定義された幾何学図形を生成するための幾何学図形の生成が含まれる。他の例としての前処理操作には、例えば、シャドウおよびフォトンマッピング、多重継承分析などが含まれる。ステップ102またはステップ101に続いて、シーンイメージジェネレータ30がそのステップで否定的な判定をした場合は、シーンイメージジェネレータ30は、レンダリングに先立ちシーン表現に関連して要求され、シーンに付加されたフェノメノンには関係のない更なる前処理操作を実行できる(ステップ103)。 Returning to FIG. 2, after the operator uses the Phenomenon Editor 26 to establish values for the various Phenomenon and Phenomenon instances associated with the scene, these values are stored with the scene in the scene object database 22. Thereafter, a scene image can be rendered by the scene image generation unit 21, particularly the scene image generator 30, and is displayed by the operator interface 31. The operations executed by the scene image generator 30 are outlined by the flowchart shown in FIG. Referring to FIG. 7, the scene image generator 30 operates in a series of phases including a pre-processing phase, a rendering phase, and a post-processing phase. In the preprocessing phase, the scene image generator 30 examines the phenomenon that has been added to the scene to determine whether preprocessing and / or postprocessing operations need to be performed in connection therewith (step 100). . Thereafter, the scene image generator 30 determines whether the operation in step 100 is necessary in relation to at least one phenomenon added to the scene (step 101) and, if necessary, preprocessing. The operation is executed (step 102). Example processing operations include, for example, generating a geometric figure to generate a geometric figure defined for the scene, if the Phenomenon added to the scene includes a geometric shader. . Other example pre-processing operations include, for example, shadow and photon mapping, multiple inheritance analysis, and the like. If the scene image generator 30 makes a negative determination at that step following step 102 or step 101, the scene image generator 30 is requested in connection with the scene representation prior to rendering and is added to the scene. Further pre-processing operations unrelated to can be executed (step 103).
ステップ103の後、シーンイメージジェネレータ30は、レンダリングフェーズを実行し、そこにおいて、前処理されたシーン表現に関連するレンダリング操作を、レンダリングされたイメージを生成するために実行する(ステップ104)。その操作において、シーンイメージジェネレータ30は、シーンオブジェクトデータベース22に格納され、シーンの種々の構成要素に付加されるフェノメノンを、エンティティ幾何学的表現ジェネレータ23により生成されたものと特定し、それぞれにフェノメノンのすべての主要およびオプションのルートノードを、ルートノードのタイプに適切なシーン構成要素に付加する。その後、シーンイメージジェネレータ30はイメージのレンダリングを行なう。更に、シーンイメージジェネレータ30は、必要であれば、後処理フェーズの間に後処理操作において使用できる情報を生成する。 After step 103, the scene image generator 30 performs a rendering phase in which rendering operations associated with the preprocessed scene representation are performed to generate a rendered image (step 104). In that operation, the scene image generator 30 identifies the phenomenon stored in the scene object database 22 and added to the various components of the scene as having been generated by the entity geometric representation generator 23, and each of the phenomena. Add all major and optional root nodes to the appropriate scene component for the type of root node. Thereafter, the scene image generator 30 performs image rendering. In addition, the scene image generator 30 generates information that can be used in post-processing operations during the post-processing phase, if necessary.
レンダリングフェーズ(ステップ104)の後、シーンイメージジェネレータ30は、後処理フェーズを実行する。その操作において、シーンイメージジェネレータ30は、ステップ100で実行された操作が、後処理操作が、シーンに付加されたフェノメノンに関連して要求されることを示したかどうかを判定する(ステップ105)。シーンイメージジェネレータ30がステップ105において肯定的な判定をすると、そのシーンに付加されたフェノメノンに関連して要求される後処理操作を実行する(ステップ106)。更に、シーンイメージジェネレータ30は、ステップ106において、フェノメノンには関係しない後処理操作を実行できる。シーンイメージジェネレータ30は、カラー補正のための操作ピクセル値と関連して後処理操作を実行することができ、フィルタ処理して種々の光学効果を提供する。更に、シーンイメージジェネレータ30は、例えば、シーンに付加されたフェノメノンが、1つの実施形態においては、レンダリングされたイメージと関連して、例えば、各ピクセル値と関連して格納された速度および深度情報に依存して、出力シェイダーにおいて完全に行なえる被写界深度または動きによるブレの計算のような後処理操作を定義する出力シェイダーを含む場合は、後処理操作を実行できる。 After the rendering phase (step 104), the scene image generator 30 performs a post-processing phase. In that operation, the scene image generator 30 determines whether the operation performed in step 100 has indicated that a post-processing operation is required in connection with the phenomenon added to the scene (step 105). If the scene image generator 30 makes a positive determination in step 105, the post-processing operation required in connection with the phenomenon added to the scene is executed (step 106). Furthermore, the scene image generator 30 can perform post-processing operations that are not related to Phenomenon at step 106. The scene image generator 30 can perform post-processing operations in conjunction with the manipulated pixel values for color correction and filter to provide various optical effects. In addition, the scene image generator 30 may, for example, store the velocity and depth information stored in the Phenomenon added to the scene, in one embodiment, in association with the rendered image, for example, in association with each pixel value. Depending on, a post-processing operation can be performed if it includes an output shader that defines post-processing operations such as depth of field or motion blur calculations that can be done entirely in the output shader.
本発明は数多くの利点をもたらす。特に、本発明は、フェノメノンを作成(フェノメノンクリエータ24を参照)および操作(フェノメノンエディタ26を参照)するための機構を提供するコンピュータグラフィックシステムを提供する。そのように作成されたフェノメノンは、フェノメノンクリエータ24により処理されて、それらが矛盾なく、レンダリング中に処理できるということが保証される。フェノメノンはシーンに付加される前に作成されるので、フェノメノンがプログラマまたは他のコンピュータプログラム開発の専門家により作成でき、それにより、プログラムを展開する必要のあるアーティスト、製図者などの負担を軽減するということは理解されよう。また、フェノメノンは、アーティストから、シーンに多数の異なる相互に関連するシェイダーを構成する複雑さを、フェノメノン作成専門家ユーザーにより前もって実行できる独立したタスクに分離することにより開放する。フェノメノンを使用すれば、構成作業はかなり自動化できる。フェノメノンまたはフェノメノンインスタンスがいったん作成されれば、それはシーンからは独立しており、多数のシーンに再使用でき、繰返し作業を回避できる。 The present invention provides numerous advantages. In particular, the present invention provides a computer graphic system that provides a mechanism for creating (see Phenomenon Creator 24) and manipulating (see Phenomenon Editor 26). Phenomenon so created is processed by the Phenomenon creator 24 to ensure that they can be processed during rendering consistently. Since Phenomenon is created before being added to the scene, Phenomenon can be created by programmers or other computer program development specialists, thereby reducing the burden on artists, drafters, etc. who need to deploy the program. That will be understood. Phenomenon also frees artists from separating the complexity of constructing many different interrelated shaders in a scene into independent tasks that can be performed in advance by a Phenomenon creation expert user. If Phenomenon is used, the configuration can be considerably automated. Once a Phenomenon or Phenomenon instance is created, it is independent of the scene and can be reused for multiple scenes, avoiding repetitive work.
本発明に対して、多数の変更および修正が加えられることは理解されるであろう。上述したように、フェノメノンは、シーンに関連する使用とは分離して作成できるので、フェノメノンを作成および修正するために使用されたフェノメノンクリエータ24と、フェノメノンインスタンスを作成するために使用されたフェノメノンエディタ26は、別のコンピュータグラフィックシステムに設けることができる。例えば、フェノメノンエディタ26を含むコンピュータグラフィックシステム10は、例えば、フェノメノンデータベース25が適切な、予め作成されたフェノメノンを含み、オペレータがフェノメノンを作成または修正する必要がなければ、フェノメノンクリエータ24を含む必要はない。 It will be understood that numerous changes and modifications may be made to the invention. As mentioned above, Phenomenon can be created separately from scene related usage, so the Phenomenon Creator 24 used to create and modify Phenomenon and the Phenomenon Editor used to create Phenomenon instances. 26 can be provided in another computer graphics system. For example, a computer graphics system 10 that includes a Phenomenon Editor 26 may need to include a Phenomenon Creator 24, for example, if the Phenomenon database 25 includes a suitable pre-created Phenomenon and the operator does not need to create or modify the Phenomenon. Absent.
更に、上述したように、フェノメノンのパラメータの値は固定であってもよく、または1つまたは2つ以上の変数の関数に基づいて変化してもよい。例えば、個々のパラメータの1つまたは2つ以上の値が時間を変数として変化すると、フェノメノンインスタンスは、時間依存、または「動画化」できる。これは通常は、動画を備える一連のフレームのフレーム番号により分類される時間間隔に分離されるが、時間依存性は、それにも拘わらず、任意のフェノメノンパラメータ値が付けられた、時間に関する関数の形式を採ることができ、そのそれぞれは絶対時間値によりタグ付けされ、それにより、イメージが連続フレーム番号でレンダリングされても、シェイダーは分離区間には拘束されない。 Further, as described above, the value of the Phenomenon parameter may be fixed or may vary based on a function of one or more variables. For example, a Phenomenon instance can be time-dependent or “animated” when one or more values of individual parameters change with time as a variable. This is usually separated into time intervals that are categorized by the frame number of a series of frames comprising a video, but the time dependence is nevertheless a function of time with an arbitrary Phenomenon parameter value. Can take the form, each of which is tagged with an absolute time value, so that the shader is not bound to a separation interval, even if the image is rendered with consecutive frame numbers.
これに関連して、フェノメノンエディタが、フェノメノンの1つまたは2つ以上のパラメータに対する時間依存値を選択するために使用され、時間依存する「フェノメノンインスタンス」を作成する。1つの特別な実施形態においては、フェノメノンのパラメータに対する時間依存値の選択は、ここでは、「フェノメノン特質制御ツリー」と称されるものを、フェノメノンに対し、グラフィカルで対話的な付加をすることにより達成される。フェノメノン特質制御ツリーは、ツリーまたはDAGの形式であってもよいが、フェノメノンパラメータに付加され、特にフェノメノンの外では効果的に付加され、フェノメノンと共に、フェノメノンインスタンスデータベースに格納される。フェノメノン特質制御ツリーは、1つまたは2つ以上のノードから構成され、そのそれぞれは、それが、例えば、運動曲線、データルックアップ関数などを提供する関数という意味で、シェイダーである。フェノメノン特質制御ツリーは、好ましくは浅く維持され、通常は、非常に少ない分岐レベルしか有しない。フェノメノン特質制御ツリーはただ1つのシェイダーから構成でき、起動時に、関連付けられるパラメータに対する値を計算する関数を定義する。フェノメノン特質制御ツリーは、浅く維持することができるが、これは、フェノメノンは複雑なシェイダーツリーまたはDAGのカプセル化を可能にしかつ促進し、レンダリングステップにおいて、例えば、再使用のためにデータ格納することにより、最適な方法での評価を促進するからである。オペレータがそのようなフェノメノン特質制御ツリーを付加して、フェノメノンのパラメータの制御を可能にすることは、ユーザーが前もって定義されパッケージ化されたフェノメノンの使用に基づくカスタム効果を達成するという柔軟性を大幅に改善する。このようにして作成できる相異なるフェノメノンインスタンスの数は、そのため非常に増大し、一方、使い易さは、フェノメノンにおける複雑さのすべてのカプセル化により低められることはない。 In this context, the Phenomenon Editor is used to select time dependent values for one or more parameters of the Phenomenon, creating a time dependent “Phenomenon instance”. In one particular embodiment, the selection of time-dependent values for the parameters of the Phenomenon is made by making a graphical and interactive addition to the Phenomenon what is referred to herein as a “Phenomenon quality control tree”. Achieved. The Phenomenon attribute control tree may be in the form of a tree or DAG, but is added to the Phenomenon parameters, particularly effectively added outside the Phenomenon and stored with the Phenomenon in the Phenomenon instance database. A Phenomenon property control tree is composed of one or more nodes, each of which is a shader in the sense that it provides, for example, a motion curve, a data lookup function, and the like. The Phenomenon quality control tree is preferably kept shallow and usually has very few branch levels. The Phenomenon attribute control tree can consist of only one shader and defines a function that, when activated, calculates values for the associated parameters. The Phenomenon attribute control tree can be kept shallow, which allows Phenomenon to enable and facilitate the encapsulation of complex shader trees or DAGs and store data for reuse, for example, in the rendering step This is because the evaluation by the optimum method is promoted. Operators can add such a Phenomenon attribute control tree to allow control of Phenomenon parameters, greatly increasing the flexibility for users to achieve custom effects based on the use of predefined and packaged Phenomenon. To improve. The number of different Phenomenon instances that can be created in this way is therefore greatly increased, while ease of use is not reduced by all the encapsulation of complexity in Phenomenon.
更に、図3と図5で記載された、フェノメノンクリエータ24とフェノメノンエディタ26と関連して使用されたウィンドウの外観と構造は、ここで記載されたものとは異なってもよい。
本発明に従うシステムは、そのいずれの部分も適切なプログラムで制御できる特別目的ハードウェアまたは汎用コンピュータシステム、またはそのいかなる組み合わせからでも、その全体または一部を構築できるということは理解されよう。任意のプログラムは、その全体またはその一部において、従来の方法でシステムの一部を含み、またはシステムに格納することができ、またはその全体またはその一部を、ネットワークまたは、従来の方法で情報を転送する他の機構を介して、システムに設けることができる。更に、システムは、システムに直接接続できる、または、ネットワークまたは、従来の方法で情報を転送する他の機構を介して、情報をシステムに転送できるオペレータ入力要素(図示せず)を使用して、オペレータにより提供される情報により操作および/または制御できる。
Further, the appearance and structure of the windows used in connection with the phenomenon creator 24 and phenomenon editor 26 described in FIGS. 3 and 5 may be different from those described herein.
It will be appreciated that the system according to the present invention can be constructed in whole or in part from special purpose hardware or general purpose computer systems, any combination of which can be controlled by any suitable program. Any program may, in whole or in part, contain part of the system in a conventional manner or be stored in the system, or the whole or part of it may be networked or information in a conventional manner. Can be provided to the system through other mechanisms for transferring In addition, the system uses an operator input element (not shown) that can be directly connected to the system or that can transfer information to the system via a network or other mechanism for transferring information in a conventional manner, It can be operated and / or controlled by information provided by the operator.
米国特許第6,496,190号明細書において記載され、上記に検討したフェノメノンシステムは非常に有効であることが実証されたが、最近は、多数のシェイディングプラットフォームおよび言語が開発され、そのため、ビデオゲーム用のハードウェアシェイングであろうが、動画における視覚効果のためのソフトウェアシェイディングであろうが、現在存在するシェイダー言語は特別なプラットフォームおよびアプリケーションに狭く焦点が合わされてきている。従来のシェイダーシステム及び言語に典型的なこのプラットフォームの依存性は、重大な制限であり得る。 Although the Phenomenon system described in US Pat. No. 6,496,190 and discussed above has proven very effective, a number of shading platforms and languages have recently been developed, so Whether it is hardware shading for video games or software shading for visual effects in motion pictures, existing shader languages have been narrowly focused on special platforms and applications. This platform dependency typical of traditional shader systems and languages can be a significant limitation.
従って、下記の節とその項においては、(1)プラットフォームに独立で、単一の言語またはシステム構築のもとで種々のシェイディングツールおよびアプリケーションを統合できるシェイダー方法およびシステムと、(2)効率的で簡単な、シェイダーの再使用と再目的化を可能にし、頻繁に普通に発生する(例えば、Lara Croft-Tomb Raider)、ビデオゲームおよび特作映画の統合に有効である方法とシステムと、(3)コンピュータプログラミングの必要がなく、シェイダーの設計および構築を容易にし、アーティストに対して有効な方法とシステムと、(4)シェイダーのグラフィカルなデバッグを可能にし、シェイダーの作成者がシェイダーにおける欠陥を検出して解決するようにできる方法とシステムを記載する。 Accordingly, in the following section and its sections, (1) a shader method and system that can integrate various shading tools and applications under a single language or system build, and (2) efficiency. Methods and systems that enable efficient and simple shader reuse and repurpose, and are effective in the integration of video games and feature films that occur frequently (eg, Lara Croft-Tomb Raider), (3) Eliminates the need for computer programming, facilitates the design and construction of shaders, and provides an effective method and system for artists. A method and system that can detect and resolve a problem is described.
第II節 メンタルミル
図8は、本発明の1つの形態による全体の方法150のフローチャートを示す。記載される方法は、コンピュータグラフィックシステムにおいて、少なくとも1つのシェイダーノードを備えるカプセル化されたシェイダーDAGを備える、少なくとも1つのインスタンス化されたフェノメノンが付加された表現から、シーンのイメージの生成を可能にする。
Section II Mental Mill FIG. 8 shows a flowchart of an overall method 150 according to one aspect of the present invention. The described method enables the generation of an image of a scene from a representation with at least one instantiated Phenomenon comprising an encapsulated shader DAG comprising at least one shader node in a computer graphics system To do.
ステップ151において、ネットワークにおいてより複雑なシェイダーを構築するために組み合わせることができる構成要素シェイダーを備えるメタノードの作成のために作動可能な、メタノード環境が構築される。
ステップ152において、メタノード環境と連絡状態にあり、メタノード環境を管理して、ユーザーが、メタノード環境を使用して、シェイダーグラフおよびフェノメノンを構築できるようにするグラフィカルユーザーインタフェース(GUI)が構築される。
In step 151, a metanode environment is constructed that is operable for creation of metanodes with component shaders that can be combined to build more complex shaders in the network.
In step 152, a graphical user interface (GUI) is constructed that is in contact with the metanode environment, manages the metanode environment, and allows the user to build shader graphs and phenomenons using the metanode environment.
ステップ153において、ソフトウェア言語が、人間のオペレータにより使用でき、メタノード環境を管理し、シェイダーを実践し、分離したシェイディングアプリケーションを統合できるようにするインタフェースとして提供される。ソフトウェア言語は、選択されたハードウェアプラットフォームに対する複数の選択されたシェイダー言語のスーパーセットとして構築可能であり、コンパイラ機能が、ソフトウェア言語において表現されたフェノメノンの単一の、再使用できる記述から、選択されたシェイダー言語において選択されたハードウェアプラットフォームに対する最適化ソフトウェアコードを生成することを可能にする。 In step 153, a software language is provided as an interface that can be used by human operators to manage the metanode environment, implement shaders, and integrate separate shading applications. The software language can be built as a superset of multiple selected shader languages for the selected hardware platform, and the compiler function selects from a single, reusable description of Phenomenon expressed in the software language It is possible to generate optimized software code for a selected hardware platform in a selected shader language.
ステップ154において、少なくとも1つのGUIライブラリが提供され、それはメタノード環境と関連して使用でき、シェイダーグラフおよびフェノメノンを構築できるようなGUIを生成できる。
ステップ155において、対話的で、視覚的、リアルタイムのデバッグ環境が構築され、それはGUIと連絡状態にあり、(1)ユーザーがシェイダーにおける潜在的な欠陥を検出して補正できるようにし、(2)テスト中のシェイダー、メタノード、またはフェノメノンによるテストシーンが、常にレンダリングされるビューイングウィンドウを提供するように作動可能である。
In step 154, at least one GUI library is provided, which can be used in conjunction with the metanode environment to generate a GUI that can build shader graphs and phenomenons.
In step 155, an interactive, visual, real-time debugging environment is established that is in contact with the GUI, (1) allowing the user to detect and correct potential defects in the shader, and (2) Test scenes with shaders, metanodes, or phenomenons under test are operable to provide a viewing window that is always rendered.
ステップ156において、設備が構築され、それはコンパイラ機能と連絡状態にあり、選択されたハードウェアプラットフォームと、選択されたシェイダー言語に対して最適化されたソフトウェアコードを、選択されたシェイダー言語に対して、固有のコンパイラ機能を使用して、選択された集積回路インスタンス化に対する機械コードに変換するように作動可能である。 In step 156, the facility is built, which is in communication with the compiler function, and the selected hardware platform and software code optimized for the selected shader language are displayed for the selected shader language. It is operable to convert to machine code for the selected integrated circuit instantiation using a native compiler function.
下記の検討は、次のように4つの主要な節にまとめられる。
A.メンタルミル機能概観
B.メンタルミルGUI仕様
C.MetaSL設計仕様
D.MetaSLシェイダーデバッガ
The following discussion is summarized in four main sections:
A. Mental mill function overview Mental mill GUI specifications C.I. MetaSL design specifications MetaSL shader debugger
A.メンタルミル機能概観
メンタルミル(商標)技術は、視覚効果のためのシェイダーの作成に改良されたアプローチを提供する。メンタルミルは、今日、シェイダーライターが直面する多数の問題を解決し、将来のシェイダープラットフォームの変更および展開に対して、将来に備えてシェイダーに耐性を付与する。
A. Mental Mill Functional Overview Mental Mill ™ technology provides an improved approach to creating shaders for visual effects. Mental mills solve many of the problems faced by shader writers today and make them resistant to future shader platform changes and deployments.
スタンドアロンの操作に対するユーザーインタフェースを提供することに加えて、メンタルミルは、更に、シェイダー作成を管理するAPIを提供するライブラリを含む。このライブラリは、構成要素化する方法で、サードパーティのアプリケーションに統合でき、アプリケーションが、それが必要とするメンタルミルの構成要素のみを使用できるようにする。 In addition to providing a user interface for stand-alone operation, the mental mill further includes a library that provides an API for managing shader creation. This library can be integrated into third-party applications in a componentized manner, allowing the application to use only the mental mill components it requires.
メンタルミルシェイディングの基盤は、メンタルミルシェイディング言語MetaSL(商標)である。MetaSLは、単純であるが、シェイダーを実践するために特別に設計された表現豊かな言語である。メンタルミルは、シェイダーネットワークで組み合わされて、より複雑で、視覚的に興味あるシェイダーを構築できる、単純でコンパクトな構成要素化されたシェイダー(メタノード(商標)と称する)の作成を促進する。 The basis for mental mill shading is the mental mill shading language MetaSL ™. MetaSL is a simple but expressive language specially designed to practice shaders. Mental mills facilitate the creation of simple, compact componentized shaders (referred to as Metanodes ™) that can be combined with shader networks to build more complex and visually interesting shaders.
MetaSLの目標は、別のシェイディング言語を導入することではなく、既存の言語のパワーを、単一のメタ言語、MetaSLを介して活用しようとすることである。現在存在するシェイダー言語は、相対的に特別なプラットフォームまたは状況、例えば、ゲーム用ハードウェアシェイディング、または特作映画視覚効果用のソフトウェアシェイディングに焦点を当てている。MetaSLは、これらのシェイディングアプリケーションを単一の言語に統合する。 The goal of MetaSL is not to introduce another shading language, but to leverage the power of existing languages through a single metalanguage, MetaSL. Existing shader languages focus on relatively special platforms or situations, such as gaming hardware shading, or software shading for special film visual effects. MetaSL integrates these shading applications into a single language.
メンタルミルは、「メタノード」と称されるシェイダーブロックの作成を可能にし、メタノードは、MetaSLで書かれ、洗練されたシェイダーグラフおよびフェノメノン(商標)を形成するために付加され、組み合わされる。シェイダーグラフは、シェイダーコードを書くための技術的専門知識がないユーザーがアクセス可能なシェイダーを作成するための、直感的なグラフィカルユーザーインタフェースを提供する。メンタルミルのグラフィカルユーザーインタフェース・ライブラリは、シェイダーグラフとフェノメノンを構築するための完全なグラフィカルユーザーインタフェースをユーザーに提供するために、シェイダーグラフパラダイムを利用する。下記に詳細に検討するように、本発明は、「メタノード環境」、つまり、メタノードの作成と操作のために作動可能な環境を提供する。更に、下記で検討されるように、記述されたメタノード環境は、ソフトウェア、またはソフトウェアとハードウェアの組み合わせとして実装できる。 Mental mills allow the creation of shader blocks called “metanodes” that are written in MetaSL and added and combined to form sophisticated shader graphs and Phenomenon ™. The shader graph provides an intuitive graphical user interface for creating shaders that are accessible to users who do not have the technical expertise to write shader code. Mental Mill's graphical user interface library utilizes the shader graph paradigm to provide users with a complete graphical user interface for building shader graphs and phenomena. As discussed in detail below, the present invention provides a “metanode environment”, an environment that is operable for creation and manipulation of metanodes. Further, as discussed below, the described metanode environment can be implemented as software, or a combination of software and hardware.
スタンドアロンの適用は、メンタルミルの一部として含まれるが、メンタルミルはクロスプラットフォーム(cross-platform)、構成要素化されたライブラリを提供するので、サードパーティのアプリケーションへの統合が可能なようにも設計されている。スタンドアロンのメンタルミルのアプリケーションは、単に、これらのライブラリを、他の任意のアプリケーションと同じように使用する。メンタルミルライブラリは、下記のように細分化できる。(1)フェノメノン・クリエータ・グラフィカルユーザーインタフェース(GUI)、(2)フェノメノンフェノメノンシェイダーグラフ・コンパイラ、および(3)MetaSLシェイディング言語コンパイラ。 Stand-alone applications are included as part of the mental mill, but the mental mill provides a cross-platform, componentized library so that it can be integrated into third-party applications. Designed. A stand-alone mental mill application simply uses these libraries just like any other application. The mental mill library can be subdivided as follows. (1) Phenomenon Creator Graphical User Interface (GUI), (2) Phenomenon Phenomenon Shader Graph Compiler, and (3) MetaSL Shading Language Compiler.
メンタルミル・フェノメノン・クリエータGUIライブラリは、GUI構成要素の一群を提供し、それにより、広汎な技術的専門知識を有するユーザーが、複雑なシェイダーおよびフェノメノンを作成することが可能になる。
主なGUI構成要素は、シェイダーグラフビューである。このビューは、ユーザーが、シェイダーノード(メタノードまたは他のフェノメノン)を作成し、それらを記述されたグラフに一緒に付加することによりフェノメノンを構築することを可能にする。シェイダーグラフは、シェイダーコードを見ているときには見つけられないシェイダープログラムの明確な視覚表現を提供する。これにより、シェイダーの作成を、シェイダーコードを書くための技術的専門知識がないユーザーが行なえるようにする。GUIライブラリはまた、他のユーザーインタフェース構成要素を提供し、下記にまとめてある。
The Mental Mill Phenomenon Creator GUI library provides a group of GUI components that allow users with extensive technical expertise to create complex shaders and phenomenons.
The main GUI component is the shader graph view. This view allows a user to build a phenomenon by creating shader nodes (metanodes or other phenomena) and attaching them together to the described graph. The shader graph provides a clear visual representation of the shader program that cannot be found when looking at the shader code. This allows shaders to be created by users who do not have the technical expertise to write shader code. The GUI library also provides other user interface components, summarized below.
・シェイダーパラメータエディタ−スライダ、カラーピッカー、および、シェイダーパラメータ値の編集を促進する他の制御ツールを提供する。
・レンダリングプレビューウィンドウ−ユーザーのシェイダーの進行に関しての、ユーザー対話的フィードバックを提供する。
・フェノメノンライブラリエクスプローラ−ユーザーが前もって構築されたフェノメノンのライブラリを閲覧および維持できるようにする。
Shader parameter editor—provides sliders, color pickers, and other control tools that facilitate editing of shader parameter values.
Render preview window—provides user interactive feedback on the progress of the user's shader.
Phenomenon Library Explorer-Allows users to browse and maintain a pre-built Phenomenon library.
・メタノードライブラリエクスプローラ−ユーザーが、メタノードの組織化されたツールボックス、フェノメノンの基盤構築ブロックを閲覧および維持することを可能にする。
・コードエディタおよび統合開発環境(IDE)−より技術レベルが高いユーザーが新しいメタノードをMetaSLで開発するために必要なツールを提供する。IDEは、メンタルミルGUIと統合されて、対話的視覚フィードバックを提供する。更に、IDEは、シェイダーにおける欠陥の位置を発見し補正するための高いレベルの対話的視覚デバッガを提供する。
Metanode Library Explorer-allows users to view and maintain Metanode's organized toolbox, Phenomenon infrastructure building blocks.
Code editor and integrated development environment (IDE) —Provides the tools necessary for more advanced users to develop new Metanodes with MetaSL. The IDE is integrated with the mental mill GUI to provide interactive visual feedback. In addition, the IDE provides a high level interactive visual debugger for finding and correcting defect locations in the shader.
メンタルミルGUIライブラリは、構成要素化されたクロスプラットフォームである。ライブラリは、いかなる特別なオペレーティングシステムまたはプラットフォームのユーザーインタフェースライブラリに依存することなく開発された。
更に、メンタルミルGUIライブラリは、サードパーティのアプリケーションへの統合のために設計されている。GUIライブラリの構成要素は、デフォルトのルック&フィールを有するが、プラグインインタフェースが、フェノメノンクリエータGUIの見かけと感触が、ホストアプリケーションのルック&フィールに合うようにカスタマイズすることを可能にするために提供される。
The mental mill GUI library is a cross-platform componentized. The library was developed without relying on any special operating system or platform user interface libraries.
In addition, the mental mill GUI library is designed for integration into third party applications. The GUI library components have a default look and feel, but a plug-in interface is provided to allow the appearance and feel of the Phenomenon Creator GUI to be customized to match the look and feel of the host application Is done.
MetaSLシェイディング言語は、今日利用できる多数のシェイディング言語を統合し、新しい言語とプラットフォームが、将来登場したときにそれらをサポートするように拡張可能である。これによりMetaSLは、プラットフォーム依存性からの脱却が可能になる。
MetaSLは、単純であるが、シェイダーのライターのニーズに目標を置いた強力な言語である。それにより、シェイダーを、それがなければ快適なプログラミングを感じることがないユーザーによりアプローチできる、コンパクトで非常に読みやすい構文で書くことが可能になる。
The MetaSL shading language integrates the many shading languages available today and can be extended to support new languages and platforms as they emerge in the future. This allows MetaSL to break away from platform dependencies.
MetaSL is a simple but powerful language that targets the needs of shader writers. This allows shaders to be written in a compact and very readable syntax that can be approached by users who would otherwise not feel comfortable programming.
MetaSLシェイダーは、特別なプラットフォーム上に依存することなく書くことができるので、MetaSLシェイダーは、多様な異なる方法で使用できる。単一のシェイダーは、ソフトウェアでオフラインのレンダリング、またはハードウェアのリアルタイムのレンダリングに使用できる。同じシェイダーは、次世代のビデオゲームコンソールにより使用されるような、異なるプラットフォーム間でも使用できる。 Since MetaSL shaders can be written without any dependency on a special platform, MetaSL shaders can be used in a variety of different ways. A single shader can be used for off-line rendering in software or real-time rendering of hardware. The same shader can be used across different platforms, such as those used by next generation video game consoles.
シェイダーをMetaSLで書くことにより、シェイダーの開発に費やした時間は、いかなる言語からも取り残されることなく保護され、多数の異なるプラットフォーム上での再使用の可能性により活用される。
メンタルミルライブラリの一部であるMetaSLコンパイラそれ自身は拡張可能である。コンパイラのフロントエンドはプラグインなので、他の言語または構文に対するパーサー(オペランド解析器)(parser)は、MetaSLフロントエンドと置き換えることができる。同様に、コンパイラのバックエンドもまたプラグインなので、新しいターゲットプラットフォームは、将来容易にサポートされる。メンタルミル・コンパイラ・ライブラリの両者のエンドに対する拡張性により、それがシェイダー世代のハブになることが可能になる。
By writing shaders in MetaSL, the time spent developing shaders is protected from being left behind in any language and is exploited by the possibility of reuse on many different platforms.
The MetaSL compiler itself that is part of the mental mill library is extensible. Since the compiler front end is a plug-in, a parser (operand parser) for other languages or syntax can be replaced with the MetaSL front end. Similarly, because the compiler backend is also a plug-in, the new target platform will be easily supported in the future. Extensibility of both ends of the mental mill compiler library allows it to become a shader generation hub.
シェイダーのライターは、典型的にいくつかのフロント上の困難に直面する。下記に節は、これらの問題と、完全なソリューションセットを提供すべく設計された、メンタルミル技術の作成の裏にある論理的根拠の概要を述べる。
メンタルミルにより開発されたシェイダーは、プラットフォームには依存しない。これはメンタルミルの重要な特徴であり、シェイダーの開発に費やされた努力が、目標とするプラットフォームが発展するにつれて無駄になることはない。このプラットフォームの独立性は、MetaSLで書かれたシェイダーと、メタノードのシェイダーグラフの両者に提供される。
Shader lighters typically face some difficulty on the front. The following sections outline these issues and the rationale behind the creation of mental mill technology designed to provide a complete solution set.
Shaders developed by mental mills are platform independent. This is an important feature of mental mills, and the effort spent developing shaders will not be wasted as the target platform evolves. This platform independence is provided for both shaders written in MetaSL and shader graphs for metanodes.
メンタルミルライブラリは、特別なプラットフォームのためのシェイダーを、フェノメノンシェイダーグラフまたは、モノリシックなMetaSLシェイダーからの要求に応じてダイナミックに生成するためのアプリケーションプログラミングインタフェース(API)を提供する。または、メンタルミルは、目標のプラットフォームにより要求される形式でシェイダーを静的ファイルにエクスポートすることを可能にする。これにより、シェイダーを、メンタルミルライブラリを必要とすることなく使用することが可能になる。 The mental mill library provides an application programming interface (API) for dynamically generating shaders for special platforms on demand from Phenomenon shader graphs or monolithic MetaSL shaders. Alternatively, the mental mill allows the shader to be exported to a static file in the format required by the target platform. This allows the shader to be used without the need for a mental mill library.
図9は、本発明の1つの形態による、全体システム200の図を示す。図9に示されるように、システム200は、下記に記述される、多数のサブモジュールおよび他の構成要素をふくむ、メンタルミル処理モジュール202を含む。メンタルミル処理モジュール202は、フェノメノン204およびMetaSLコード206の形式の入力を受け取る。メンタルミル処理モジュール202は、出力として、Cg 208、HLSL 210、GLSL 212、Cell SPU 214、C++ 216などを含む、選択されたシェイダー言語のソースコードを提供する。更に、メンタルミル202は、出力として、まだ開発されていない将来の言語218のソースコードを提供するようにも適合可能である。 FIG. 9 shows a diagram of an overall system 200 according to one form of the invention. As shown in FIG. 9, system 200 includes a mental mill processing module 202 that includes a number of sub-modules and other components described below. The mental mill processing module 202 receives input in the form of Phenomenon 204 and MetaSL code 206. The mental mill processing module 202 provides the source code of the selected shader language, including Cg 208, HLSL 210, GLSL 212, Cell SPU 214, C ++ 216, etc. as output. Furthermore, the mental mill 202 can be adapted to provide as source the source code of future languages 218 that have not yet been developed.
プラットフォーム独立性の構成要素は、特別なレンダリングアルゴリズムからは隔離されている。例えば、ハードウェアレンダリングは、ソフトウェアレンダリングに比べて、異なるレンダリングアルゴリズムをしばしば採用する。ハードウェアレンダリングは、複雑な幾何学図形のレンダリングは非常に速いが、大域照明のような進歩した照明アルゴリズムを直接にはサポートしない。 Platform independent components are isolated from special rendering algorithms. For example, hardware rendering often employs a different rendering algorithm compared to software rendering. Hardware rendering renders complex geometric shapes very fast, but does not directly support advanced lighting algorithms such as global lighting.
MetaSLは、3つのサブセットまたはレベルに分割されると考えられ、各レベルは、その表現の豊かさの量と、異なるレンダリングアルゴリズムに対する適合性の両者において異なる。図10は、サブセットとしてのMetaSL220のレベルを示す図を示している。点線の楕円形の領域224は、基準のサブセットとしてのC++を示している。
レベル1(221)−これは、最も一般的なMetaSLのサブセットである。このサブセット内で書かれたシェイダーは、容易に幅広い多様なプラットフォームの目標になり得る。シェイダーの多くのタイプが、このサブセット内でその全体を書くことができる。
MetaSL is considered to be divided into three subsets or levels, each level differing both in its amount of expressiveness and its suitability for different rendering algorithms. FIG. 10 shows a diagram showing the levels of MetaSL 220 as a subset. Dotted oval region 224 shows C ++ as a subset of the reference.
Level 1 (221) —This is the most common subset of MetaSL. Shaders written within this subset can easily be the goal of a wide variety of platforms. Many types of shaders can write the whole in this subset.
レベル2(222)−レベル1(221)のスーパーセットであり、レベル2(222)は、レイトレーシングおよび大域照明のようなソフトウェアレンダリングアルゴリズムでのみ典型的に利用可能な特徴を追加する。レベル1(221)と同様に、レベル2(222)は、依然として相対的に簡略化された言語であり、レベル2(222)内で書かれたシェイダーは、ハードウェアプラットフォーム上で部分的にレンダリングすることが可能である。これにより、レンダリングの一部が、ハードウェアおよびソフトウェアの一部で行なわれるレンダリングアルゴリズムの混合を達成することが可能になる。 Level 2 (222)-a superset of Level 1 (221), Level 2 (222) adds features that are typically available only with software rendering algorithms such as ray tracing and global illumination. Like Level 1 (221), Level 2 (222) is still a relatively simplified language, and shaders written within Level 2 (222) are partially rendered on the hardware platform. Is possible. This allows a portion of the rendering to achieve a mix of rendering algorithms that are performed in hardware and software.
レベル3(223)−これは、レベル1(221)とレベル2(222)の両者のスーパーセットである。更に、レベル3(223)はまた、一般的なC++言語のスーパーセットでもある。レベル3(223)シェイダーは、ソフトウェアでしか実行できないが、レベル3(223)は、それがC++のすべての特徴を含むので、3つのレベルで最も表現が豊かである。しかし、C++の複雑さを必要とするシェイダーはほとんどなく、レベル1(221)が可能な目標の最小な、一般的なセットを有することを考えると、ほとんどのシェイダーは、レベル1(221)とレベル2(222)のみを使用して書かれると思われる。 Level 3 (223) —This is a superset of both Level 1 (221) and Level 2 (222). In addition, level 3 (223) is also a general C ++ language superset. Level 3 (223) shaders can only be implemented in software, but level 3 (223) is the most expressive of the three levels because it includes all the features of C ++. However, given that there are few shaders that require C ++ complexity and that Level 1 (221) has a minimal, general set of possible goals, most shaders have Level 1 (221) and It seems to be written using only level 2 (222).
レベル1(221)は、MetaSLの最も小さなサブセットと見なされるが、それはまた、それがサポートするプラットフォームのタイプにおいて最も一般的でもある。レベル3(223)は、最大のスーパーセットであり、C++のすべてさえも含み、それを非常に強力かつ表現豊かにしている。それを必要とするアプリケーションに対しては、レベル3(223)は、複雑なシェイダーを、C++の特徴のすべてを使用して書くことを可能にする。レベル223を使用することによる代償は、それをサポートする目標が限られているということにある。図11は、MetaSLのレベルと、そのハードウェアおよびソフトウェアレンダリングへの適用性を示す棒グラフ230である。 Level 1 (221) is considered the smallest subset of MetaSL, but it is also the most common in the type of platform it supports. Level 3 (223) is the largest superset, including all of C ++, making it very powerful and expressive. For applications that need it, level 3 (223) allows complex shaders to be written using all of the features of C ++. The price of using level 223 is that there are limited goals to support it. FIG. 11 is a bar graph 230 showing the level of MetaSL and its applicability to hardware and software rendering.
レベル1と2のシェイダー(221、222)は、高いレベルの互換性を有し、違いは、レベル2のシェイダー(222)が、GPU上では起動できない高度なアルゴリズムを利用するということのみである。しかし、MetaSLコンパイラは、レベル1(221)にサポートされていない機能を除去し、それを無操作(no-ops)で置き換えることで、それがあたかもレベル1のシェイダー(221)(そして、目標ハードウェアプラットフォーム)のようにレベル2のシェイダー(222)を使用することができる。MetaSLコンパイラのこの特徴、および所与のシェイダーのレベルをも検出する機能により、MetaSLコンパイラが、シェイダーのハードウェアとソフトウェアのバージョンを同時に生成(または、それが必要なときは、ソフトウェアのシェイダーのみを生成)することが可能になる。ハードウェアのシェイダーは、ハードウェアレンダリングを介して、ユーザーへの直接のフィードバックのために使用することができる。そして、ソフトウェアレンダリングは、より精度の高いイメージを付け加えることができる。 Level 1 and 2 shaders (221, 222) have a high level of compatibility, the only difference being that Level 2 shaders (222) use advanced algorithms that cannot be launched on the GPU. . However, the MetaSL compiler removes features that are not supported by Level 1 (221) and replaces them with no-ops so that it looks as if it is a Level 1 shader (221) (and the target hard Level 2 shaders (222) can be used, such as This feature of the MetaSL compiler and its ability to detect a given shader level also allows the MetaSL compiler to generate the shader's hardware and software versions simultaneously (or only the software shader when it is needed) Generation). Hardware shaders can be used for direct feedback to the user via hardware rendering. Software rendering can then add more accurate images.
メンタルミルの別の有効な特徴は、シェイダーの目的を容易に変更できる機能である。この重要な例の1つは、ビデオゲームおよび特作映画の統合に見られる。成功した映画からその内容を使用する許可を得て開発されたビデオゲームを見ることはあまりない。ますます特作映画は、成功したビデオゲームに基づいて製作されもする。ビデオゲームと、それに基づく映画に対して、同じ芸術的資産を使用することは意味のあることであるが、過去においては、映画は、ビデオゲームとはまったく異なるレンダリングアルゴリズムを使用してレンダリングされるので、これはシェイダーにとっては課題であった。メンタルミルは、同じMetaSLシェイダーを、両方の状況で使用できるようにすることで、この障害を克服する。 Another useful feature of the mental mill is the ability to easily change the purpose of the shader. One important example is found in the integration of video games and feature films. You rarely see video games developed with permission to use their content from successful movies. Increasingly, feature films are also produced based on successful video games. It makes sense to use the same artistic assets for video games and movies based on them, but in the past, movies are rendered using a completely different rendering algorithm than video games So this was a challenge for shaders. The mental mill overcomes this obstacle by allowing the same MetaSL shader to be used in both situations.
シェイダーを構築するためのシェイダーグラフモデルもまた、シェイダーの再使用を促進する。シェイダーグラフは、本質的に、構成要素化される方法において、シェイダーの構築を促進する。MetaSLシェイダーにより実装された単一のメタノードは、多くの異なるシェイダーにおいて、異なる方法で使用できる。実際、グラフのサブツリーの全体は、フェノメノンにパッケージ化することができ、単一ノードとして再使用できる。 A shader graph model for building shaders also facilitates the reuse of shaders. A shader graph essentially facilitates the construction of shaders in a componentized way. A single metanode implemented by a MetaSL shader can be used in many different ways by many different shaders. In fact, the entire graph sub-tree can be packaged in Phenomenon and reused as a single node.
メンタルミルのグラフィカルユーザーインタフェースは、必ずしもプログラミングを含まないシェイダーの構築方法を提供する。従って、コードを書くことに心地良さを感じないアーティストまたは他の人間は、ここで、自分自身でシェイダーを作成できる能力を有することになる。過去においては、シェイダーを作成するためにはプログラマに頼る必要があり、それは、プログラマとアーティストの間で多くの繰返しを含む可能性のある緩慢なプロセスであった。アーティストに、シェイダー作成プロセスに対する制御を与えることにより、プログラマを他のタスクに解放できるだけでなく、アーティストがより自由に、カスタムシェイダーを介して可能になる可能性を探索できるようになる。 The mental mill graphical user interface provides a way to build shaders that do not necessarily involve programming. Thus, an artist or other person who does not feel comfortable writing code will now have the ability to create a shader himself. In the past, creating a shader required relying on the programmer, which was a slow process that could involve many iterations between the programmer and the artist. Giving the artist control over the shader creation process not only frees the programmer for other tasks, but also allows the artist to more freely explore the possibilities that are possible through custom shaders.
メンタルミルのユーザーインタフェースもまた、プログラマと技術ディレクタに対して開発環境を提供する。プログラマは、MetaSLで書かれたカスタムメタノードを作成でき、そしてアーティストは、これらのノードを使用して、新しいシェイダーを作成できる。技術ディレクタは、機能の単位を実現する複雑なカスタムシェイダーグラフを作成でき、それらのグラフをフェノメノンにパッケージ化することができる。柔軟性および複雑さのこれらの異なるレベルは、ユーザーに、シェイダー作成プロセスに対する幅広い制御を与え、ユーザーを、幅広い技術的および芸術的専門知識に巻き込むことができる。 The mental mill user interface also provides a development environment for programmers and technical directors. Programmers can create custom metanodes written in MetaSL, and artists can use these nodes to create new shaders. Technology directors can create complex custom shader graphs that implement functional units and package them into Phenomenon. These different levels of flexibility and complexity give the user broad control over the shader creation process and can involve the user in a wide range of technical and artistic expertise.
シェイダーの作成の重要な面は、欠陥を分析し、その原因を判定し、解決法を見つける機能である。つまり、シェイダークリエータは、そのシェイダーのデバッグを行なうことができなければならない。シェイダーにおける欠陥を見つけて解決することは、シェイダーが、グラフを形成するためにメタノードを付加することにより、またはMetaSLを書くことにより、またはその両者により作成されたか、に無関係に必要なことである。メンタルミルは、ユーザーに、高いレベルの視覚的技術を使用してそのシェイダーのデバッグを行なえる機能を提供する。これにより、シェイダーのクリエータは、そのシェイダーの状態を視覚的に分析し、問題の原因を迅速に隔離することが可能になる。プロトタイプのアプリケーションが、このシェイダーデバッグシステムのコンセプトの証明として作成された。 An important aspect of creating shaders is the ability to analyze defects, determine their cause, and find solutions. That is, the shader rieta must be able to debug the shader. Finding and resolving defects in a shader is necessary regardless of whether the shader was created by adding a metanode to form a graph, or by writing MetaSL, or both . The mental mill provides users with the ability to debug their shaders using a high level of visual technology. This allows the shader creator to visually analyze the state of the shader and quickly isolate the cause of the problem. A prototype application was created as a proof of concept for this shader debug system.
オフラインのまたはリアルタイムの対話的レンダリングのような、シェイダーのほとんどすべてのアプリケーションは、シェイダーが可能な限りの高いレベルの性能を達成することを要求する。典型的に、シェイダーは、レンダラーの最も性能が重要なセクションで起動され、そのため、全体の性能に重要なインパクトを有する。このため、シェイダーの作成者が、細かい点において、そのシェイダーの性能を分析して、シェイダーの計算上、非常に高価な部分を隔離できることが重要である。 Almost all shader applications, such as offline or real-time interactive rendering, require that the shader achieve the highest possible level of performance. Typically, shaders are activated in the most performance critical section of the renderer, and thus have a significant impact on overall performance. For this reason, it is important that the shader creator can analyze the performance of the shader at a fine point and isolate very expensive parts in the calculation of the shader.
メンタルミルは、プロファイリング(profiling)と称される分析法を、直感的なグラフによる表現により提供する。これにより、メンタルミルのユーザーは、シェイダーの部分の相対的な性能を示す視覚的フィードバックを受け取ることが可能になる。このプロファイリング情報は、グラフまたはフェノメノンの一部であるノードに対するノードレベルと、メタノードに含まれるMetaSLコードに対するステートメントレベルの両者において提供される。 The mental mill provides an analytical method called profiling with an intuitive graphical representation. This allows the mental mill user to receive visual feedback indicating the relative performance of the shader parts. This profiling information is provided both at the node level for nodes that are part of the graph or phenomenon and at the statement level for MetaSL code contained in the metanode.
シェイダーの性能タイミングは、そのシェイダーを駆動する特別な入力値に依存することができる。例えば、シェイダーは、ループを介する繰返し数が、特別な入力パラメータ値の関数であるループを含むことができる。メンタルミルのグラフィカルプロファイラ(profiler)により、シェイダーの性能が、ノードが常駐するシェイダーのグラフの状況において分析できるようになり、性能の結果を、その状況の中で、ノードを駆動する特別な入力値に対し相対的とすることができる。 A shader's performance timing can depend on the particular input value that drives the shader. For example, a shader can include a loop where the number of iterations through the loop is a function of a special input parameter value. The mental mill's graphical profiler allows shader performance to be analyzed in the context of a shader graph where the node resides, and the performance results are special input values that drive the node in that situation. Can be relative to.
任意の特別な詳細度における性能情報は、ノード、つまり全体のシェイダーの全体性能コストに対して、または、複数のシェイダーによるシーン全体のレンダリングのコストに対して正規化される。例えば、メタノードにおけるMetaSLのステートメントの実行時間は、そのメタノードの合計実行時間、またはメタノードがグラフのメンバーの場合は、シェイダー全体の合計実行時間の百分率で表現できる。 Performance information at any particular level of detail is normalized to the overall performance cost of the node, i.e., the entire shader, or to the cost of rendering the entire scene by multiple shaders. For example, the execution time of a MetaSL statement in a metanode can be expressed as a percentage of the total execution time of that metanode or, if the metanode is a member of a graph, the total execution time of the entire shader.
性能結果のグラフによる表現は、複数の視覚化技術を使用して提供される。例えば、1つの技術は、正規化された性能コストを、百分率をカラー勾配にマッピングすることにより提示することである。
図12は、本発明のこの形態を示すスクリーンショット230を示している。MetaSLコードリスト232が、スクリーン230の中央に現れている。カラーバー234は、相対的な性能を示す各ステートメント232の左に現れている。最初の10パーセントの点は、青の勾配にマップされ、残りの90パーセントの点は、赤の勾配にマップされる。このような非線形マッピングを使用すると、ユーザーの注意を、そのMetaSLコードにおける「ホットスポット」に集中させることができる。更に、ユーザーは、勾配からカラーを選択するために使用される特別な数値にアクセスできる。ユーザーがマウスをカラーバー全体上で掃引すると、ポップアップがステートメントの実行時間を、合計実行時間の百分率として表示する。
A graphical representation of performance results is provided using multiple visualization techniques. For example, one technique is to present normalized performance costs by mapping percentages to color gradients.
FIG. 12 shows a screenshot 230 illustrating this aspect of the invention. A MetaSL code list 232 appears in the center of the screen 230. A color bar 234 appears to the left of each statement 232 indicating relative performance. The first 10 percent points are mapped to the blue slope and the remaining 90 percent points are mapped to the red slope. Using such a non-linear mapping, the user's attention can be focused on “hot spots” in the MetaSL code. In addition, the user has access to special numerical values used to select a color from the gradient. As the user sweeps the mouse over the color bar, a pop-up displays the statement execution time as a percentage of the total execution time.
シェイダーがアニメーションの一部の場合は、その性能特性は、シーンをレンダリングする全体コストが時間と共に変化するか、またはシェイダーそれ自身が時間の関数のために、時間と共に変化する。性能結果のグラフによる表現は、これらの変化を性能プロフィール(profile)に反映するために、アニメーションの進行と共に更新される。図12のスクリーン230において、コードの各ステートメント232に隣接するカラーバー234は、アニメーションが再生されるに従って、測定された性能の変化を反映するために変化する。 If the shader is part of an animation, its performance characteristics will change over time, either because the overall cost of rendering the scene will change over time, or because the shader itself is a function of time. The graphical representation of performance results is updated as the animation progresses to reflect these changes in the performance profile. In the screen 230 of FIG. 12, the color bar 234 adjacent to each statement 232 of the code changes to reflect the measured performance change as the animation is played.
図13は、別の視覚化技術を示す性能グラフ240を示している。グラフ240は、特別な入力パラメータの値の範囲に対する性能結果を表示している。この例において、シェイダーの照明ループの性能コストは、シーンにおける照明の数に対してグラフ化されている。この例において、性能コストにおけるジャンプは、シェイダーを、グラフィックハードウェアの制約条件を満たすために、パスに分解しなければならない点を示している。 FIG. 13 shows a performance graph 240 illustrating another visualization technique. The graph 240 displays performance results for a range of values for special input parameters. In this example, the performance cost of the shader lighting loop is graphed against the number of lights in the scene. In this example, the jump in performance cost indicates that the shader must be broken down into paths in order to meet the graphics hardware constraints.
メンタルミルはまた、性能結果を表形式で表示できる。図14は表250を示し、フェノメノンの各ノードの性能タイミングが、シェイダー全体の全体の性能コストに関して表示されている。
メンタルミルの他の特徴のような、メンタルミルによるグラフィカルプロファイリング技術は、プラットフォームに依存しない。これは、性能タイミングが、任意のサポートされている目標プラットフォームに対して生成できることを意味している。新しいプラットフォームが登場するにつれて、メンタルミルコンパイラへの新しいバックエンドプラグインが提供され、これらの新しいプラットフォームは、同じようにプロファイルできる。しかし、いかなる特別なタイミングも、ある選択された目標プラットフォームに関して測定される。例えば、同じシェイダーを、ハードウェア対ソフトウェア上で、または異なるハードウェアプラットフォーム上で実行するときにプロファイルできる。異なるプラットフォームは、個々の特性を有し、そのため、特別なシェイダーの性能プロファイルは、プラットフォームを比べると大変異なって見えることもある。シェイダーの作成者が、異なるプラットフォーム上でシェイダーを分析する能力は、すべてのターゲットプラットフォーム上での相当な性能で実行されるシェイダーを開発するためには重要である。
The mental mill can also display performance results in tabular form. FIG. 14 shows a table 250 in which the performance timing of each Phenomenon node is displayed with respect to the overall performance cost of the entire shader.
Graphical profiling techniques with mental mills, like other features of mental mills, are platform independent. This means that performance timing can be generated for any supported target platform. As new platforms emerge, new back-end plug-ins to the mental mill compiler are provided, and these new platforms can be profiled in the same way. However, any special timing is measured for a selected target platform. For example, the same shader can be profiled when running on hardware versus software, or on a different hardware platform. Different platforms have individual characteristics, so the performance profile of a special shader may look very different when comparing platforms. The ability of shader creators to analyze shaders on different platforms is important for developing shaders that run with considerable performance on all target platforms.
図15は、メンタルミルのライブラリ構成要素260の図を示す。メンタルミルのライブラリ構成要素260は、2つの主要なカテゴリに分割される。それはグラフィカルユーザーインタフェース(GUI)ライブラリ270とコンパイラライブラリ280である。GUIライブラリ270は、下記の構成要素を含む。それは、フェノメノングラフエディタ271、シェイダーパラメータエディタ272、レンダープレビューウィンドウ273、フェノメノンライブラリエクスプローラ274、メタノードライブラリエクスプローラ275、およびコードエディタとIDE276である。コンパイラライブラリ280は、下記の構成要素を含む。それは、MetaSL言語コンパイラ281と、フェノメノンフェノメノンシェイダーグラフ・コンパイラ282である。 FIG. 15 shows a diagram of a mental mill library component 260. The mental mill library component 260 is divided into two main categories. They are a graphical user interface (GUI) library 270 and a compiler library 280. The GUI library 270 includes the following components. The Phenomenon Graph Editor 271, Shader Parameter Editor 272, Render Preview Window 273, Phenomenon Library Explorer 274, Metanode Library Explorer 275, and Code Editor and IDE 276. The compiler library 280 includes the following components. They are the MetaSL language compiler 281 and the Phenomenon Phenomenon shader graph compiler 282.
図16は、コンパイラライブラリ280の、より詳細な図を示している。メンタルミル・コンパイラ・ライブラリ280は、MetaSLシェイダーを、特別なプラットフォーム、または同時に複数のプラットフォームを目標にしたシェイダーにコンパイルする機能を提供する。コンパイラライブラリ280はまた、フェノメノンを平坦なモノリシックシェイダーに実装するシェイダーグラフをコンパイルする機能も提供する。シェイダーグラフを単一のシェイダーに平坦化することにより、シェイダーからシェイダーへのコールのオーバーヘッドはほぼゼロにまで減少する。これにより、小さなシェイダーノードから構築されたグラフが、それほどのオーバーヘッドを負担することなく効率的に使用できるようになる。 FIG. 16 shows a more detailed view of the compiler library 280. The mental mill compiler library 280 provides the ability to compile MetaSL shaders into special platforms or shaders targeted to multiple platforms simultaneously. The compiler library 280 also provides the ability to compile shader graphs that implement Phenomenon on a flat monolithic shader. By flattening a shader graph into a single shader, the overhead of call from shader to shader is reduced to nearly zero. This allows a graph constructed from small shader nodes to be used efficiently without incurring much overhead.
本発明の更なる形態によれば、メンタルイメージの次世代レンダラー(renderer)と、リアリティサーバー(Reality Server)(登録商標)は、MetaSLおよびモノリシックC++シェイダーに基づくことになる。この目的のため、それらは、MetaSLシェイダーおよびフェノメノンからの、実行可能なC++およびハードウェアシェイダーコードを生成するMetaSLコンパイラのコピーを含む。図17は、本発明のこの形態によるレンダラー290の図を示している。 According to a further aspect of the invention, the mental image next generation renderer and Reality Server (R) will be based on MetaSL and monolithic C ++ shaders. For this purpose, they include a copy of the MetaSL compiler that generates executable C ++ and hardware shader code from MetaSL shaders and Phenomenon. FIG. 17 shows a diagram of a renderer 290 according to this aspect of the invention.
図17の構成において、MetaSLも、また他のシェイダーコードもエクスポートされていない。すべての言語のパスがこの図に示されているが、典型的なレンダラーは、底部に示されている5つのレンダリングユニットすべては使用しないことに注意されたい。典型的には、最も適切な2つ(1つのソフトウェアと1つのハードウェア)しか一度には使用されない。 In the configuration of FIG. 17, neither MetaSL nor other shader codes are exported. Note that all language paths are shown in this figure, but a typical renderer does not use all five rendering units shown at the bottom. Typically, only the two most appropriate (one software and one hardware) are used at a time.
MetaSLコンパイラの拡張性により、複数の目標プラットフォームとシェイディング言語がサポートされる。新しい目標は、将来、それが登場したときにサポートできる。この拡張性は、コンパイラのバックエンドへのプラグインにより達成される。MetaSLコンパイラは、多くの処理を扱い、バックエンドプラグインに対し、高いレベルのシェイダーの表現を提供し、それをシェイダーコードの生成に使用できる。MetaSLコンパイラは、現在は、高いレベルの言語を目標にするが、GPUを直接目標にし、高いレベルの表現からマシンコードを生成する可能性もある。これにより、コードジェネレータが、この高いレベルの表現から直接作動し、固有のコンパイラを避けるということのみのために利用できる固有の最適化の利点を利用することが、特別なハードウェアにとって可能になるであろう。 MetaSL compiler extensibility supports multiple target platforms and shading languages. New goals can be supported when they appear in the future. This extensibility is achieved by plug-ins to the compiler backend. The MetaSL compiler handles a lot of processing and provides the back-end plug-in with a high-level shader representation that can be used to generate shader code. The MetaSL compiler currently targets high-level languages, but may directly target the GPU and generate machine code from high-level representations. This allows code generators to work directly from this high level representation and take advantage of the inherent optimizations that are available only to avoid native compilers. Will.
メンタルミルGUIライブラリは、洗練されたシェイダーグラフおよびフェノメノンの構築のための、直感的な、使い易いインタフェースを提供する。ライブラリは、構成要素化され、プラットフォームに依存しない方法で実現され、UI構成要素のいくつか、またはすべてをサードパーティアプリケーションに統合することが可能になる。
スタンドアロンのフェノメノンクリエータアプリケーションもまた提供され、それは、直接他のアプリケーションへの統合に利用できる同じGUIを利用する。
The mental mill GUI library provides an intuitive, easy-to-use interface for building sophisticated shader graphs and phenomena. The library is componentized and implemented in a platform independent manner, allowing some or all of the UI components to be integrated into a third party application.
A standalone Phenomenon Creator application is also provided, which utilizes the same GUI that can be used directly for integration into other applications.
ライブラリにより提供される主要なGUI構成要素は次の通りである。
・フェノメノングラフエディタ−グラフエディタは、シェイダーグラフを、入力をメタノードの出力に接続することにより構築できるようにする。
・シェイダーパラメータエディタ−パラメータエディタは、シェイダーノード入力のためのパラメータ値を設定するための直感的なユーザーインタフェースコントロールを提供する。
The main GUI components provided by the library are:
Phenomenon graph editor-The graph editor allows shader graphs to be constructed by connecting inputs to metanode outputs.
Shader Parameter Editor—The parameter editor provides intuitive user interface controls for setting parameter values for shader node input.
・レンダープレビューウィンドウ−プレビューウィンドウは、シェイダーグラフを構築し、シェイダーパラメータを編集するときに、ユーザーへの対話的フィードバックを提供する。
・フェノメノンライブラリエクスプローラ−ユーザーが前もって構築されたフェノメノンのライブラリを閲覧することを可能にする。ユーザーは、自分自身のシェイダーグラフをライブラリに追加し、その内容を構成することができる。
Render preview window—The preview window provides interactive feedback to the user when building a shader graph and editing shader parameters.
• Phenomenon Library Explorer-allows users to browse pre-built Phenomenon libraries. Users can add their own shader graphs to the library and configure their contents.
・メタノードライブラリエクスプローラ−メタノードライブラリは、ユーザーが、シェイダーグラフを構築するために使用できる、メタノードのツールボックスを提供する。新しいメタノードは、MetaSLコードを書くことにより作成され、ライブラリに追加できる。
・コードエディタとIDE−コードエディタと統合開発環境(IDE)は、新しいメタノードとモノリシックMetaSLシェイダーが、GUIで直接書けるようにする。ユーザーがMetaSLコードを書くと、そのコードは自動的にコンパイルされて、その結果は、シェイダーのグラフおよびプレビューウィンドウで即座に見ることができる。対話的な、視覚に基づくデバッガにより、ユーザーがMetaSLコードを段階的に進むことが可能になり、変数の値を調べることができるようになる。メンタルミルのGUIを介して、ユーザーは、特別なピクセル位置において、変数の特別な数値を知ることができ、その変数が取りえる複数の値を、オブジェクトの表面上で調べることができる。
Metanode Library Explorer-The Metanode Library provides a metanode toolbox that users can use to build shader graphs. New metanodes can be created by writing MetaSL code and added to the library.
Code editor and IDE-Code editor and integrated development environment (IDE) allow new metanodes and monolithic MetaSL shaders to be written directly in the GUI. When the user writes MetaSL code, the code is automatically compiled and the results can be immediately viewed in the shader graph and preview window. An interactive, visual-based debugger allows users to step through MetaSL code and examine variable values. Through the mental mill GUI, the user can know a particular numerical value of a variable at a particular pixel location, and can examine multiple values that the variable can take on the surface of the object.
フェノメノングラフエディタは、ユーザーが、マウスでクリックしてドラッグすることにより、ノードを置いて、それを一緒にグラフを形成するために付加することにより、シェイダーとフェノメノンを構築することを可能にする。広範囲にわたるツールセットは、このタスクにおいてユーザーを支援し、複雑なシェイダーグラフを容易にナビゲートし、維持することを可能にする。図18は、グラフ・エディタ・ユーザー・インタフェース300の図を示している。 The Phenomenon Graph Editor allows the user to build shaders and Phenomenons by clicking and dragging with the mouse to place nodes and add them together to form a graph. An extensive toolset assists the user in this task and makes it easy to navigate and maintain complex shader graphs. FIG. 18 shows a diagram of the graph editor user interface 300.
グラフノードは、詳細の種々のレベルで表現されており、ユーザーがその全体のグラフの大きな図を得るためにズームアウトし、任意の特別なノードの詳細のすべてを見るためにズームインすることが可能なる。
シェイダーグラフの部分は、閉じたときに単一のノードのように見えるフェノメノンに組み込むことができる。これにより、ユーザーが、サブグループを単一ノードにグループ化することにより、多くのノードの大きな複雑なグラフにより首尾よく対処できるようになる。フェノメノンは開くことができ、それにより、ユーザーはその内部グラフを編集できる。
Graph nodes are represented at various levels of detail, allowing the user to zoom out to get a large view of its entire graph and zoom in to see all of the details of any particular node Become.
The portion of the shader graph can be incorporated into a Phenomenon that looks like a single node when closed. This allows the user to successfully deal with large complex graphs of many nodes by grouping subgroups into a single node. Phenomenon can be opened so that the user can edit its internal graph.
シェイダーグラフ内の各ノードは、グラフのその点におけるシェイダーの状態を示すプレビューウィンドウを有している。これは、シェイダーの作成のための視覚化デバッグ機構を提供する。ユーザーは、グラフのデータフローに従うことができ、各ノードにおいて、それまでの結果を見ることができる。一瞥して、ユーザーは、シェイダーの構築の視覚表現を見ることができる。 Each node in the shader graph has a preview window that shows the state of the shader at that point in the graph. This provides a visualization debugging mechanism for the creation of shaders. The user can follow the data flow of the graph and see the results so far at each node. At first glance, the user can see a visual representation of the shader's construction.
図19から図22は、一連のスクリーンショット310、320、330、340、および350を示し、メンタルミルのフェノメノングラフエディタと、統合されたMetaSLグラフィカルデバッガを示している。
図24は、シェイダーパラメータエディタ360の図を示している。パラメータエディタ360は、ユーザーが、シェイダーとフェノメノンパラメータのための特別な値を設定することを可能にする。新しいシェイダータイプを作成するときに、これは、ユーザーが、そのタイプの将来のインスタンスのためのデフォルトのパラメータ値を指定することを可能にする。
FIGS. 19-22 show a series of screenshots 310, 320, 330, 340, and 350 showing the mental mill Phenomenon graph editor and an integrated MetaSL graphical debugger.
FIG. 24 shows a diagram of the shader parameter editor 360. The parameter editor 360 allows the user to set special values for shader and phenomenon parameters. When creating a new shader type, this allows the user to specify default parameter values for future instances of that type.
パラメータビューの内部から付加することができ、ユーザーは、1つのノードから他のノードへ、このビュー内で取付けパスを辿ることができる。これは、ある状況においては有効な、シェイダーグラフの作成と編集のための代替の方法を提供する。
サイズ変更可能レンダープレビューウィンドウは、ユーザーが、シェイダーの結果を対話的に視覚化することを可能にする。このプレビューウィンドウは、レイトレーシングおよび大域照明のような、高度なレンダリングアルゴリズムを含む、高品質ソフトウェアレンダリング結果と共に、シェイダーのリアルタイムなハードウェア加速化プレビューを提供できる。
It can be added from within the parameter view and the user can follow the attachment path in this view from one node to another. This provides an alternative method for creating and editing shader graphs that is useful in some situations.
A resizable render preview window allows the user to interactively visualize the shader results. This preview window can provide a real-time hardware-accelerated preview of the shader along with high quality software rendering results, including advanced rendering algorithms such as ray tracing and global illumination.
フェノメノン/メタノード・ライブラリ・エクスプローラ・ビューは、ユーザーがフェノメノンとメタノードの集積体を閲覧および構成することを可能にする。図25Aは、サムネールビュー370を示し、図25Bは、リストビュー380を示している。新しいノードを現在のグラフ中に、これらのライブラリの1つから作成するために、ユーザーは単に、ノードをドラッグし、グラフの中にドロップする。 The Phenomenon / Metanode Library Explorer View allows users to browse and configure Phenomenon and Metanode collections. FIG. 25A shows a thumbnail view 370 and FIG. 25B shows a list view 380. To create a new node in the current graph from one of these libraries, the user simply drags the node and drops it into the graph.
ライブラリは、組織化のために、格納およびカテゴリ化できる。ユーザーは、ライブラリをリストビュー、またはアイコンビューで見ることができ、各ノードの機能を示すサンプルの寄せ集めを見ることができる。
コードエディタは、ユーザーが、MetaSLコードを書くことにより新しいメタノードを制作することを可能にする。コードエディタは、メンタルミルGUIの残りに統合され、それにより、ユーザーは、シェイダーコードを編集し、ユーザーインタフェースの残りは、相互に更新して、その変更を反映する。
Libraries can be stored and categorized for organization. Users can see the library in list view or icon view and see a collection of samples that show the function of each node.
The code editor allows users to create new metanodes by writing MetaSL code. The code editor is integrated into the rest of the mental mill GUI so that the user edits the shader code and the rest of the user interface updates each other to reflect the changes.
図26は、コードエディタとIDEビュー390を示している。コードエディタもまたメンタルミルコンパイラに統合される。ユーザーがシェイダーコードを編集すると、コンパイラから対話的なフィードバックを受け取る。コンパイラからのエラーまたは警告は、このビューにおいてユーザーに、そのエラーまたは警告の原因となるコードの部分を強調表示するオプションを含んで提示される。 FIG. 26 shows the code editor and IDE view 390. The code editor is also integrated into the mental mill compiler. When the user edits the shader code, you receive interactive feedback from the compiler. Errors or warnings from the compiler are presented to the user in this view with an option to highlight the part of the code that causes the error or warning.
メンタルミルのMetaSLデバッガは、ユーザーに、該当するシェイダーノードのためのMetaSLコードを含むソースコードリストを提供する。そして、ユーザーは、シェイダーの命令を段階的に進むことができ、プログラムの実行中を通して変化するときの変数の値を調べることができる。しかし、ユーザーに単一の数値を単に提供する代わりに、デバッガは、同時に複数の値を、オブジェクトの表面上にマップされたカラーとして表示する。 The mental mill MetaSL debugger provides the user with a source code listing containing the MetaSL code for the appropriate shader node. The user can then step through the shader's instructions and examine the value of the variable as it changes throughout the execution of the program. However, instead of simply providing the user with a single numeric value, the debugger displays multiple values simultaneously as a color mapped onto the surface of the object.
変数の値を、単一の数字ではなく、1つのイメージとして表現することは、いくつかの利点がある。第1に、ユーザーは、変数の値を駆動している関数の特性を即座に認識でき、間違って作動している領域を見つけることができる。例えば、表面を通しての、変数の変化率は、表面に亘って、カラーがどのように変化しているかを観察することにより、直感的な方法で見ることができる。ユーザーが、シェイダーを一度に1ピクセルデバッグするという従来の方法を使用していれば、これは、認識することは難しい。 Representing the value of a variable as a single image rather than a single number has several advantages. First, the user can immediately recognize the characteristics of the function driving the value of the variable and find the area that is operating incorrectly. For example, the rate of change of a variable through the surface can be seen in an intuitive manner by observing how the color is changing across the surface. This is difficult to recognize if the user is using the traditional method of debugging shaders one pixel at a time.
ユーザーはまた、視覚化デバッグパラダイムを使用して、望ましくない結果をもたらす入力条件を迅速に突き止めることができる。シェイダーのバグは、ある入力パラメータが特別な値を取ったときだけに現れ、そのような状況は、幾何学図形の表面の特別な部分でしか起きない。メンタルミルのデバッガは、ユーザーがマウスを使用して三次元空間をナビゲートして、問題の兆候である表面上の位置の周りの図を見つけて視界をそこに向けさせることを可能にする。 The user can also use the visualization debug paradigm to quickly locate input conditions that produce undesirable results. Shader bugs appear only when certain input parameters take special values, and such situations only occur in special parts of the geometric surface. The mental mill debugger allows the user to navigate through the three-dimensional space using the mouse to find a picture around a location on the surface that is an indication of the problem and direct the view there.
従来のデバッグ技術は、ユーザーが1行ずつプログラムを進み、各ステートメントにおけるプログラムの状態を調べることを可能にする。典型的に、ユーザーは1行または2行以上ずつ先に(プログラムの実行の方向)段階的に進むことしかできないが、任意のステートメントにジャンプすることは一般的にはプログラムを再スタートさせることが必要である。 Conventional debugging techniques allow the user to go through the program line by line and examine the state of the program at each statement. Typically, the user can only step forward by one or more lines (in the direction of program execution), but jumping to any statement can generally restart the program. is necessary.
メンタルミルのMetaSLデバッガは、ユーザーが任意の順番で、シェイダーコード内の任意のステートメントへのジャンプを可能にする。この特徴の特に素晴らしい面の1つは、コードステートメントが、関心対象の変数の値を修正するときである。シェイダーのライターは、このステートメントの前後に容易に進むことができ、ステートメントが実行される前および後で、変数の値を交換することができる。これにより、ユーザーが、変数の値についての任意の特別なステートメントの効果を分析することがより容易になる。 The mental mill MetaSL debugger allows the user to jump to any statement in the shader code in any order. One particularly nice aspect of this feature is when code statements modify the value of a variable of interest. A shader writer can easily proceed before and after this statement and can exchange the values of variables before and after the statement is executed. This makes it easier for the user to analyze the effect of any special statement on the value of the variable.
変数の値を、オブジェクトの表面上にマップされたカラーとして表示することは、変数がカラータイプのときは良好に機能することは明白である。この方法もまた、スカラーおよびベクトル値(3つ以下の構成要素)に対して相当に機能するが、値は、正規なカラーを出すためには、0−1の範囲でマップしなければならない。メンタルミルのUIは、ユーザーが、それらの値をカラーにマップするために使用される、スカラーとベクトルの範囲を指定することを可能にする。または、メンタルミルは、任意の所与の視点に対して、その視点から見たときの、表面上の変数の最小および最大値を決定することにより、範囲を自動的に計算することができる。 Obviously, displaying the value of a variable as a color mapped on the surface of the object works well when the variable is of color type. This method also works fairly well for scalar and vector values (less than 3 components), but the values must be mapped in the range 0-1 to produce a normal color. The mental mill UI allows the user to specify the range of scalars and vectors that will be used to map those values to colors. Alternatively, the mental mill can automatically calculate the range for any given viewpoint by determining the minimum and maximum values of the variables on the surface when viewed from that viewpoint.
変数を、オブジェクトの表面上にマップされたカラーとして見ることに加えて、ユーザーは、メンタルミルにより提供される、他の視覚化技術を利用することができる。ベクトル値に対する1つのそのような技術は、ユーザーが、オブジェクトの表面上を、マウスを掃引することを可能にし、メンタルミルのデバッガは、表面上のその位置における変数により指定される方向を指し示す矢印を描く。デバッガはまた、マウスにより選択できる、またはユーザーがピクセル座標を提供することにより指定できるピクセル位置における変数に対する数値を表示する。この技術は、図27A−Cに示され、それは、一連のスクリーンイメージ400、410、420であり、イメージの表面において、マウスの異なる位置に対応して表示されている。 In addition to viewing the variable as a color mapped on the surface of the object, the user can take advantage of other visualization techniques provided by the mental mill. One such technique for vector values allows the user to sweep the mouse over the surface of the object and the mental mill debugger will point to the direction specified by the variable at that position on the surface. Draw. The debugger also displays numerical values for variables at pixel locations that can be selected with the mouse or specified by the user by providing pixel coordinates. This technique is illustrated in FIGS. 27A-C, which are a series of screen images 400, 410, 420 displayed on the surface of the image corresponding to different positions of the mouse.
メンタルミルのシェイダーデバッガは、メンタルミルのプラットフォーム非依存性の別の利点を示す。デバッガは、ハードウェアまたはソフトウェアモードで作動でき、いかなる特別なレンダリングアルゴリズムまたはプラットフォームとは独立して作動する。シェイダーデバッガが、メンタルミルのフェノメノン作成環境にしっかりと統合されているという事実は、作成/テストサイクルを更に減少し、シェイダーの作成者が、プラットフォーム依存性から隔離されて、高いレベルで作業を続けることを可能にする。 The mental mill shader debugger demonstrates another advantage of mental mill platform independence. The debugger can operate in hardware or software mode and operates independently of any special rendering algorithm or platform. The fact that the shader debugger is tightly integrated into the mental mill Phenomenon creation environment further reduces creation / test cycles and keeps shader creators working at a high level, isolated from platform dependencies. Make it possible.
メンタルミルのGUIライブラリは、プラットフォーム非依存の方法で実現される。シェイダーグラフエディタの構成要素は、グラフィックAPIを使用して、複雑なシェイダーグラフを編集するときにスムーズな性能を保証する。グラフィック抽象層は、いかなる特別なAPIに対する依存性も回避する。例えば、あるアプリケーションは、OpenGLよりもDirectXを使用することを望み、それにより、アプリケーションもまたDirectXを使用するときの統合問題を簡素化する。 The mental mill GUI library is implemented in a platform-independent manner. The shader graph editor component uses a graphics API to ensure smooth performance when editing complex shader graphs. The graphic abstraction layer avoids any dependency on any special API. For example, some applications want to use DirectX over OpenGL, which also simplifies integration issues when applications also use DirectX.
GUIの残りもまた抽象層を使用して、いかなる特別なプラットフォームオペレーティングシステムのユーザーインタフェースライブラリへの依存性を回避する。図28は、本発明のこの形態によるGUIライブラリアーキテクチャ430の図を示している。図28は、これらの抽象層が、どのようにして、アプリケーションおよびメンタルミルのユーザーインタフェースを、プラットフォーム依存性から隔離するかを示している。 The rest of the GUI also uses an abstraction layer to avoid dependencies on any special platform operating system user interface libraries. FIG. 28 shows a diagram of a GUI library architecture 430 according to this aspect of the invention. FIG. 28 illustrates how these abstraction layers isolate the application and mental mill user interface from platform dependencies.
メンタルミルのGUI構成要素をサードパーティのアプリケーションに統合するときに、構成要素のルック&フィールを、ホストアプリケーションの標準により良く合わせるようにカスタマイズできる。これは、特別なカラーまたはフォントを使用して、純粋に表面的なカスタマイゼーションを含むことができ、または、ユーザーが相互作用することにより、構成要素の外観とその動作をカスタマイズすることを含むことができる。 When integrating mental mill GUI components into third-party applications, the look and feel of the components can be customized to better match the standards of the host application. This can involve purely superficial customization, using special colors or fonts, or can include customizing the appearance of the component and its behavior by user interaction. it can.
下記は、メンタルミルのGUIライブラリがカスタマイゼーションを可能にする方法である。
・フェノメノングラフ外観−メタノードおよび接続線のような、フェノメノングラフの構成要素は、プラグインコールバック機能を起動することで描かれる。デフォルトの描画機能が提供される。しかし、サードパーティもまた自分自身の機能を提供して、シェイダーグラフの外観をより良くそのアプリケーションに合わせるようにカスタマイズすることもできる。コールバック機能もまた、ノードの構成要素を異なる位置に配置できるので、マウス・ポイント・ヒット・テスティングを扱う。
Below is how the mental mill GUI library allows customization.
Phenomenon graph appearance—Phenomenon graph components, such as metanodes and connecting lines, are drawn by invoking a plug-in callback function. A default drawing function is provided. However, third parties can also provide their own functionality and customize the appearance of the shader graph to better match the application. The callback function also handles mouse point hit testing because the components of the node can be placed at different locations.
・キーボードショートカット−すべてのキーボードコマンドは、再配置可能である。
・マウス動作−マウスボタンのマッピングのようなマウス動作はカスタマイズ可能である。
・ツールバーアイテム−各ツールバーアイテムは省略または含めることができる。
・ビューウィンドウ−各ビューウィンドウは、他のウィンドウへ依存することなく、それ自身で作動できるように設計されている。これにより、サードパーティは、フェノメノングラフビューだけを、例えば、それ自身のアプリケーションに統合できる。各ビューウィンドウは、APIにより駆動でき、それによりサードパーティが、ビューウィンドウのいくつかを自分自身のユーザーインタフェースと置き換えることにより、ビューウィンドウの任意の組み合わせを含むことができるようになる。
• Keyboard shortcuts-All keyboard commands are relocatable.
• Mouse movements-Mouse movements like mouse button mapping can be customized.
Toolbar item—Each toolbar item can be omitted or included.
View windows-Each view window is designed to operate on its own without depending on other windows. This allows third parties to integrate only the Phenomenon graph view into their own application, for example. Each view window can be driven by an API, allowing third parties to include any combination of view windows by replacing some of the view windows with their own user interface.
メンタルミルシェイディング言語−MetaSLは、簡単、直感的で、かつ、メンタルミルによりサポートされるプラットフォームの広い範囲に対して要求されるシェイダーの全体スペクトルを表現するためには十分な表現性を備えている。
MetaSL言語は、一般的に、プログラミング言語と共に、他の標準シェイディング言語に見られる概念を使用する。しかし、MetaSLは、効率的なシェイダープログラミング用に設計されている。他の言語に精通しているユーザーは、MetaSLを素早く習得できるであろうし、一方、プログラミング技術の専門知識がないユーザーは、その読み易さのために、MetaSLシェイダーの多くの部分を理解できると思われる。
Mental Mill Shading Language-MetaSL is simple, intuitive, and expressive enough to represent the entire shader spectrum required for a wide range of platforms supported by mental mill .
The MetaSL language generally uses concepts found in other standard shading languages along with programming languages. However, MetaSL is designed for efficient shader programming. Users familiar with other languages will be able to learn MetaSL quickly, while users without programming skills expertise will understand many parts of the MetaSL shader because of its readability. Seem.
ここで、MetaSLの機能的な概観を述べる。
シェイダークラス−MetaSLシェイダークラス宣言は、シェイダーの外部とのインタフェースを記述する。シェイダー宣言は、他のメンバー変数と共に、入力および出力パラメータの指定を含む。
シェイダー宣言は、シェイダーのエントリポイント、mainと称されるメソッドの宣言を含む。更に、オプションのeventメソッドは、シェイダーがイベントの開始および終了に対応することを可能にする。
Here is a functional overview of MetaSL.
Shader class—The MetaSL shader class declaration describes the interface to the outside of the shader. Shader declarations, along with other member variables, include specification of input and output parameters.
A shader declaration includes a declaration of a method called a shader entry point, main. In addition, an optional event method allows shaders to respond to the start and end of events.
シェイダークラスは、他のメンバー変数およびメソッドの宣言も含むことができる。他のメンバー変数は、シェイディング計算により使用されるデータを保持でき、シェイダーのeventメソッドから初期化できる。他のmemberメソッドは、シェイダーのmainメソッドまたはeventメソッドによりコールされる、helperメソッドとして機能できる。
下記は、例としてのシェイダー宣言である。
A shader class can also contain declarations of other member variables and methods. Other member variables can hold data used by the shading calculation and can be initialized from the shader's event method. Other member methods can function as helper methods that are called by the shader's main or event methods.
The following is an example shader declaration.
shader Phong
{
input:
Color ambient;
Color diffuse;
Color specular;
Scalar shininess;
output:
Color result;
void main();
void event();
};
・MetaSLは、内蔵データタイプの幅広い範囲を提供する。
shader Phong
{
input:
Color ambient;
Color diffuse;
Color specular;
Scalar shininess;
output:
Color result;
void main ();
void event ();
};
MetaSL offers a wide range of built-in data types.
・Scalar−浮動小数点値
・Bool−ブーリアン
・String−文字列
・Color−カラー
・Vector−長さが2、3、または4のベクトルが提供される。更に、ブーリアンおよび整数のベクトルもまたはサポートされる。
-Scalar-Floating point value-Bool-Boolean-String-String-Color-Color-Vector-A vector of length 2, 3, or 4 is provided. In addition, boolean and integer vectors are also supported.
・Matrix−N×Mのサイズのマトリックスがサポートされ、NおよびMは2、3、または4。
・Texture−1d、2d、3d、および立体マップテクスチャタイプが提供される。
・Shader−シェイダー・インスタンス・データ・タイプ
ベクトルおよびマトリックスと作用する数学関数および演算子の標準セットが提供される。数学的演算子は、マトリックスおよびベクトルを乗算、除算、加算、および減算するためにサポートされる。これにより、下記のようなコンパクトで読み易い表現が可能になる。
Matrix-N × M size matrix is supported, where N and M are 2, 3, or 4.
• Texture-1d, 2d, 3d, and 3D map texture types are provided.
Shader—Shader instance data type A standard set of mathematical functions and operators that work with vectors and matrices is provided. Mathematical operators are supported for multiplying, dividing, adding, and subtracting matrices and vectors. Thereby, the following compact and easy-to-read expressions are possible.
Vector3 result = pt + v*mat;
スウィズリング(swizzling)と称される概念もサポートされる。これにより、ベクトルの成分が、成分を同時に再整列または複製する間に読み込み、または書き込みが可能になる。例えば、
vect.yz
vectのyおよびz成分から構築される2dベクトルの結果になる。
Vector3 result = pt + v * mat;
A concept called swizzling is also supported. This allows the vector components to be read or written while simultaneously rearranging or replicating the components. For example,
vect.yz
The result is a 2d vector constructed from the y and z components of the vect.
vect.xxyy
vectのx成分が最初の2成分に割り当てられ、vectのy成分が最後の2成分に割り当てられた、4dベクトルの結果になる。
v1.yz=v2.xx
v2のx成分を、v1のyおよびz成分の両者に割り当てる。
vect.xxyy
The result is a 4d vector with the x component of vect assigned to the first two components and the y component of vect assigned to the last two components.
v1.yz = v2.xx
Assign the x component of v2 to both the y and z components of v1.
ベクトルタイプは、変換によりデータの損失がなければ、1つのタイプから別のタイプに暗黙的に変換される。Colorタイプは、主にコードの読み易さのために提供され、それ以外の場合は、Vector4と同義である。
MetaSLにより提供される内蔵タイプに加えて、カスタム構造タイプを定義できる。構造は、他の変数と共に、入力および出力パラメータの両者に対して使用できる。構造と内蔵タイプの両者は、配列として宣言できる。配列は、固定または動的サイズのいずれかを有することができる。配列要素は、括弧([])構文でアクセスされる。
Vector types are implicitly converted from one type to another if there is no data loss due to the conversion. The Color type is provided primarily for code readability, otherwise it is synonymous with Vector4.
In addition to the built-in types provided by MetaSL, you can define custom structure types. The structure can be used for both input and output parameters, along with other variables. Both structures and built-in types can be declared as arrays. The array can have either a fixed or dynamic size. Array elements are accessed with parenthesis ([]) syntax.
struct Texture_layer
{
Texture2d texture;
Scalar weight;
};
Texture_layer tex_layers[4];
この例は、カスタムタイプの固定長配列として宣言された変数を有するカスタム構造タイプを示している。
struct Texture_layer
{
Texture2d texture;
Scalar weight;
};
Texture_layer tex_layers [4];
This example shows a custom structure type with variables declared as a custom type fixed length array.
MetaSLは、シェイダーの実行の流れを制御する、よく知られたプログラミングコンストラクトをサポートする。具体的には、for; while; do, while: if, else; switch, caseがある。
シーン照明上での繰返し、およびその照明のまとめのタスクは、lightループおよびiteratorによりMetaSLで抽象化される。light iteratorのインスタンスが宣言され、foreachステートメントが各シーン照明上を繰り返す。ループ内では、light iterator変数が、各lightからの結果としての照明へのアクセスを提供する。
MetaSL supports well-known programming constructs that control the flow of shader execution. Specifically, there are for; while; do, while: if, else; switch, and case.
The task of iterating over scene lighting and summarizing that lighting is abstracted in MetaSL by light loops and iterators. An instance of light iterator is declared and the foreach statement repeats on each scene light. Within the loop, the light iterator variable provides access to the resulting lighting from each light.
Color diffuse_light(0,0,0,0);
Light_iterator light;
foreach (light){
diffuse_light += max(0, light.dot_nl) * light.color;
}
シェイダーのライターは、どの照明がシーンのどの部分に寄与するか、または所与の照明を何回サンプリングする必要があるかについて心配する必要はない。照明ループはそのプロセスを自動化する。
Color diffuse_light (0,0,0,0);
Light_iterator light;
foreach (light) {
diffuse_light + = max (0, light.dot_nl) * light.color;
}
A shader lighter does not have to worry about which lighting contributes to which part of the scene or how many times a given light needs to be sampled. The lighting loop automates the process.
シェイダーのmainメソッド内で、特別状態変数のセットが、暗黙的に宣言され、シェイダーコードが参照できるようになる。これらの変数は、シェイダーコールにつながる、インターセクション(intersection)についての情報と同様に、レンダラーの現在の状態の両者を記述する値を保持する。例えば、normalは、インターセクションの点における内挿された法線のことである。状態変数は、下記に詳細に記述される。 Within the shader's main method, a set of special state variables is implicitly declared so that shader code can be referenced. These variables hold values that describe both the renderer's current state, as well as information about the intersection that leads to the shader call. For example, normal is the interpolated normal at the intersection point. The state variables are described in detail below.
MetaSL内のlightとilluminationを取り扱う2つのコンストラクト(construct)がある。その1つは、BRDF(双方向反射配布関数)シェイダータイプであり、それにより、表面の照明モデルを、高度に効率的な方法で抽象化およびレンダリングできるようになる。または、ライトイテレータ(light iterator)は、各light内でシーン照明とサンプル上を繰り返すためのより伝統的なメソッドを提供する。 There are two constructs that handle light and illumination in MetaSL. One is the BRDF (Bidirectional Reflection Distribution Function) shader type, which allows surface illumination models to be abstracted and rendered in a highly efficient manner. Alternatively, a light iterator provides a more traditional method for iterating over scene lighting and samples within each light.
BRDFシェイダーアプローチは、いくつかの理由によりしばしばより好ましい。それは、別のフォトンシェイダーを作成する必要なく、効率的なサンプリングおよび大域照明を可能にする。一般的に単一のBRDFインプリメンテーション(implementation)は、異なるレンダリングアルゴリズムにより変更されないで使用できる。それは、シャドウレイ(shadow rays)をトレーシングするような、ある照明計算を実行する関数を、重要なレンダリング最適化を可能にする遅延した方法により容易にする。それはまた、分析および取得された照明モデルの統合した記述も提供する。 The BRDF shader approach is often preferred for several reasons. It allows efficient sampling and global illumination without having to create a separate photon shader. In general, a single BRDF implementation can be used unchanged by different rendering algorithms. It facilitates functions that perform certain lighting calculations, such as tracing shadow rays, with delayed methods that allow significant rendering optimization. It also provides an integrated description of the analysis and acquired lighting models.
MetaSLにおいて、BRDFは、ファースト・クラス・シェイダー・オブジェクトである。それらは、同じeventメソッドを通常シェイダーとして有する。しかし、mainメソッドの代わりに、いくつかの他のメソッドが、BRDFを実現するためには提供されなければならない。
図29は、BRDFシェイダーを実装するために要求されるメソッドを一覧表示する表440を示している。
In MetaSL, BRDF is a first class shader object. They have the same event method as a normal shader. However, instead of the main method, several other methods must be provided to implement BRDF.
FIG. 29 shows a table 440 that lists the methods required to implement a BRDF shader.
これらのメソッドにおけるin_dirおよびout_dirベクトルは、局所座標システムにより指定される。この座標システムは、表面法線によりz軸として定義され、xおよびy軸として接線ベクトルにより定義される。
BRDFは、shaderキーワードの代わりに、brdfキーワードが使用されることを除いて、通常のシェイダーのように宣言される。また、BRDFは、出力変数を有しないという事実により通常のシェイダーとは異なる。BRDFそれ自身は、それ自身の出力である。下記は、Phong BRDFに対する実施例である。
The in_dir and out_dir vectors in these methods are specified by the local coordinate system. This coordinate system is defined by the surface normal as the z-axis and by the tangent vector as the x and y axes.
BRDF is declared like a normal shader, except that the brdf keyword is used instead of the shader keyword. BRDF also differs from regular shaders due to the fact that it does not have an output variable. BRDF itself is its own output. The following is an example for Phong BRDF.
brdf Phong
{
input:
Color diffuse;
Color glossy;
Color specular;
Scalar exponent;
Color eval_diffuse(
Vector3 in_dir,
Vector3 out_dir)
{
return in_dir.z * out_dir.z < 0.0?
diffuse: Color(0, 0, 0, 0);
}
Color eval_glossy(
Vector3 in_dir,
Vector3 out_dir)
{
Vector3 r =Vector3(-in_dir.x, -in_dir.y, in_dir.z);
return pow(saturate(dot(r, out_dir)), exponent) * glossy;
}
Color eval_specular(
Vector3 in_dir,
Int specular_component,
out Vector3 out_dir,
out Ray_type out_type)
{
out_dir = Vector3(-in_dir.x,-in_dir.y, in_dir.z);
out_type = RAY_REFLECT;
return specular;
}
Int specular_components()
{
return 1;
}
};
表面シェイダーの組合わせと、直接および間接BRDFシェイダーの両者は、特別な表面に対するシェイディングを定義する。MetaSLは、表面シェイダーが、照明計算を実行するために使用できる2つの関数を供給する。それは、ある、またはすべての照明上をループして、与えられたBRDFを評価するdirect_lighting()と、大域照明から照明の寄与を計算するindirect_lighting()である。これらの2つの関数は、照明を、分離した拡散、光沢、および反射構成要素として計算し、その結果を、出力引数として、それらに渡された変数に格納する。
brdf Phong
{
input:
Color diffuse;
Color glossy;
Color specular;
Scalar exponent;
Color eval_diffuse (
Vector3 in_dir,
Vector3 out_dir)
{
return in_dir.z * out_dir.z <0.0?
diffuse: Color (0, 0, 0, 0);
}
Color eval_glossy (
Vector3 in_dir,
Vector3 out_dir)
{
Vector3 r = Vector3 (-in_dir.x, -in_dir.y, in_dir.z);
return pow (saturate (dot (r, out_dir)), exponent) * glossy;
}
Color eval_specular (
Vector3 in_dir,
Int specular_component,
out Vector3 out_dir,
out Ray_type out_type)
{
out_dir = Vector3 (-in_dir.x, -in_dir.y, in_dir.z);
out_type = RAY_REFLECT;
return specular;
}
Int specular_components ()
{
return 1;
}
};
Both surface shader combinations and direct and indirect BRDF shaders define shading for special surfaces. MetaSL provides two functions that surface shaders can use to perform lighting calculations. It is direct_lighting () that loops over some or all lighting and evaluates the given BRDF, and indirect_lighting () that calculates the lighting contribution from the global lighting. These two functions compute illumination as separate diffuse, glossy, and reflection components and store the results as output arguments in the variables passed to them.
void direct_lighting(
out Color diffuse,
out Color glossy,
out Color specular);
void indirect_lighting(
out Color diffuse,
out Color glossy,
out Color specular);
ほとんどの場合、出力パラメータとして照明関数に渡された変数は、ルート・サーフェス・シェイダー・ノードの実際の出力パラメータであってよい。言い換えると、照明関数へのコールはシェイダーの最終結果を生成する。これらの出力値への他の直接の依存性がない限り、レンダラーは、自由にその計算を遅らせることができ、それにより、重要な最適化が可能になる。
void direct_lighting (
out Color diffuse,
out Color glossy,
out Color specular);
void indirect_lighting (
out Color diffuse,
out Color glossy,
out Color specular);
In most cases, the variable passed to the lighting function as an output parameter may be the actual output parameter of the root surface shader node. In other words, a call to the lighting function produces the final shader result. As long as there are no other direct dependencies on these output values, the renderer is free to delay its computation, thereby allowing significant optimization.
別の可能性は、表面シェイダーの出力が、他のノードの入力に取り付けられるということである。これにより、照明関数の結果に、直接の依存性を課することになり、それは可能であるが、遅延された照明計算の可能性と、それと共にある潜在的な性能ゲインは除去される。
表面シェイダーの結果に依存性を課することを回避するために、表面シェイダーの出力によって実行されるはずであったほとんどの操作は、BRDFノードそれ自身に適用される。数学演算子の制限されたセットは、BRDFノードに適用できるが、これらは、通常は、最も普通の使用のケースを成し遂げるには十分である。これらの操作は、
・2つまたは3つ以上のBRDFを加える
・BRDFをスカラーまたはカラーで掛ける
・動的にBRDFをセットから選択する
である。
Another possibility is that the output of the surface shader is attached to the input of another node. This imposes a direct dependency on the result of the illumination function, which is possible, but eliminates the possibility of delayed illumination calculations and some potential performance gains with it.
To avoid imposing a dependency on the surface shader result, most operations that would have been performed by the output of the surface shader are applied to the BRDF node itself. A limited set of mathematical operators can be applied to BRDF nodes, but these are usually sufficient to achieve the most common use cases. These operations are
• Add 2 or more BRDFs • Multiply BRDF with scalar or color • Dynamically select BRDF from set
BRDFを、スカラーまたはカラーで縮小/拡大した後に加える機能は、BRDFノードにより表現された複数の照明ノードを混合することを可能にする。スカラーまたはカラー因子は、一定である必要はなく、例えば、2つのBRDFを、フレネル(Fresnel)減衰(falloff)のテクスチャの関数として混合するために、他のシェイダーの出力により駆動することができる。図30は、例としての構成450の図を示しており、2つのBRDFが混合される。 The ability to add BRDF after scaling / enlarging with a scalar or color makes it possible to mix multiple lighting nodes represented by BRDF nodes. The scalar or color factor need not be constant; for example, the two BRDFs can be driven by the output of another shader to mix as a function of the texture of the Fresnel falloff. FIG. 30 shows a diagram of an example configuration 450 where two BRDFs are mixed.
図30において、「Mix BRDF」ノードは、合成BRDFであり、その2つのBRDF入力を「amount」および「1-amount」それぞれで縮小/拡大することにより実現される。この例においては、「amount」パラメータは、2つのBRDFの混合を制御するテクスチャの出力に取り付けられる。Phong BRDFの鏡面反射は、フレネル減衰関数により減衰される。
材料フェノメノンは、それ自身はシェイダーグラフにより表現される表面シェイダーと共に、直接および間接BRDFシェイダーを収集する。表面シェイダーが照明関数を起動すると、材料フェノメノン内のBRDFシェイダーは、照明サンプル上を繰り返して、照明関数の結果を計算するために使用される。この場合、表面シェイダーの結果に対する依存性はないので、照明計算は、レンダラーにより最適時間まで遅延される。
In FIG. 30, a “Mix BRDF” node is a composite BRDF, which is realized by reducing / enlarging the two BRDF inputs by “amount” and “1-amount”, respectively. In this example, the “amount” parameter is attached to the output of the texture that controls the blending of the two BRDFs. The specular reflection of Phong BRDF is attenuated by the Fresnel attenuation function.
The material Phenomenon collects direct and indirect BRDF shaders, along with surface shaders that are themselves represented by shader graphs. When the surface shader activates the illumination function, the BRDF shader in the material Phenomenon is used to iterate over the illumination sample and calculate the result of the illumination function. In this case, since there is no dependency on the surface shader result, the illumination calculation is delayed to the optimal time by the renderer.
BRDFシェイダータイプは、Phongのような分析モデルにより表現されるBRDFの表現を、測定装置により生成されたデータにより表現される取得されたBRDFと統合する。direct_lighting()およびindirect_lighting()関数は、それらに与えられたBRDFの実現とは関係なく、このように、取得された、または分析BRDFと、同等に良好に作動する。
取得されたBRDFを表現する未処理データは、多数の異なる形式で提供でき、通常は疎であり、構造化されていない。典型的には、未処理データは、スタンドアロンユーティリティアプリケーションに与えられ、そこで前処理される。このアプリケーションは、データを規則的な格子に組織化し、データを分解し、および/またはデータをより実際的なサイズに圧縮することができる。データを浮動小数点テクスチャに格納することにより、測定されたBRDFは、ハードウェアシェイディングに使用できる。
The BRDF shader type integrates the BRDF representation represented by an analytical model such as Phong with the acquired BRDF represented by the data generated by the measuring device. The direct_lighting () and indirect_lighting () functions work equally well with acquired or analytic BRDFs, regardless of the BRDF implementation given to them.
The raw data representing the acquired BRDF can be provided in a number of different formats, usually sparse and unstructured. Typically, raw data is provided to a stand-alone utility application where it is preprocessed. This application can organize the data into a regular grid, decompose the data, and / or compress the data to a more practical size. By storing the data in a floating point texture, the measured BRDF can be used for hardware shading.
図31は、取得されたBRDFによるシェイディングのためのパイプライン460を示す図である。スタンドアロンユーティリティアプリケーションは、未処理BRDFデータを処理して、構造化データをXMLファイルに格納し、随意的に、バイナリファイルまたはテクスチャを参照して、実際のデータを保持する。XMLファイルは、データフォーマットと、関連するモデル、または分解の記述を提供する。次に、このファイルおよび関連するデータは、レンダリング時にBRDFシェイダーによりロードでき、BRDFを定義するために使用される。XMLファイルは、ユーザーに要求されると、更なる処理のためにユーティリティアプリケーションにフィードバックできる。 FIG. 31 is a diagram illustrating a pipeline 460 for shading using the acquired BRDF. A stand-alone utility application processes raw BRDF data, stores structured data in an XML file, and optionally references a binary file or texture to hold the actual data. The XML file provides a description of the data format and associated model or decomposition. This file and associated data can then be loaded by the BRDF shader at render time and used to define the BRDF. The XML file can be fed back to the utility application for further processing when requested by the user.
データを浮動少数点テクスチャに格納することにより、データに基づくBRDFが、ハードウェア内で作動することが可能になる。この場合、データを保持するテクスチャおよびデータモデルを記述する他のいかなるパラメータも、BRDFノードの明示されたパラメータとすることができる。
測定されたBRDFとのソフトウェアシェイディングに対しては、データをロードするための2つのオプションがある。最初の1つは、データをファイルから読み込む固有のC++関数を、配列に導入することである。次に、この固有の関数は、Level 2 MetaSL BRDFシェイダーによりコールできる。他のオプションは、BRDFシェイダー全体を、Level 3 MetaSLシェイダーとして導入することであり、それにより、シェイダーに、C++のすべての機能への完全なアクセスを与える。このシェイダーは、データファイルを直接読むことができるが、Level 2シェイダーの柔軟性を多少失うことになる。データが、配列のようなLevel 2互換表現にロードできる限り、データを固有のC++関数からロードする最初のオプションの方が好ましい。データがポインタ(kd−ツリーのような)を要求する構造により表現しなければならない場合は、ポインタの使用を必要とする実現の一部は、Level 3シェイダーであることが必要である。
By storing the data in a floating point texture, the BRDF based on the data can operate in hardware. In this case, the texture that holds the data and any other parameters that describe the data model can be explicit parameters of the BRDF node.
For software shading with measured BRDF, there are two options for loading data. The first one is to introduce a unique C ++ function into the array that reads the data from the file. This unique function can then be called by Level 2 MetaSL BRDF shaders. Another option is to introduce the entire BRDF shader as a Level 3 MetaSL shader, thereby giving the shader full access to all C ++ features. This shader can read the data file directly, but it loses some of the flexibility of the Level 2 shader. The first option to load data from a native C ++ function is preferred as long as the data can be loaded into a Level 2 compatible representation such as an array. If the data must be represented by a structure that requires a pointer (such as a kd-tree), some of the implementations that require the use of pointers need to be Level 3 shaders.
技術は、シェイダー実現の1つの変形例である。あるシェイダーが、単一の技術のみを必要としている場合があるが、複数の技術を導入することが所望される状況もある。言語は、シェイダー内に複数の技術を宣言する機構を提供する。
技術は、それがハードウェアまたはソフトウェア環境で異なるコードを実行することが所望される場合に使用できるが、同じシェイダーが、ハードウェアとソフトウェアの両者に使用できるということがよくある。技術の別の使用法は、同じシェイダーの交互のバージョンを異なる品質レベルで記述することである。
Technology is one variation of shader realization. Some shaders may need only a single technology, but there are situations where it is desirable to introduce multiple technologies. The language provides a mechanism for declaring multiple technologies within a shader.
The technique can be used when it is desired to execute different code in a hardware or software environment, but often the same shader can be used for both hardware and software. Another use of the technique is to describe alternate versions of the same shader with different quality levels.
技術はシェイダークラスにおいて宣言される。各技術は、mainメソッドおよびeventメソッドのそれ自身のバージョンを有しているが、パラメータと他のメンバー変数またはメソッドは、他の技術と共有している。
下記は、シェイダー内での技術宣言の例である。
Shader my_shader{
input:
Color c;
output:
Color result;
technique software{
void event(Event_type event);
void main();
}
technique hardware{
void event(Event_type event);
void main();
}
};
言語は、マテリアルシェイダーが、その結果を、単一のカラー値の代わりに、一連の成分として表現することを可能にする。これにより、格納される成分が、後の合成のためにイメージバッファーを分離することを可能にする。個々のパスは、すべての成分のサブセットのレンダリングを行ない、それらを、以前にレンダリングされた残りの成分と組み合わせることもできる。
Technology is declared in the shader class. Each technology has its own version of the main and event methods, but parameters and other member variables or methods are shared with other technologies.
The following is an example of a technical declaration within a shader.
Shader my_shader {
input:
Color c;
output:
Color result;
technique software {
void event (Event_type event);
void main ();
}
technique hardware {
void event (Event_type event);
void main ();
}
};
The language allows material shaders to express their results as a series of components instead of a single color value. This allows the stored components to separate the image buffer for later synthesis. Each pass may render a subset of all components and combine them with the remaining previously rendered components.
マテリアルシェイダーは、その結果を、各成分に対して分離した出力を宣言することにより成分に分解する。出力変数の名前は、現在のレンダリングの層の名前を規定する。
shader Material_shader{
input:
...
output:
Color diffuse_lighting;
Color specular_lighting;
Color indirect_lighting;
};
この例は、拡散、反射、および間接照明に対する3つの成分を指定するマテリアルシェイダーを示している。
The material shader breaks the result into components by declaring separate outputs for each component. The name of the output variable specifies the name of the current rendering layer.
shader Material_shader {
input:
...
output:
Color diffuse_lighting;
Color specular_lighting;
Color indirect_lighting;
};
This example shows a material shader that specifies three components for diffuse, reflective, and indirect illumination.
1つのシーンに、その結果を異なる層に分解する複数のマテリアルシェイダーが存在するときは、層の合計数は大きくなり得る。ユーザーは、これらの層のそれぞれに分離したイメージバッファーを割り当てることを望まないであろう。このシーン定義ファイルにおける機構は、ユーザーが、層をイメージバッファーに組み合わせるための合成規則を指定することを可能にする。ユーザーは、いくつのイメージバッファーを作成するかを指定し、各バッファーに対して、ピクセルのレンダリングが行なわれるときに、そのバッファーに置くカラーを決定する式を指定できる。式は、次のような、層の値の関数であってよい。 If a scene has multiple material shaders that break down the results into different layers, the total number of layers can be large. The user will not want to allocate a separate image buffer for each of these layers. This mechanism in the scene definition file allows the user to specify compositing rules for combining layers into an image buffer. The user can specify how many image buffers to create and, for each buffer, specify an expression that determines the color to put in that buffer when the pixel is rendered. The expression may be a function of the layer value as follows:
Imagel=indirect_lighting
Image2= diffuse_lighting + specular_lighting
この例において、以前の例におけるシェイダー結果構造からの3つの層は、2つのイメージバッファーへの経路が定められる。
シェイダーのユーザーがGUIでそれらと相互作用して、そのパラメータ値を設定するためには、アプリケーションは、シェイダーパラメータについてのある追加的情報と、シェイダーそれ自身を知る必要がある。MetaSLは、シェイダーパラメータ、技術、およびシェイダーそれ自身に、追加的メタデータにより注釈を付ける機能を提供する。
Imagel = indirect_lighting
Image2 = diffuse_lighting + specular_lighting
In this example, the three layers from the shader result structure in the previous example are routed to two image buffers.
In order for shader users to interact with them in the GUI and set their parameter values, the application needs to know some additional information about the shader parameters and the shader itself. MetaSL provides the ability to annotate shader parameters, techniques, and the shader itself with additional metadata.
シェイダーの注釈付けは、他の事項の中で、パラメータ範囲、デフォルト値、およびツールチップ説明を記述できる。カスタム注釈タイプを使用して、任意のデータをシェイダーに付加することもできる。
MetaSLは、内蔵関数の広範囲な集積体を含む。これらには、少し挙げると、数学、幾何学、およびテクスチャルックアップ関数などが含まれる。更に、ソフトウェアレンダリングプラットフォームによってのみサポートできる関数もまた含まれる。例としては、反射光線を空間の1点に投じる、または空間の1点における大域照明の量を計算する関数がある。
Shader annotation can describe parameter ranges, default values, and tooltip descriptions, among other things. You can also attach arbitrary data to the shader using a custom annotation type.
MetaSL includes an extensive collection of built-in functions. These include mathematics, geometry, and texture lookup functions, to name a few. In addition, functions that can only be supported by a software rendering platform are also included. An example is a function that casts a reflected ray to a point in space or calculates the amount of global illumination at a point in space.
B.メンタルミルGUI仕様
メンタルミル(商標)フェノメノン(商標)作成ツールにより、ユーザーは、プログラミングなしで対話的にシェイダーを構築できる。ユーザーは、主に、シェイダーグラフビューにおいて作業し、そこには、複雑な効果を構築するために、メタノード(商標)が他のシェイダーノードに取り付けられている。メタノードは、単純化されたシェイダーであり、より複雑なフェノメノン(商標)を構築するための構築ブロックを形成する。
B. Mental Mill GUI Specification The mental mill (TM) Phenomenon (TM) creation tool allows users to build shaders interactively without programming. Users primarily work in shader graph views, where Metanodes ™ are attached to other shader nodes to build complex effects. Metanodes are simplified shaders and form a building block for building more complex Phenomenon ™.
「フェノメノン」の定義は、「視覚効果」の概念を完全に把握するために、メンタルレイ(登録商標)レンダラーにより導入された。簡単に述べれば、フェノメノンはシェイダー、またはシェイダーツリー、または協働シェイダーツリー(DAG)のセットであってよく、幾何学的シェイダーを含み、その結果、定義の領域を有する単一のパラメータ化された機能、および、シーンにおける幾何学的オブジェクトにより与えられる境界条件と共に、レンダラーの起動時に作成される境界条件を含む、三次元空間における境界条件のセットである。 The definition of “phenomenon” was introduced by the Mental Ray® renderer to fully understand the concept of “visual effects”. Briefly, a Phenomenon can be a shader, or a set of shader trees, or a collaborative shader tree (DAG), which includes a geometric shader, resulting in a single parameterized region with a defined domain A set of boundary conditions in 3D space, including the boundary conditions created when the renderer is started, along with the boundary conditions given by the geometric objects in the scene.
フェノメノンは、1つまたは2つ以上のシェイダーまたはシェイダーDAG、およびレンダリングを制御する種々の「条件」オプションを含む構造体である。外見上は、フェノメノンは、まさに、入力パラメータおよび出力を伴うシェイダーのように見えるが、内部では、その機能はプログラミング言語では実現されず、フェノメノンインタフェースパラメータへの特別なアクセスを有するシェイダーDAGのセットとして実現される。補助的な目的のために、追加的なシェイダーまたはシェイダーDAGもまた含めることができる。フェノメノンは、シーンへの取り付けポイントとして機能する固有ルートノードに取り付けられる。内部構造は、外部のユーザーからは隠されているが、メンタルミルフェノメノン作成ツールによりアクセスできる。 Phenomenon is a structure that contains one or more shaders or shader DAGs and various “condition” options that control rendering. In appearance, Phenomenon looks exactly like a shader with input parameters and outputs, but internally, its functionality is not implemented in a programming language, but as a set of shader DAGs with special access to Phenomenon interface parameters. Realized. Additional shaders or shader DAGs can also be included for auxiliary purposes. Phenomenon is attached to a unique root node that serves as an attachment point to the scene. The internal structure is hidden from outside users, but can be accessed by the mental mill Phenomenon creation tool.
コードを書くことによりシェイダーを開発しようと所望するユーザーに対して、メンタルミルは、メンタルイメージシェイダー(mental images' shader)言語;MetaSL(商標)を使用して、メタノードを作成するための、統合開発環境(IDE)も提供する。ユーザーは、コード、またはフェノメノンシェイダーグラフの構成要素にする特別な機能を提供するメタノードを書くことにより完全なモノリシックシェイダーを開発できる。 For users who wish to develop shaders by writing code, mental mill uses the mental images' shader language; MetaSL (TM) to create metanodes for integrated development. An environment (IDE) is also provided. Users can develop complete monolithic shaders by writing code or metanodes that provide special features that make them a component of the Phenomenon shader graph.
メンタルミルツールは、フェノメノンおよびメタノードに対する自動生成グラフィカルユーザーインタフェース(GUI)も提供する。このGUIにより、ユーザーはパラメータに対する値を選択し、その設定の結果を対話的にプレビューすることが可能になる。
シーンに付加される前に、フェノメノンをインスタンス化するためのパラメータ値が指定されなければならない。ユーザーが編集するフェノメノンには2つのタイプがある。それは、パラメータ値が指定されていないフェノメノン(自由値フェノメノンと称される)と、パラメータが固定、または部分的に固定されたフェノメノン(固定フェノメノンと称される)である。ユーザーがシェイダーグラフを作成することにより、またはMetaSLコードを書くことにより(またはその両者を組み合わせて)新しいフェノメノンを作成するときは、新しいタイプの、自由パラメータ値のフェノメノンを作成することになる。そしてユーザーは、この新しいフェノメノンのタイプに基づいて、固定パラメータ値を有するフェノメノンを作成できる。典型的には、特別なフェノメノンに基づいて、多数の固定値フェノメノンが存在することになる。ユーザーがフェノメノンを変更すると、それに基づくすべての固定フェノメノンは、その変化を継承する。固定フェノメノンへの変更は、その特別なフェノメノンのみに限られる。
The mental mill tool also provides an automatically generated graphical user interface (GUI) for Phenomenon and Metanodes. This GUI allows the user to select a value for the parameter and interactively preview the result of the setting.
Before being added to the scene, a parameter value for instantiating the phenomenon must be specified. There are two types of phenomenon that users edit. Phenomenon with no parameter value specified (referred to as free value phenomenon) and Phenomenon with fixed or partially fixed parameters (referred to as fixed phenomenon). When a user creates a new phenomenon by creating a shader graph or by writing MetaSL code (or a combination of both), a new type of free parameter value phenomenon will be created. The user can then create a phenomenon with fixed parameter values based on this new phenomenon type. Typically, there will be a large number of fixed value phenomenons based on the special phenomenon. When a user changes a Phenomenon, all fixed Phenomenon based on it will inherit that change. Changes to fixed Phenomenon are limited to that special Phenomenon only.
ユーザーが新しいフェノメノンタイプを作成することを選択すると、ユーザーにはそのシェイダーグラフを構築させておいて、新しい空のフェノメノンを作成することによりメンタルミルが開始する。ユーザーは、そのシェイダーへの公共インタフェースを形成するフェノメノンインタフェースパラメータを指定することもできる。更に、フェノメノンルーツと他のオプションの数を指定することもできる。 If the user chooses to create a new phenomenon type, the user will have the shader graph built and the mental mill will start by creating a new empty phenomenon. The user can also specify Phenomenon interface parameters that form a public interface to that shader. You can also specify the number of Phenomenon Roots and other options.
ここで、メンタルミル・ユーザー・インタフェースおよびそれが提供する特徴を説明する。
メンタルミルアプリケーションUIは、各ビューが制御の異なるセットを含むいくつかの異なるビューから構成される。ビューパネルは、4つの可動スプリッタバーにより分離される。これにより、ユーザーがビューの相対的なサイズを調整できるようになる。
Here we describe the mental mill user interface and the features it provides.
The mental mill application UI consists of several different views, each view containing a different set of controls. The view panel is separated by four movable splitter bars. This allows the user to adjust the relative size of the view.
図32は、基本的な簡略化レイアウトを示すスクリーンショット470である。主要なビューパネルには名前が付けられているが、簡略化のために、これらのビューの内容は示していない。これらのビューパネルは、以下を含む。ツールボックス472、フェノメノングラフビュー474、コードエディタビュー476、ナビゲーションコントロール478、プレビュー480、およびパラメータビュー482である。 FIG. 32 is a screenshot 470 showing a basic simplified layout. Although the main view panels are named, the contents of these views are not shown for simplicity. These view panels include: A tool box 472, a phenomenon graph view 474, a code editor view 476, a navigation control 478, a preview 480, and a parameter view 482.
フェノメノングラフビュー474により、ユーザーは、メタノードまたはフェノメノンノードを一緒に接続してグラフを形成することにより、新しいフェノメノンを作成できる。ノードの出力は、1つまたは2つ以上の入力に接続でき、それにより、接続されたノードは、それが接続されている入力パラメータに対して値を提供できる。
フェノメノングラフビュー領域474は、仮想的に無限の大きさであってよく、それにより任意の複雑なシェイダーグラフを保持できる。ユーザーは、この領域を、マウスを使用して、真中のマウスボタンを押すことによりパンニングし、右マウスボタンを押すことによりズーミングして(ボタンの割り付けは変更できる)ナビゲートできる。下記の節で説明するナビゲーションコントロールは、フェノメノンビューをコントロールするための多くの方法を提供する。
The Phenomenon graph view 474 allows a user to create a new Phenomenon by connecting metanodes or Phenomenon nodes together to form a graph. The output of a node can be connected to one or more inputs, so that the connected node can provide a value for the input parameter to which it is connected.
Phenomenon graph view area 474 may be virtually infinite in size, thereby holding any complex shader graph. The user can navigate this area using the mouse by panning by pressing the middle mouse button and zooming by pressing the right mouse button (button assignment can be changed). The navigation controls described in the following sections provide many ways to control the Phenomenon view.
ユーザーは、下記に示すように、ノードをツールボックス472からフェノメノングラフビュー474へドラッグすることによりノードを作成できる。グラフビュー474において一度、ノードはユーザーにより位置決めできる。レイアウトコマンドは、グラフノードの自動レイアウトも行なう。
図33は、グラフノード490を示している。グラフノード490(フェノメノンノードまたはメタノード)はいくつかの要素を含んでいる。
The user can create a node by dragging the node from the toolbox 472 to the Phenomenon graph view 474 as shown below. Once in the graph view 474, the node can be positioned by the user. The layout command also performs automatic layout of graph nodes.
FIG. 33 shows a graph node 490. The graph node 490 (phenomenon node or metanode) includes several elements.
・プレビュー−ノードのプレビューウィンドウ部により、ユーザーは、表面上にレンダリングされたシェイダーノードの結果を見ることができる。球は、デフォルトの表面であるが、他の幾何学的図形も指定できる。すべてのノードは、シェイダーグラフの内部ノードであっても、潜在的にプレビューウィンドウを有することができる。プレビューは、個々のノードを完全なシェイダーと考え、そのシェイダーを使用してサンプルの幾何学的図形をレンダリングすることにより生成される。これにより、ユーザーが、グラフのそれぞれの段階でのシェイダーの結果を見ることができるので、シェイダーグラフを通してデータフローを視覚化できる。ノードのプレビュー部は、ノードのサイズを小さくするために閉じることもできる。 Preview—The preview window portion of the node allows the user to see the result of the shader node rendered on the surface. The sphere is the default surface, but other geometric shapes can be specified. All nodes can potentially have a preview window even if they are internal nodes of the shader graph. The preview is generated by considering each node as a complete shader and using that shader to render the sample geometry. This allows the user to see the shader results at each stage of the graph, so that the data flow can be visualized through the shader graph. The node preview portion can also be closed to reduce the size of the node.
・出力−各ノードは、少なくとも1つの出力を有するが、2つ以上の出力を有するノードもある。ユーザーは、出力位置上でクリックおよびドラッグして、出力を別のノードの入力に付加する。出力は2点以上の入力に付加できる。
・入力−各ノードは、入力パラメータを有しないか、1つ以上の入力パラメータを有する。入力は、別のノードの出力に付加でき、それによりそのシェイダーが、入力パラメータの値をコントロールすることができる。または、値はユーザーにより設定できる。入力は、1つの出力にのみ付加できる。ユーザーがマウスを、入力の上に少しの間保持すると、そのパラメータの簡単な説明を示すツールチップが表示される。ツールチップのテキストは、シェイダーに関連する属性により提供される。
Output—Each node has at least one output, but some nodes have more than one output. The user clicks and drags on the output location to add the output to another node's input. An output can be added to two or more inputs.
Input—Each node has no input parameters or one or more input parameters. An input can be added to the output of another node, so that the shader can control the value of the input parameter. Alternatively, the value can be set by the user. An input can be added to only one output. When the user holds the mouse over the input for a moment, a tooltip is displayed that gives a brief description of the parameter. Tooltip text is provided by attributes associated with the shader.
入力または出力パラメータのいくつかは、サブパラメータの構造体であってよい。この場合、ノードの入力パラメータは、構造体を開くまたは閉じるための「+」またはボタンを有する。構造体の個々の要素に取り付けることができる。図34は、サブパラメータを含むグラフノード500を示している。
フェノメノンノードそれ自身は、シェイダーグラフを含む。トップレベルにおいては、ユーザーは、それぞれが新しいシェイダーを表現している、複数のフェノメノンノードを作成できる。コマンドはユーザーをフェノメノンノードに入り込ませ、フェノメノンノードはフェノメノングラフビューをフェノメノン内部に存在するグラフと入れ替える。または、フェノメノンは、それが常駐しているグラフにおいて直接開くこともできる。これにより、ユーザーは、フェノメノンそれ自身の内容と共に、フェノメノンの外側のノード、およびおそらくそれに接続されているノードを見ることができる。
Some of the input or output parameters may be sub-parameter structures. In this case, the input parameter of the node has a “+” or button to open or close the structure. Can be attached to individual elements of the structure. FIG. 34 shows a graph node 500 that includes sub-parameters.
The Phenomenon node itself contains a shader graph. At the top level, users can create multiple Phenomenon nodes, each representing a new shader. The command causes the user to enter the Phenomenon node, which replaces the Phenomenon graph view with a graph that exists inside the Phenomenon. Alternatively, a Phenomenon can be opened directly in the graph where it resides. This allows the user to see the nodes outside the Phenomenon and possibly the nodes connected to it, along with the contents of the Phenomenon itself.
フェノメノンの内部において、ユーザーは、フェノメノン出力および補助ルートと共に、フェノメノンインタフェースパラメータへのアクセスを有する。フェノメノンへの入力(インタフェースパラメータ)は、フェノメノンの左上隅に現れ、フェノメノンの内部から見たとき、出力のように動作する。フェノメノンの出力は、右上隅に現れ、内部から見たときに入力ように動作する。 Inside Phenomenon, the user has access to Phenomenon interface parameters along with Phenomenon output and auxiliary routes. The input (interface parameter) to the Phenomenon appears in the upper left corner of the Phenomenon and operates like an output when viewed from inside the Phenomenon. The Phenomenon output appears in the upper right corner and behaves like an input when viewed from inside.
フェノメノンの内部のシェイダーグラフは、他のフェノメノンノードを含むこともできる。ユーザーは、同じ方法でこれらのフェノメノンノードに入り込むことができ、フェノメノンが入れ子にされる限り処理を繰り返すことができる。
図35は、フェノメノンの内部のときのサンプルグラフビュー510を示している。全体のグラフがこの図に示されているが、ユーザーが極端にズームアウトしないかぎり、全体のグラフが一度には見ることができないような、十分に大きなグラフとなることは普通である。この例においては、1つのノード以外のすべてのノードは、そのプレビューウィンドウを閉じていることに注意されたい。
The shader graph inside a Phenomenon can also contain other Phenomenon nodes. The user can enter these Phenomenon nodes in the same way and repeat the process as long as Phenomenon is nested.
FIG. 35 shows a sample graph view 510 when inside the Phenomenon. Although the entire graph is shown in this figure, it is common to have a sufficiently large graph that the entire graph cannot be seen at one time unless the user zooms out extremely. Note that in this example, all nodes except one node have their preview windows closed.
フェノメノンをグラフの中で開くとき、グラフビュー全体を覆うように最大化することも、適切な大きさで開くことも可能である。適切な大きさで開くと、ユーザーは、図36のグラフビュー520に示されているように、内部のグラフと共に、フェノメノンの外部のグラフも見ることができる。
フェノメノンは、他のフェノメノンの内部に入れ子にすることができるので、フェノメノンを、他の開いたフェノメノンの内部で開き、新しい入れ子のフェノメノンを作成することが可能である。図37は、そのような場合を示すグラフビュー530を示している。
When opening a Phenomenon in a graph, it can be maximized to cover the entire graph view, or opened at an appropriate size. When opened at the proper size, the user can see the outer graph of Phenomenon as well as the inner graph, as shown in the graph view 520 of FIG.
Phenomenon can be nested inside other Phenomenon, so it is possible to open Phenomenon inside other open Phenomenon and create a new nested Phenomenon. FIG. 37 shows a graph view 530 showing such a case.
ユーザーがノードをトップレベルにドラッグすると、ユーザーは、ドラッグすることを選択したフェノメノンのタイプに基づいて、固定値を有するフェノメノンを作成することになる。トップレベルの固定フェノメノンノードは、編集可能なパラメータを有するが、他のノードへ取り付けられない。固定フェノメノンとは、先に言及したように、それが作成され、そのフェノメノンへのいかなる変更も継承するフェノメノンのことである。固定フェノメノンを自由値フェノメノンへ変換するコマンドも利用でき、それにより、ユーザーは、他のインスタンスに影響を与えることなくフェノメノンを修正できる。 When the user drags a node to the top level, the user will create a phenomenon with a fixed value based on the type of phenomenon that he has chosen to drag. Top-level fixed Phenomenon nodes have editable parameters, but are not attached to other nodes. A fixed Phenomenon, as mentioned above, is a Phenomenon that is created and inherits any changes to that Phenomenon. A command is also available to convert a fixed Phenomenon to a free value Phenomenon, which allows the user to modify the Phenomenon without affecting other instances.
ユーザーがノードをフェノメノン内にドラッグすると、固定値フェノメノンまたはメタノードが、作成されたノードのタイプにより、フェノメノンの内部に作成される。フェノメノン内部のノードは、他のノードまたはフェノメノンインタフェースパラメータと有線により接続できる。ユーザーがフェノメノン内にドラッグしたノードが、それ自身フェノメノンノードの場合は、固定値のフェノメノンが作成される。そのパラメータ値を設定、または他のノードに付加することができるが、それはもとのフェノメノンである固定フェノメノンなので、ユーザーはフェノメノンノードの内部に入り込んで、それを変更することはできない。また、もとのフェノメノンに対するいかなる変更もノードに影響する。ユーザーがフェノメノンを変更したいと所望する場合は、ノードを、ユーザーが入り込んで修正できる新しい自由値フェノメノンに変換するコマンドが利用できる。 When the user drags a node into the Phenomenon, a fixed value Phenomenon or metanode is created inside the Phenomenon, depending on the type of node created. A node inside the Phenomenon can be connected to other nodes or Phenomenon interface parameters by wire. If the node that the user dragged into the Phenomenon is itself a Phenomenon node, a fixed value Phenomenon is created. The parameter value can be set or appended to another node, but since it is a fixed phenomenon that is the original phenomenon, the user cannot get inside the phenomenon node and change it. Also, any changes to the original Phenomenon will affect the node. If the user wants to change the phenomenon, a command is available that converts the node to a new free value phenomenon that the user can enter and modify.
シェイダー付加を作成するために、ユーザーは1つのノードの出力領域上でクリックおよびドラッグして、マウスカーソルを、別のノードの入力上に置く。ユーザーがマウスを離すと、シェイダー接続を表現する接続線が描かれる。接続が有効なものでなければ、付加処理の間に、可能な入力の上にマウスを置くと、カーソルはこれをユーザーに示す。
タイプチェッキングシステムは、シェイダーが、その出力タイプに整合している入力にだけ付加されることを保証する。ある場合には、変換を処理するアダプタシェイダーが存在すれば、異なるタイプの2つのパラメータの付加を行なうことができる。例えば、スカラー値を、アダプタシェイダーを使用して、カラー入力に付加できる。アダプタシェイダーは、スカラーを灰色に変換でき、または、ユーザーにより選択された設定により、他の変換を行なうことができる。アダプタシェイダーは、それが利用できるときは、自動的に挿入される。ユーザーがアダプタを必要とするパラメータを付加すると、アダプタは、ユーザーが付加を完成するときに自動的に挿入される。更に、メンタルミルは、付加を行なうときに、ユーザーがグラフ内で不注意にサイクルを作成しないことを保証する。
To create a shader addition, the user clicks and drags on the output area of one node to place the mouse cursor on the input of another node. When the user releases the mouse, a connection line representing the shader connection is drawn. If the connection is not valid, the cursor will indicate this to the user when the mouse hovers over possible input during the add process.
A type checking system ensures that a shader is attached only to inputs that match its output type. In some cases, if there is an adapter shader that handles the conversion, two parameters of different types can be added. For example, a scalar value can be added to a color input using an adapter shader. The adapter shader can convert the scalar to gray, or can perform other conversions depending on the settings selected by the user. The adapter shader is automatically inserted when it is available. When a user adds a parameter that requires an adapter, the adapter is automatically inserted when the user completes the addition. In addition, the mental mill ensures that the user does not inadvertently create cycles in the graph when making an addition.
図38は、カラー出力をスカラー入力に付加した結果を示すビュー540を示している。「カラーからスカラー」アダプタシェイダーノードがその間に挿入され、変換を行なう。アダプタノードの変換タイプパラメータにより、ユーザーはカラーがスカラーに変換される方法を選択できる。このパラメータに対するいくつかのオプションは次の通りである。 FIG. 38 shows a view 540 showing the result of adding a color output to a scalar input. A “color to scalar” adapter shader node is inserted between them to perform the conversion. The conversion type parameter of the adapter node allows the user to select how colors are converted to scalars. Some options for this parameter are:
・平均(average)−赤、緑、および青成分の平均を取る。
・NTSC重み付け輝度(NTSC weighted luminance)−赤、緑、および青の重み付け平均を取る。
・セレクト成分(select component)−赤、緑、青、またはアルファ成分のカラーの1つのみを取る。
Average-averages the red, green and blue components.
NTSC weighted luminance—A weighted average of red, green and blue.
Select component—takes only one of the red, green, blue, or alpha component colors.
ノードと接続線の両者は選択および削除できる。ノードを削除するときは、そのノードへのすべての接続もまたは削除される。接続を削除するときは、接続それ自身のみが削除される。
シェイダーグラフがより複雑になると、ユーザーは、グラフの部分をフェノメノンノードに詰めることにより、グラフを構成することができる。現在選択されているサブグラフを取り、それをフェノメノンノードに変換するコマンドが利用できる。結果は、未選択ノードへ付加された選択されたノードの各入力に対するインタフェースパラメータを有する新しいフェノメノンである。このフェノメノンは、その出力が未選択ノードに付加された各選択ノードに対する出力を有する。新しいフェノメノンは、フェノメノン内で移動された古いサブグラフに替わって付加される。その結果は、シェイダーグラフの動作には変更がないが、グラフは、いくつかのノードが単一のノードにより置き換えられたので簡略化されて見える。フェノメノンが複雑な動作を単一ノードにカプセル化する機能は、メンタルミルの重要かつ強力な特徴である。
Both nodes and connecting lines can be selected and deleted. When deleting a node, all connections to that node are also deleted. When deleting a connection, only the connection itself is deleted.
As the shader graph becomes more complex, the user can construct the graph by packing the portion of the graph into Phenomenon nodes. A command is available that takes the currently selected subgraph and converts it to a Phenomenon node. The result is a new phenomenon with interface parameters for each input of the selected node added to the unselected node. This Phenomenon has an output for each selected node whose output is added to an unselected node. New Phenomenon is added in place of the old subgraph moved within Phenomenon. The result is that the behavior of the shader graph is unchanged, but the graph appears to be simplified because several nodes have been replaced by a single node. The ability of Phenomenon to encapsulate complex operations into a single node is an important and powerful feature of mental mills.
図39はビュー550を示し、そこにおいて、シェイダー2,3および4は、新しいフェノメノンノードに詰められている。外部のノードへの接続は維持され、グラフによりもたらされる結果は変更されていない。しかし、グラフは、わずかに整理されている。フェノメノンは入れ子にすることができるので、サブグラフの、フェノメノンへの、このタイプのグループ化が、任意の深さのレベルで起き得る。 FIG. 39 shows a view 550 where shaders 2, 3 and 4 are packed into a new Phenomenon node. Connections to external nodes are maintained and the results provided by the graph are unchanged. However, the graph is slightly organized. Since Phenomenon can be nested, this type of grouping of subgraphs into Phenomenon can occur at any depth level.
プレビューウィンドウは、現在選択されているフェノメノンのサンプルレンダリングを表示している。イメージは、フェノメノンノードの前のウィンドウに示されたイメージと同じであるが、より詳細を示すために、大きくすることができる。
プレビューは、常に、最上位のフェノメノンノードの結果を示す。いったん、ユーザーがフェノメノンに入ると、プレビューは、どのノードが選択されたかに拘わらず、そのフェノメノンの結果を示す。これにより、ユーザーは、まだ最終結果をプレビューしている間に、フェノメノン内の、シェイダーのグラフ上で作業できるようになる。
The preview window displays a sample rendering of the currently selected phenomenon. The image is the same as the image shown in the previous window of the Phenomenon node, but can be enlarged to show more details.
The preview always shows the result of the topmost phenomenon node. Once the user enters a phenomenon, the preview shows the result of that phenomenon, regardless of which node is selected. This allows the user to work on the shader graph in Phenomenon while still previewing the final result.
ナビゲーションウィンドウは、ユーザーがフェノメノングラフをナビゲートできるようにするコントロールを提供する。ボタンにより、ユーザーは、フェノメノンのグラフ内のグラフの選択された部分に合わせるために、または、グラフ全体を見られるように合わせるためにズーミングできる。
「鳥瞰」コントロールは、フェノメノングラフビューに示されたグラフの部分を示す長方形により、シェイダーグラフの全体の小さな表現を示す。このコントロールの上でユーザーがクリックおよびドラッグして、長方形を、ユーザーが見たいと所望するグラフの部分に位置決めすることができる。また、「ズームイン」および「ズームアウト」ボタン、およびスライダがあり、それによりユーザーはビュー長方形のサイズをコントロールできる。ユーザーがズームレベルを変更するにつれて、長方形はより大きくまたは小さくなる。等角のビューもまた考慮されている。
The navigation window provides controls that allow the user to navigate the Phenomenon graph. The button allows the user to zoom to fit a selected portion of the graph within the Phenomenon graph or to fit the entire graph so that it can be viewed.
The “bird's eye” control shows a small representation of the entire shader graph, with a rectangle showing the portion of the graph shown in the Phenomenon graph view. The user can click and drag on this control to position the rectangle at the part of the graph that the user wants to see. There are also “zoom in” and “zoom out” buttons and a slider that allows the user to control the size of the view rectangle. As the user changes the zoom level, the rectangle becomes larger or smaller. Conformal views are also considered.
図40は、サンプルシェイダーグラフをビューしている鳥瞰ビューコントロールを示すビゅー560である。暗い灰色の長方形562は、フェノメノングラフビューにおいて見ることができる領域を示している。
ユーザーがズームインおよびズームアウトすると、グラフビューにおけるシェイダーノードは、より大きくまたは小さくなる。ユーザーがよりズームアウトして、ノードがより小さくなるにつれ、ノードのある要素は、消えてノードを簡素化する。図41A−Dは、一連のビュー570、572、574、および576を示しており、詳細のノードレベルの進行を示している。
FIG. 40 is a view 560 showing a bird's eye view control viewing a sample shader graph. The dark gray rectangle 562 shows the area that can be seen in the Phenomenon graph view.
As the user zooms in and out, the shader node in the graph view becomes larger or smaller. As the user zooms out and the node gets smaller, some elements of the node disappear and simplify the node. 41A-D show a series of views 570, 572, 574, and 576 showing the detailed node level progression.
入力または出力が崩壊しても、ユーザーは依然として付加を行なうことができる。付加をノードへドラッグすると、ポップアップリストにより、ユーザーはマウスを離すことにより、実際の入力を選択できる。
フェノメノングラフの節で記述したように、ユーザーはフェノメノンのノードに入り込むことができ、それにより、グラフビューが、入力されたフェノメノンのグラフと置き換えられる。このプロセスは、フェノメノンが他のフェノメノンの中に入れ子となる限り続けることができる。ナビゲーションウィンドウは、後退および前進ボタンを提供し、それにより、ユーザーは、入れ子のフェノメノンをナビゲートしてきた経路を逆に辿ることを可能にする。
If the input or output collapses, the user can still make additions. When dragging an attachment to a node, a pop-up list allows the user to select the actual input by releasing the mouse.
As described in the Phenomenon Graph section, the user can enter a Phenomenon node, which replaces the graph view with the entered Phenomenon graph. This process can continue as long as the Phenomenon is nested within other Phenomenon. The navigation window provides back and forward buttons, which allow the user to follow the path that has been navigated through the nested phenomenon.
ツールボックスウィンドウは、シェイダーグラフがそこから構築される構築ブロックを作成するシェイダーノードを含む。ユーザーはクリックして、ノードをツールボックスからフェノメノングラフビューにドラッグし、ノードをシェイダーグラフに追加することができる。
ノードは、ツールボックス内で、アイコンおよび名前として現れる。典型的には、アイコンは、シェイダーを使用してレンダリングされた球であるが、他のアイコンが使用される場合もある。ノードのリストは、アイコンなしのぎっしり詰まったリストにおいても見ることができ、それにより、より多くのノードをビューに合わせることが可能になる。あるノードはフェノメノンノード、つまり、シェイダーグラフにより定義されたノードであってもよく、そして、他のノードは、メタノード、つまり、MetaSLコードにより定義されたノードであってもよい。これは、ノードの両者のタイプが互換可能に使用できるので、ユーザーにとって重要でないことがしばしばある。フェノメノンノードは、メタノードとは異なるようにカラーを付けるか、または別の方法で視覚的に区別できるようにカラーを付け、それにより、ユーザーはその2つを区別できるようになる。フェノメノンノードは、そのシェイダーグラフを編集することにより、グラフとして編集できるが、メタノードは、そのMetaSLソースコードを変更することによってのみ編集できる。
The toolbox window includes a shader node that creates a building block from which the shader graph is constructed. The user can click and drag a node from the toolbox to the Phenomenon graph view to add the node to the shader graph.
Nodes appear as icons and names in the toolbox. Typically, the icon is a sphere rendered using a shader, but other icons may be used. The list of nodes can also be seen in a tight list without icons, which allows more nodes to fit in the view. Some nodes may be Phenomenon nodes, i.e. nodes defined by shader graphs, and other nodes may be metanodes, i.e. nodes defined by MetaSL code. This is often not important to the user because both types of nodes can be used interchangeably. Phenomenon nodes are colored differently than metanodes, or colored so that they can be visually distinguished otherwise, so that the user can distinguish the two. A Phenomenon node can be edited as a graph by editing its shader graph, but a metanode can only be edited by changing its MetaSL source code.
ノードはカテゴリによりソートされ、ユーザーは、単一のカテゴリまたはすべてのカテゴリを、カテゴリのドロップダウンリストから選択することにより、見るように選択できる。ユーザーが、そのカテゴリを構成できようにする、ダイアログをもたらすコマンドもある。このダイアログにおいて、ユーザーは、カテゴリを作成または削除し、カテゴリをそれぞれのノードタイプに割り付けるようにコントロールすることができる。 The nodes are sorted by category and the user can choose to see a single category or all categories by selecting from the category drop-down list. Some commands result in dialogs that allow the user to configure that category. In this dialog, the user can control to create or delete categories and assign categories to each node type.
フェノメノンまたは、メタノードに加えて、ツールボックスも「動作(action)」を含む。動作とは、完全なシェイダーグラフの断片であり、ユーザーは、新しいシェイダーグラフを構築するときに使用できる。シェイダーノードおよび付加のパターンが異なるシェイダーに現れるのは、普通のことである。ユーザーは、シェイダーグラフの部分を選択でき、それを使用して、新しい動作を作成する。将来、ユーザーが同じ構成のノードを作成したいと所望するときは、ユーザーは単に動作をツールボックスから、シェイダーグラフにドラッグして、それらのノードを作成することが出来る。 In addition to Phenomenon or Metanodes, toolboxes also contain “actions”. An action is a fragment of a complete shader graph that can be used by the user when building a new shader graph. It is normal for shader nodes and additional patterns to appear in different shaders. The user can select a portion of the shader graph and use it to create a new action. In the future, when the user wants to create nodes with the same configuration, the user can simply drag actions from the toolbox to the shader graph to create those nodes.
図42A−Bは、ビュー580と582であり、2つの異なるビューモードのツールボックスを示している。図42Aのビュー580は、サムネールビューモードを示し、図38Bのビュー582は、リストビューモードを示している。
ツールボックスは、指定されたシェイダー記述ファイルで定義されたノードがぎっしり詰まっている。ユーザーは、1つまたは2つ以上のシェイダー記述ファイルを選択して、ツールボックスを介して、アクセスできるシェイダーライブラリとして使用できる。このライブラリにノードタイプを追加する、およびノードを除去するコマンドがある。メンタルミルツールは、メタノードの初期ライブラリもまた提供する。
42A-B are views 580 and 582, showing the toolbox in two different view modes. The view 580 in FIG. 42A shows the thumbnail view mode, and the view 582 in FIG. 38B shows the list view mode.
The toolbox is packed with nodes defined in the specified shader description file. A user can select one or more shader description files to use as a shader library that can be accessed via the toolbox. There are commands to add node types to this library and to remove nodes. The mental mill tool also provides an initial library of metanodes.
図43は、パラメータビューにおけるいくつかのコントロールを例示する部分的スクリーンショット590を示している。パラメータビューは、選択されたノードのパラメータを編集できるコントロールを表示している。これらのコントロールには、いくつか挙げると、スライダ、カラーピッカー、チェックボックス、ドロップダウンリスト、テキスト編集フィールド、およびファイルピッカーがある。 FIG. 43 shows a partial screenshot 590 illustrating some controls in the parameter view. The parameter view displays controls that allow you to edit the parameters of the selected node. These controls include sliders, color pickers, checkboxes, drop-down lists, text editing fields, and file pickers, to name a few.
自由値フェノメノンインタフェースパラメータを編集するときは、編集されているのはデフォルト値である。固定値フェノメノンは、それらのパラメータ値を上書きする。
シェイダー付加が可能な場合は、ボタン列が存在し、それにより、ユーザーは、パラメータビューの内部から付加ソースを取り出すことができる。現在の段階では、シェイダー付加は、トップレベルのフェノメノンを編集するときにはできないということに注意されたい。このボタンにより、ポップアップリストが現れ、それにより、ユーザーは、現在のグラフの中で利用できる他のノードから、新しいノードを取り出しまたは選択できる。「無し(none)」オプションは、付加を除去するために設けられている。付加が行なわれると、パラメータに対する通常のコントロールは、付加されたノードの名前を示すラベルと置換される。
When editing a free value Phenomenon interface parameter, what is being edited is the default value. Fixed value Phenomenon overrides those parameter values.
If shader addition is possible, there is a button row that allows the user to retrieve the addition source from within the parameter view. Note that at this stage, adding shaders is not possible when editing top-level phenomena. This button displays a pop-up list that allows the user to retrieve or select a new node from other nodes available in the current graph. The “none” option is provided to remove the addition. When an attachment is made, the normal control over the parameter is replaced with a label indicating the name of the attached node.
いくつかのパラメータは構造体であり、その場合は、コントロールは、構造体の各要素に対して作成される。更なる形態によれば、構造体は、「崩壊した(collapsed)」形状のUIにより表示され、それを開くための+ボタンにより開かれる(入れ子構造体に対しては繰返し的に)。または、構造体は、常に、拡張された形状で表示することもできる。
UIにおいて、パラメータは、それらがフェノメノンまたはメタノードにおいて宣言された順に現れるが、ノードにおける属性もまた、その順序およびパラメータのグループ化をコントロールできる。自由値フェノメノンに対するデフォルトパラメータを編集するときに、パラメータをグループにまとめるコマンドが、パラメータの順序を変更するコマンドと共に利用できる。これらのコマンドは、ノードに関連する属性を編集する。
Some parameters are structures, in which case controls are created for each element of the structure. According to a further form, the structure is displayed with a “collapsed” shape UI and opened with a + button to open it (repeatedly for nested structures). Alternatively, the structure can always be displayed in an expanded shape.
In the UI, parameters appear in the order in which they are declared in a Phenomenon or Metanode, but attributes in the node can also control the order and grouping of parameters. When editing default parameters for free-valued Phenomenon, commands that group parameters together can be used with commands that change the order of parameters. These commands edit attributes associated with the node.
ほとんどのパラメータは、それらに関連するハードなまたはソフトな制限を有している。ハードな制限は、パラメータが超えることができない範囲である。ソフトな制限は、一般的に有効なパラメータに対する範囲を指定することであるが、パラメータは厳密にはその範囲に制限されない。スライダのコントロールの範囲は、パラメータのソフトな制限に設定される。パラメータビューにおけるコマンドにより、ユーザーは、スライダの範囲を、それがハードな制限を越えない限り、ソフトな制限を越えて変更できるようになる。 Most parameters have hard or soft limitations associated with them. The hard limit is the range that the parameter cannot exceed. A soft restriction is to specify a range for generally valid parameters, but parameters are not strictly limited to that range. The range of the slider control is set to a soft limit of parameters. Commands in the parameter view allow the user to change the slider range beyond the soft limit unless it exceeds the hard limit.
パラメータビューにおけるコントロールは、ユーザーがマウスを少しの間コントロール上に置くと、ツールチップを表示する。ツールチップに表示されるテキストは、シェイダーに関連する属性に起因するパラメータの簡単な説明である。同様に、すべてのコントロールの上部にあるボタンは、全体としてのシェイダー機能の、相対的に短い説明を表示する。この説明もまた、ノードに関連する属性に起因する。 Controls in the parameter view display a tooltip when the user pauses the mouse for a moment. The text displayed in the tooltip is a brief description of the parameters due to the attributes associated with the shader. Similarly, the buttons at the top of all controls display a relatively short description of the overall shader function. This description is also due to the attributes associated with the node.
図44は、本発明の本形態による、コードエディタビューを例示する部分的スクリーンショット600を示している。コードエディタビューにより、シェイダーを、コードを書くことにより作成したいユーザーは、MetaSLを使用することでそれができるようになる。ユーザーは、必要であれば、コードを書くことによりモノリシックなシェイダーを作成できるが、ユーザーは、シェイダーのグラフの一部として使用される目的の、新しいメタノードを作成する可能性が高い。 FIG. 44 shows a partial screenshot 600 illustrating a code editor view according to this aspect of the invention. The code editor view allows users who want to create shaders by writing code to do so using MetaSL. Users can create monolithic shaders by writing code if necessary, but users are likely to create new metanodes that are intended to be used as part of the shader graph.
コマンドにより、ユーザーは新しいメタノードを作成できるようになる。その結果は、新しいタイプのメタノードを表現するグラフ(フェノメノン内ではない)のトップレベルにおけるメタノードである。ユーザーは、所望するのであればいつでも、フェノメノン内に、この新しいメタノードのインスタンスを作成できる。
ユーザーが新しいメタノードを作成するとき、メンタルミルは、最小コンパイル可能シェイダーに対して、初期スケルトンコードを作成する。そして、ユーザーは、そのシェイダーが提供することになっている特別な機能の実現に即座に集中できる。
The command allows the user to create a new metanode. The result is a metanode at the top level of a graph (not in Phenomenon) that represents a new type of metanode. The user can create an instance of this new metanode in the Phenomenon whenever desired.
When the user creates a new metanode, the mental mill creates the initial skeleton code for the minimally compilable shader. Users can then immediately focus on implementing the special features that the shader is supposed to provide.
トップレベルのメタノード(フェノメノンの外側)が選択されると、対応するMetaSLコードが、ユーザーの編集のためにコードエディタビュー内に現れる。コードに変更を加えた後で、シェイダーをコンパイルするためのコマンドが利用できるようになる。ユーザーの固有プラットフォームに対するMetaSLコンパイラおよびC++コンパイラは、シェイダーをコンパイルするメンタルミルにより起動される。他のプラットフォームに対するクロスコンパイルもまた可能である。いかなるエラーもメンタルミルに戻され、その結果、メンタルミルはそれをユーザーに表示する。エラー上でクリックすると、ユーザーはエディタ内の対応する行に導かれる。シェイダーがコンパイルに成功すると、メタノードは更新し、入力パラメータおよび出力の現在のセットを示す。プレビューウィンドウもまた更新し、シェイダーの見かけに対して視覚的フィードバックを与える。MetaSLおよびC++コンパイラのこの統合により、メタノードおよびモノリシックシェイダーの開発がかなり簡素化される。 When a top-level metanode (outside of Phenomenon) is selected, the corresponding MetaSL code appears in the code editor view for user editing. After making changes to the code, a command to compile the shader is available. The MetaSL and C ++ compilers for your specific platform are invoked by a mental mill that compiles shaders. Cross compilation for other platforms is also possible. Any errors are returned to the mental mill so that it displays it to the user. Clicking on the error leads the user to the corresponding line in the editor. If the shader compiles successfully, the metanode will update to show the current set of input parameters and outputs. The preview window also updates to give visual feedback on the shader appearance. This integration of MetaSL and C ++ compilers greatly simplifies the development of metanodes and monolithic shaders.
パラメータビューもまた、選択されたトップレベルのメタノードに対するコントロールを表示し、それにより、ユーザーは、ノードの入力パラメータに対するデフォルト値の編集ができるようになる。これは、自由値フェノメノンのインタフェースパラメータの編集に類似している。
多くのユーザー、特に、技術に精通していないユーザーは、コードを書くことに関心がなく、構築フェノメノンのグラフ編集方法を使用することだけを望むと思われる。UIにより、コード編集ウィンドウが、余分なスペースがフェノメノンのグラフビューに対して放棄されて、閉じることが可能になる。
The parameter view also displays controls for the selected top-level metanode, allowing the user to edit default values for the node's input parameters. This is similar to the editing of interface parameters for free value Phenomenon.
Many users, especially those who are not technically savvy, are not interested in writing code and would only want to use the built-in Phenomenon graph editing method. The UI allows the code editing window to be closed, leaving extra space for the Phenomenon graph view.
メインメニューは、以下を含んで、多様な方法で構成できる。
・ファイル(File)−ファイルメニューは、下記の項目を含む。
1. 新しいフェノメノン(New Phenomenon)−このコマンドは、新しい自由値フェノメノンを作成するために使用される。いったん作成されると、固定パラメータ値を有する他のフェノメノンを、このフェノメノンに基づいて作成できる。
The main menu can be configured in a variety of ways, including:
• File-The file menu includes the following items:
1. New Phenomenon-This command is used to create a new free value phenomenon. Once created, other phenomenons with fixed parameter values can be created based on this phenomenon.
2. 新しいメタノード(New Metanode)−新しいメタノードタイプを作成する。トップレベルのメタノードは、選択されると作成され、そのコードはコードエディタ内で編集可能である。
3. ファイルを開く(Open File)−編集のために、シェイダー記述ファイルを開く。ファイルの内容がフェノメノングラフビュー内に現れる。これは、メタノードタイプと共に、自由または固定フェノメノンを含むことができる。ツールボックスの一部として指定されたファイルを開くことも編集することもできる。フェノメノンのシェイダーグラフを編集すると、そのフェノメノンに基づくすべての固定値フェノメノンが影響を受ける。従って、ツールボックスファイルを開くことは、フェノメノンまたはメタノードをツールボックスからフェノメノングラフビューにドラッグすることとはまったく異なる。ノードをツールボックスからドラッグすると、元のフェノメノンに影響を与えることなく修正ができる固定値フェノメノンが作成される。ツールボックスにより使用される記述ファイルを開くと、元のフェノメノンを修正できるようになる。
2. New Metanode-Create a new metanode type. A top-level metanode is created when selected and its code is editable in the code editor.
3. Open File-Opens a shader description file for editing. The contents of the file appear in the Phenomenon graph view. This can include free or fixed phenomenon with metanode types. You can open and edit files specified as part of the toolbox. Editing a Phenomenon shader graph affects all fixed value Phenomenon based on that Phenomenon. Thus, opening a toolbox file is quite different from dragging a phenomenon or metanode from the toolbox to the phenomenon graph view. Dragging a node from the toolbox creates a fixed value phenomenon that can be modified without affecting the original phenomenon. When you open the description file used by the toolbox, you can modify the original phenomenon.
4. 保存(Save)−現在開いているファイルを保存する。ファイルが以前に保存されたことがなければ、このコマンドは、ユーザーに新しいファイルに対して名前を付けることを要請する。
5. 名前を付けて保存(Save as)−現在開いているファイルを保存するが、ユーザーがファイルに対して新しい名前を付けることができる。
4. Save-Save the currently open file. If the file has never been saved, this command prompts the user to name the new file.
5. Save as-saves the currently open file, but allows the user to give the file a new name.
6. 終了(Exit)−メンタルミルアプリケーションを終了する。
・編集(Edit)−編集メニューは下記の項目を含む。
1. 元に戻す(Undo)−最後の変更を元に戻す。これは、シェイダーグラフに対する変更、パラメータの値の変更、またはコードエディタビュー内で作成されたシェイダーコードへの変更が含まれる。メンタルミルツールは、仮想的に元に戻す無制限のレベルを有している。ユーザーは、嗜好により元に戻すレベルの最大数を設定できるが、このアプリケーションは、メモリをそれほど使用しないので、元に戻すレベルの数は、非常に高いままにしておくことができる。
6. Exit—Exits the mental mill application.
Edit-Edit menu contains the following items:
1. Undo-Undo the last change. This includes changes to the shader graph, changes to parameter values, or changes to shader code created within the Code Editor view. The mental mill tool has an unlimited level that virtually undoes. The user can set the maximum number of levels to undo by preference, but since this application uses less memory, the number of levels to undo can remain very high.
2. 繰返し(Redo)−前に元に戻された最後の変更を繰り返す。
3. 切取り(Cut)−選択された項目を削除するが、それをクリップボードにコピーする。選択される項目には、ノード(または複数のノード)またはコードエディタビューにおけるテキストが含まれる。キーボードフォーカスがコードビュー内にあると、テキストが切り取られ、そうでないときは、シェイダーグラフ選択が切り取られる。これは、コピー(copy)、貼付け(paste)、削除(delete)、すべて選択(select all)、何も選択しない(select none)、反転を選択(select invert)にも適用される。
2. Redo—Repeat the last change that was previously undone.
3. Cut-deletes the selected item, but copies it to the clipboard. The item selected includes the text in the node (or nodes) or code editor view. If the keyboard focus is in the code view, the text will be cut, otherwise the shader graph selection will be cut. This also applies to copy, paste, delete, select all, select none, select invert.
4. コピー−選択された項目をクリップボードにコピーする。
5. 貼付け−クリップボードの内容をシェイダーグラフまたはコードビューに貼り付ける。
6. 削除−選択された項目を削除する。
7. すべて選択−すべての項目を選択する。キーボードフォーカスに依存して、シェイダーノードまたはコードエディタ内のテキスト。
4. Copy-Copies the selected item to the clipboard.
5. Paste-Pastes the contents of the clipboard into the shader graph or code view.
6. Delete-Deletes the selected item.
7. Select All-Select all items. Text in shader node or code editor, depending on keyboard focus.
8. 何も選択しない−選択をクリアする。
9. 反転を選択−選択されていないすべての項目を選択し、選択されたすべての選択を解除する。
10. オプション(Preferences)−ユーザーが、メンタルミルアプリケーションに対して好みの設定ができるようにするダイアログをもたらす。
8. Do not select anything-clear the selection.
9. Select Invert-Select all items that are not selected and deselect all selected items.
10. Preferences—provides a dialog that allows the user to set preferences for the mental mill application.
・ヘルプ−ヘルプメニューは、下記の項目を含む
1. メンタルミルヘルプ−メンタルミルのヘルプファイルをもたらす。
2. 製品情報(About)−製品情報ボックスをもたらす。
ツールバーは、共通コマンドに簡単にアクセスできるツールボタンを含む。一般的には、ツールバーのコマンドは、シェイダーグラフの選択で作動する。ツールバーコマンドのいくつかは、メインメニューにあるコマンドの複製である。ツールバーの項目のリストには、下記のコマンドが含まれる。ファイルを開く、ファイルを保存(Save file)、新しいシェイダーグラフ(New shader graph)(フェノメノン)、コードベースの新しいシェイダー(New shader code-based)、元に戻す、繰返し、コピー、貼付け、閉じる(Close)。
Help-Help menu includes the following items: 1. Mental Mill Help-Brings up the mental mill help file.
2. Product Information (About)-Brings a product information box.
The toolbar includes tool buttons that allow easy access to common commands. In general, toolbar commands work with shader graph selection. Some of the toolbar commands are duplicates of the commands in the main menu. The list of toolbar items includes the following commands: Open file, Save file, New shader graph (Phenomenon), New shader code-based, Undo, Repeat, Copy, Paste, Close ).
シェイダー作成の重要な面は、欠陥を分析し、その原因を決定し、解決策を見つける機能である。言い換えれば、シェイダーの作成者は、シェイダーのデバッグができなければならない。シェイダーにおいて欠陥を見つけて解決することは、シェイダーが、グラフを形成するためにメタノードを付加することにより作成されようが、MetaSLコードを書くことにより作成されようが、あるいはその両者により作成されようが、それとは無関係に必要なことである。メンタルミルは、ユーザーが、高いレベルの視覚的技術を使用して、ユーザーのシェイダーをデバッグできる機能を提供する。これによりシェイダーの作成者は、シェイダーの状態を視覚的に分析でき、問題の原因を迅速に隔離できる。 An important aspect of shader creation is the ability to analyze defects, determine their cause, and find solutions. In other words, the shader creator must be able to debug the shader. Finding and resolving defects in shaders can be created whether shaders are created by adding metanodes to form a graph, created by writing MetaSL code, or both. It is necessary regardless of that. A mental mill provides the ability for a user to debug a user's shader using a high level of visual technology. This allows shader creators to visually analyze the state of the shader and quickly isolate the cause of the problem.
本発明の本形態は、フェノメノンのデバッグのための構造体を提供する。メンタルミルGUIにより、ユーザーは、メタノード、または他のフェノメノンを付加することによりフェノメノンを構築でき、グラフを形成できる。各メタノードは、そのノードによりもたらされた結果を説明するプレビューイメージを含むUIによる表現を有している。全体として見ると、このイメージのネットワークは、シェイダーがその結果を計算するために使用するプロセスのイラストを提供する。図45は、本発明のこの形態を例示している、部分的スクリーンショット610を示している。第1メタノード612は、表面上の照明を計算し、別のメタノード614は、テクスチャパターンを計算する。第3のノード616は、最初の2つの結果を組み合わせてその結果を作成する。 This form of the invention provides a structure for debugging Phenomenon. The mental mill GUI allows the user to build a phenomenon and form a graph by adding metanodes or other phenomena. Each metanode has a UI representation that includes a preview image that describes the results produced by that node. When viewed as a whole, this network of images provides an illustration of the process that shaders use to calculate their results. FIG. 45 shows a partial screenshot 610 that illustrates this aspect of the invention. The first metanode 612 calculates the illumination on the surface, and another metanode 614 calculates the texture pattern. The third node 616 combines the first two results and creates the result.
メタノードネットワークを視覚的に見渡すことにより、シェイダーの作成者は、そのシェイディングアルゴリズムを調べることができ、結果が予想とは異なる場所を見つけ出すことができる。ネットワークにおけるノードは、フェノメノンであることもあり、その場合は、それ自身の1つまたは2つ以上のネットワークを含む。メンタルミルにより、ユーザーがフェノメノンノードにナビゲートして、同じ技術を使用して視覚的にそのシェイダーグラフを調べることができる。 By visually looking around the metanode network, the shader creator can examine its shading algorithm and find out where the results are not what they expected. A node in a network may be a Phenomenon, in which case it contains its own one or more networks. The mental mill allows the user to navigate to the Phenomenon node and visually examine its shader graph using the same technique.
ある場合には、フェノメノンにおける各ノードの結果を調べても、ユーザーがシェイダーの問題を分析するために十分な情報が得られないこともある。例えば、特別なメタノードへのすべての入力は、正しい値を有しているように見えるが、それでも、そのメタノードの結果は、ユーザーが予期していたようには見えないこともある。また、MetaSLコードを書くことにより新しいメタノードをオーサリングするときも、ユーザーは、メタノードがその結果の値を計算するときに、メタノード内の変数の値を分析したいと所望することもある。 In some cases, examining the results for each node in Phenomenon may not provide enough information for the user to analyze the shader problem. For example, all inputs to a particular metanode appear to have the correct value, but the result of that metanode may still not appear as expected by the user. Also, when authoring a new metanode by writing MetaSL code, the user may wish to analyze the value of a variable in the metanode when the metanode calculates the resulting value.
一般的なプログラムのデバッグのための伝統的なモデルは、シェイダーのデバッグに完全には適応していない。CPU上で起動する一般的なプログラムは、本質的に、典型的な線形であり、データを操作する連続する指令が実行される。実行の複数のスレッドを有するプログラムもあるが、普通は、相対的により少ない数のスレッドを有し、12以下ということもしばしばあり、各スレッドは、分離した独立の連続指令を表現している。 Traditional models for general program debugging are not fully adapted to shader debugging. A typical program that runs on a CPU is essentially linear in nature, and a series of commands that manipulate data are executed. Some programs have multiple threads of execution, but usually have a relatively smaller number of threads, often 12 or less, and each thread represents a separate, independent sequence of instructions.
一方、シェイダープログラムは、線形な連続指令を表現してはいるが、平行して多数のデータポイント上で作動するという点が異なる。シェイダープログラムが指令の連続リストを実行する間、それは、それを各データポイントに対して同時に行なっているように見える。シェイダーがSIMD(単一指令複数データ)モデルを使用して処理される場合もあり、その場合は、各指令は、実際、多数のデータポイントに同時に適用される。 A shader program, on the other hand, represents a linear continuous command, but differs in that it operates on multiple data points in parallel. While the shader program executes a continuous list of commands, it appears to be doing it for each data point simultaneously. In some cases, shaders are processed using a SIMD (single command multiple data) model, in which case each command is actually applied to multiple data points simultaneously.
プログラムを一行ずつ進み、変数の値を調べる伝統的なモデルは、各変数が、シェイダーの実行のいかなる特別な段階においても、各データポイントに亘って広がっている多くの異なる値を有する可能性があることを考慮して修正されなければならない。これは、変数の個々の値を調べる伝統的な方法を、その時間の多くを非実用的にしてしまう。
メンタルミルは、視覚的デバッグパラダイムを、各メタノードの背後にあるMetaSLコードへ拡張する。メンタルミルMetaSLデバッガは、ユーザーに、問題のシェイダーノードに対するMetaSLコードを含むソースコードリストを提供する。そして、ユーザーは、シェイダーの指令を進むことができ、ユーザーがプログラムの実行を通して変数が変化するときにその変数の値を調べることができる。しかし、ユーザーに単一の数値をただ提供する代わりに、デバッガは、複数の値を同時に、オブジェクトの表面上にマップされたカラーとして表示する。
Traditional models that step through the program and examine the value of a variable can have each variable having many different values that span the data points at any particular stage of the shader's execution. It must be corrected to take into account. This makes the traditional way of examining individual values of variables much impractical.
The mental mill extends the visual debugging paradigm to the MetaSL code behind each metanode. The mental mill MetaSL debugger provides the user with a source code listing containing MetaSL code for the shader node in question. The user can then proceed with the shader's command and the value of the variable can be examined as the user changes through the execution of the program. However, instead of just providing the user with a single numeric value, the debugger displays multiple values simultaneously as a mapped color on the surface of the object.
変数の値を、単一の数字としてではなく、イメージとして表現することには、いくつかの利点がある。第1に、ユーザーは変数の値を駆動する機能の特徴を即座に認識でき、不正確に作動している領域を見つけ出すことができる。例えば、表面における変数の変化率は、表面上でカラーがどのように変化しているかを観察することにより、直感的な方法で見ることができる。ユーザーがシェイダーを一度に1ピクセルデバッグする伝統的な方法を使用している限り、これを認識することは難しい。シェイダーにおける欠陥は、シェイダーの背後の機能における不連続性に起因することがよくある。シェイダーの変化率を観察することにより、ユーザーはそのような不連続性を隔離することができる。 Representing the value of a variable as an image rather than as a single number has several advantages. First, the user can immediately recognize the feature of the function that drives the value of the variable and find out the area that is working incorrectly. For example, the rate of change of a variable on the surface can be viewed in an intuitive manner by observing how the color is changing on the surface. As long as the user is using the traditional method of debugging shaders one pixel at a time, this is difficult to recognize. Defects in the shader are often due to discontinuities in the function behind the shader. By observing the rate of change of the shader, the user can isolate such discontinuities.
ユーザーはまた、視覚的デバッグパラダイムを使用して、望ましくない結果をもたらす入力条件を迅速に突き止めることができる。シェイダーのバグは、ある入力パラメータが特別な値を取るときのみしか現れないこともあり、そのような状況は、幾何学的な表面の特別な部分にしか現れないこともある。メンタルミルデバッガにより、ユーザーが三次元空間を、マウスを使用してナビゲートして、問題の兆候である表面上の位置を見つけて、そこへ視線を向けることを可能にする。 Users can also use visual debugging paradigms to quickly locate input conditions that produce undesirable results. Shader bugs may only appear when certain input parameters take special values, and such situations may only appear in special parts of the geometric surface. The mental mill debugger allows the user to navigate through the three-dimensional space using the mouse to find the position on the surface that is an indication of the problem and direct his gaze there.
メンタルミルMetaSLデバッグは、ユーザーに、選択されたステートメントにおけるスコープ(scope)のすべての変数のリストを提供する。図46は、本発明の本形態による、変数リストを例示する部分的スクリーンショット620を示している。ユーザーが異なるステートメントを選択すると、新しい変数がスコープに入り込み、リストに現れ、一方、他の変数はスコープから出て行き、リストから削除される。リストにおける各変数は、その名前の隣にボタンを有しており、それにより、ユーザーは、変数を開いて、そのタイプのような追加的情報や、表面上にその値を表示する小さなプレビューイメージを見ることができる。ユーザーが、変数を修正するステートメントを通過すると、その変数に対するプレビューイメージは更新してその修正を反映する。 Mental mill MetaSL debugging provides the user with a list of all variables in scope in the selected statement. FIG. 46 shows a partial screenshot 620 illustrating a variable list according to this aspect of the invention. If the user selects a different statement, new variables enter the scope and appear in the list, while other variables exit the scope and are removed from the list. Each variable in the list has a button next to its name, which allows the user to open the variable and display additional information such as its type and its value on the surface. Can see. If the user passes a statement that modifies a variable, the preview image for that variable is updated to reflect the modification.
更に、ユーザーは、リストから変数を選択して、その値をより大きいプレビューウィンドウに表示することができる。
伝統的なデバッグ技術により、ユーザーはプログラムを一行ずつ進むことができ、各ステートメントにおけるプログラムの状態を調べることができる。典型的には、ユーザーはプログラムの実行の方向に、1つまたは2つ以上の行ずつ進むことのみができる。一般的に、任意のステートメントにジャンプすると、プログラムの再スタートが必要である。
In addition, the user can select a variable from the list and display its value in a larger preview window.
Traditional debugging techniques allow the user to step through the program and examine the state of the program at each statement. Typically, the user can only go one or more lines in the direction of execution of the program. In general, jumping to any statement requires a program restart.
メンタルミルMetaSLデバッガにより、ユーザーは、いかなる順序でも、そのシェイダーコード内のいかなるステートメントへもジャンプできる。この機能の特別にすばらしい面は、コードステートメントが関心対象の変数の値を修正するとき、シェイダーのライターは、このステートメントから容易に戻りまたは先に進み、ステートメントが実行される前と後で変数の値を切り替えできる。これにより、ユーザーが変数の値上のいかなる特別なステートメントの効果も分析することが容易となる。 The mental mill MetaSL debugger allows the user to jump to any statement in the shader code in any order. A particularly nice aspect of this feature is that when a code statement modifies the value of a variable of interest, the shader writer can easily return or go ahead from this statement, before and after the statement is executed. The value can be switched. This makes it easy for the user to analyze the effect of any special statement on the value of the variable.
ループ(for,for each, while ループのような)と条件ステートメント(ifとelseのような)は、このデバッグモデル内に興味ある状況を作成する。シェイダープログラムは、同時に複数のデータポイント上で動作するため、if/elseステートメントの文は、各データポイントに対して実行されることもされないこともある。
MetaSLデバッグは、ユーザーに、条件ステートメント内の変数の値を見るためのいくつかのオプションを提供する。問題は、選択されたステートメントを含むifまたはelse文を実行しないデータポイントをどのように処理するかである。これらのオプションモードには下記のものが含まれる。
Loops (like for, for each, while loops) and conditional statements (like if and else) create interesting situations within this debug model. Since shader programs operate on multiple data points simultaneously, the statements in the if / else statement may or may not be executed for each data point.
MetaSL debugging provides the user with several options for viewing the value of a variable in a conditional statement. The problem is how to handle data points that do not execute if or else statements that contain the selected statement. These optional modes include the following:
・最終シェイダー結果を示す−このモードでは、選択されたステートメントに到達しないデータポイントは、完全なシェイダーにより処理され、最終結果は、出力イメージに生成される。
・一定のカラーを示す−このモードでは、一定のカラーが、選択されたステートメントへ到達しないデータポイントに対する最終結果に置き換わる。これにより、ユーザーは、選択されたステートメントによりどのデータポイントが処理され、そしてされないかを容易に特定できる。これはそれ自身で、そしてそれ自身の有効なデバッグツールである。
Show final shader result-In this mode, data points that do not reach the selected statement are processed by the complete shader and the final result is generated in the output image.
Show constant color-In this mode, the constant color replaces the final result for data points that do not reach the selected statement. This allows the user to easily identify which data points are and will not be processed by the selected statement. This is an effective debugging tool by itself and by itself.
・破棄(discard)−このモードでは、選択されたステートメントが特別なデータポイントに対して到達しないと、シェイダーはそのデータポイントのみに対して廃棄され、出力イメージは修正されない。これは、実質的に、選択されたステートメントが到達されなかったデータポイントを含む表面の部分を除去する。
同様に、ループは各データポイントに対して異なる回数実行することができる。更に、ユーザーはシェイダープログラムにおけるいかなるステートメントへも任意にジャンプできるので、ループ内のステートメントを選択した場合は、ユーザーはループのどの繰り返しをユーザーが考慮しているかを指定しなければならない。ループが異なる回数、各データポイントに対して実行される可能性があるとすれば、いくつかのデータポイントは、所望の繰り返し回数に達する前にすでにループを抜けていることもある。
Discard—In this mode, if the selected statement does not reach a particular data point, the shader is discarded only for that data point and the output image is not modified. This essentially removes the portion of the surface that contains the data points for which the selected statement was not reached.
Similarly, the loop can be executed different times for each data point. In addition, the user can arbitrarily jump to any statement in the shader program, so when selecting a statement in the loop, the user must specify which iteration of the loop is considered by the user. Given that the loop may be executed for each data point a different number of times, some data points may have already exited the loop before reaching the desired number of iterations.
メンタルミルデバッガにより、ユーザーは、ループを通して、所望の繰り返し回数を指定するループカウント値を指定することができる。ループカウンタは、ゼロより大きい任意の値に設定できる。値が大きいほど、より多くのデータポイントが選択されたステートメントに到達しなくなり、実際、十分に大きな値が与えられると、選択されたステートメントへ到達するデータポイントはなくなる。選択されたステートメントが到達されない状況をコントロールするオプションもまたループに適用される。 The mental mill debugger allows the user to specify a loop count value that specifies the desired number of iterations through the loop. The loop counter can be set to any value greater than zero. The higher the value, the more data points will not reach the selected statement, and in fact, given a sufficiently large value, no data points will reach the selected statement. Options that control the situation where the selected statement is not reached also apply to the loop.
変数の値を、オブジェクトの表面上にマップされたカラーとして表現することは、変数がカラータイプの場合は、良好に機能することは明白である。この方法はまた、3成分以下のスカラーおよびベクトル値に対してもかなり良好に機能するが、正規なカラーを生み出すには値を0−1の範囲にマップしなければならない。メンタルミルUIにより、ユーザーは、それらの値をカラーにマップするために使用されるスカラーとベクトルに対する範囲を指定することができる。または、メンタルミルは、所与の視点から見たときの表面上の変数の値の最小値および最大値を決めることにより、その視点に対する範囲を自動的に計算できる。 It is clear that expressing the value of a variable as a color mapped on the surface of the object works well if the variable is of color type. This method also works fairly well for scalar and vector values of 3 components or less, but the values must be mapped to the 0-1 range to produce a regular color. The mental mill UI allows the user to specify ranges for scalars and vectors that are used to map those values to colors. Alternatively, the mental mill can automatically calculate the range for that viewpoint by determining the minimum and maximum values of the variables on the surface as viewed from a given viewpoint.
ユーザーが指定した範囲を使用してスカラーおよびベクトルをカラーにマッピングすることは、有効であるが、ユーザーが変数の値を、表面のカラーを見て推測するということが要求される。メンタルミルUIは、これらのデータタイプを視覚化する他の技術を提供する。方向(場所ではなく)を表現するベクトルタイプに対して、1つの視覚化技術は、下記のイラストのように、ユーザーがマウスを表面上でドラッグするときに、表面上に位置する矢印としてベクトルを描くことである。この視覚化技術は、図47A−Cに示される一連の部分的スクリーンショット630、632、および634に例示されている。 Mapping scalars and vectors to colors using user-specified ranges is useful, but requires the user to guess the value of the variable by looking at the color of the surface. The mental mill UI provides other techniques for visualizing these data types. For vector types that represent direction (not location), one visualization technique is to use a vector as an arrow located on the surface when the user drags the mouse over the surface, as shown in the illustration below. It is to draw. This visualization technique is illustrated in a series of partial screenshots 630, 632, and 634 shown in FIGS. 47A-C.
変数の数値もまた、ユーザーがオブジェクトの表面上でマウスを移動するときに、ツールチップに表示される。
マトリックスタイプの変数は視覚化に別の課題を課する。4行4列のマトリックスは、標準マトリックス表記にフォーマットされた数値の格子と見なすことができる。この視覚化技術は、図48に示される部分的スクリーンショット640に例示されている。
The numeric value of the variable is also displayed in the tooltip when the user moves the mouse over the surface of the object.
Matrix type variables impose another challenge on visualization. A 4-by-4 matrix can be viewed as a grid of numbers formatted in standard matrix notation. This visualization technique is illustrated in the partial screenshot 640 shown in FIG.
3行3列のマトリックスタイプの変数は、マトリックスの行を形成する3方向のベクトルのセットと考えることができる。これの共通の例は、接空間マトリックスであり、u'導関数、v'導関数、および法線から構成されている。マトリックスの3つの行ベクトルは、下記に示すように、マウスポインタの下の矢印として描くことができる。更に、マトリックスの個々の値は、標準マトリックスレイアウトに表示できる。この視覚化技術は、図49に示されている部分的スクリーンショット650に例示されている。 A matrix type variable of 3 rows and 3 columns can be thought of as a set of three directional vectors that form the rows of the matrix. A common example of this is the tangent space matrix, which consists of u 'derivatives, v' derivatives, and normals. The three row vectors of the matrix can be drawn as arrows below the mouse pointer, as shown below. Furthermore, the individual values of the matrix can be displayed in a standard matrix layout. This visualization technique is illustrated in the partial screenshot 650 shown in FIG.
方向を表現しないベクトルタイプの値は、ゲージスタイルディスプレイを使用して見ることができる。これらの値をカラーにマップする同じユーザー指定範囲を使用して、ユーザーが表面上の位置を選択したときに現れる、ゲージの範囲またはゲージのセットを設定できる。ユーザーが表面上でマウスを移動すると、ゲージは、ユーザー指定範囲に対する値を図示する。この視覚化技術は、図50に示されている部分的スクリーンショット660に例示されている。 Vector type values that do not represent direction can be viewed using a gauge style display. The same user-specified range that maps these values to colors can be used to set a gauge range or set of gauges that appears when the user selects a position on the surface. As the user moves the mouse over the surface, the gauge illustrates values for the user specified range. This visualization technique is illustrated in the partial screenshot 660 shown in FIG.
数値を含むベクトル矢印、ゲージ、またはツールチップが表示されると、ユーザーは、カラーにマップされた変数の値の代わりに、オブジェクトの表面上の最終シェイダー結果を見ることを選択できる。これにより、ユーザーは、選択された変数の値をモニタしながら、最終シェイダー結果における特徴に対応する表面の部分の位置を知ることができる。
メンタルミルデバッガが提供する別の有益な特徴は、マウスポインタを表面上で相互的に掃引するために使用する代わりに、特別なピクセル位置上にロックすることである。ユーザーは、ピクセルの位置を選択でき(それをマウスで選択するか、数値のピクセル座標を与えるかにより)、そのピクセル位置における変数の値は、ユーザーがコード中のステートメントを進むときに表示される。
When a vector arrow, gauge, or tooltip containing a numeric value is displayed, the user can choose to see the final shader result on the surface of the object instead of the value of the variable mapped to color. This allows the user to know the position of the portion of the surface corresponding to the feature in the final shader result while monitoring the value of the selected variable.
Another useful feature provided by the mental mill debugger is that it locks onto a special pixel location instead of using the mouse pointer to sweep across the surface. The user can select the location of the pixel (depending on whether it is selected with the mouse or given a numeric pixel coordinate) and the value of the variable at that pixel location is displayed as the user proceeds through the statements in the code .
メンタルミル・シェイダー・デバッガは、メンタルミルのプラットフォームに依存しない別の利点を示す。単一のMetaSLメタノード、または1つのフェノメノン全体は、作成かつデバッグでき、更に、複数のプラットフォームを目標にできる。
デバッガは、ハードウェアまたはソフトウェアモードで作動でき、いずれの特別なレンダリングアルゴリズムとは独立に機能する。シェイダーデバッガが、メンタルミルのフェノメノン作成環境にぎっしりと統合されている事実は、作成/テストサイクルを更に減少し、それにより、ユーザーは、シェイダーの作成者が高いレベルで、プラットフォームの依存性から隔離されて作業を続けることができる。
The mental mill shader debugger presents another advantage that is independent of the mental mill platform. A single MetaSL metanode, or an entire Phenomenon, can be created and debugged, and can target multiple platforms.
The debugger can operate in hardware or software mode and functions independently of any special rendering algorithm. The fact that the shader debugger is tightly integrated into the mental mill Phenomenon creation environment further reduces the creation / test cycle, thereby isolating users from platform dependencies at a high level of shader creators. Can continue working.
プロトタイプのアプリケーションが、このシェイダーデバッグシステムの概念の証明として作成された。
メンタルミルのアプリケーションは、このアプリケーションにより利用されるすべての機能を含むモジュラーライブラリ上に構築される。APIにより、サードパーティツールがメンタルミル技術をそのアプリケーションに統合することが可能になる。
A prototype application was created as a proof of concept for this shader debug system.
The mental mill application is built on a modular library that contains all the functions used by this application. The API allows third party tools to integrate mental mill technology into their applications.
メンタルミルレイ(登録商標)の将来の世代は、メンタルミルライブラリのいくつかのサブ構成要素にアクセスできるであろうが、それは、メンタルレイによるレンダリングを容易にするためにのみ行なう。完全なメンタルミルライブラリはメンタルミルレイとは別にライセンスが与えられる。
メンタルミルAPIのより詳細な文書資料は、将来の文書により入手できるであろう。
Future generations of mental mill Ray will have access to several sub-components of the mental mill library, but this is done only to facilitate rendering with mental ray. The complete mental mill library is licensed separately from mental mill ray.
More detailed documentation of the mental mill API will be available in future documents.
メンタルミル技術をサードパーティのアプリケーションに統合する際に、メンタルミルGUIをカスタマイズして、そのアプリケーションのルック&フィールに合わせることができる。メンタルミルAPIにより可能なGUIのカスタマイゼーションにはいくつかの方法がある。
・フェノメノングラフの外観−メタノードおよび接続線のようなフェノメノングラフの要素は、プラグインコールバック機能を起動することにより描くことができる。デフォルト描画機能が提供されるが、サードパーティもまたそれ自身の機能を提供でき、そのアプリケーションにより合うようにシェイダーグラフの外観をカスタマイズできる。コールバック機能はまた、ノードの要素を異なる位置に配置することが可能なので、マウス・ポイント・ヒット・テスティング(mouse point hit testing)にも対処する。
When integrating mental mill technology into third-party applications, the mental mill GUI can be customized to match the look and feel of the application. There are several ways to customize the GUI that are possible with the mental mill API.
Phenomenon graph appearance—Phenomenon graph elements such as metanodes and connecting lines can be drawn by invoking a plug-in callback function. A default drawing function is provided, but third parties can also provide their own functions and customize the appearance of the shader graph to better suit their application. The callback function also addresses mouse point hit testing, since the elements of the node can be placed at different locations.
・キーボードショートカット−すべてのキーボードコマンドは、再割付可能である。
・マウス動作−マウスボタンの割付けのようなマウス動作は、カスタマイズできる。
・ツールバーアイテム−各ツールバーアイテムは、省略することも、含めることもできる。
・ビューウィンドウ−各ビューウィンドウは、他のウィンドウに依存することなく、それ自身で作動するように設計される。これにより、サードパーティは、例えば、フェノメノングラフビューのみをそのアプリケーションに統合することができる。各ビューウィンドウは、APIにより駆動できるので、サードパーティは、ビューウィンドウのいかなる組合せも含むことができ、ビューウィンドウのいくつかを、それ自身のユーザーインタフェースと置換できる。
• Keyboard shortcuts-All keyboard commands are reassignable.
• Mouse actions-Mouse actions such as mouse button assignments can be customized.
Toolbar item—Each toolbar item can be omitted or included.
View windows-Each view window is designed to run on its own without depending on other windows. This allows the third party to integrate, for example, only the Phenomenon graph view into the application. Since each view window can be driven by an API, a third party can include any combination of view windows, and some of the view windows can be replaced with its own user interface.
C.MetaSL設計仕様
メンタルミル(商標)シェイディング言語(MetaSL(商標))は、カスタムシェイディング効果を実現するための強力なインタフェースを提供し、シェイダーが実行されるいかなる特別なプラットフォームからのアブストラクション(abstraction)として機能する。
C. MetaSL Design Specification Mental Mill ™ Shading Language (MetaSL ™) provides a powerful interface to achieve custom shading effects and abstraction from any special platform on which the shader is executed Function as.
レンダリングはCPU上、またはグラフィックプロセッサユニット(GPU)上で実行できるので、シェイダーはそれ自身、CPUまたはGPU上で作動する。グラフィックハードウェアとそれを駆動するAPIの機能の両者には、大きな違いがある。従って、グラフィックハードウェアを直接目標にした言語で書かれたシェイダーは、おそらく、ハードウェアおよびAPIが変化すると、書き換えなければならないだろう。更に、そのようなシェイダーは、ソフトウェアレンダラーにおいては作動せず、レイトレーシングのような、現在は、ソフトウェアのレンダリングにのみ利用できる機能はサポートしない。 Since the rendering can be performed on the CPU or on the graphics processor unit (GPU), the shader itself runs on the CPU or GPU. There is a big difference between the graphics hardware and the API functions that drive it. Thus, shaders written in a language that directly targets graphics hardware will likely have to be rewritten as hardware and APIs change. Furthermore, such shaders do not work in software renderers and do not support features currently only available for software rendering, such as ray tracing.
MetaSLは、いかなる目標プラットフォームからの独立性を維持することによりこの問題を解決する。シェイダーはいったんはMetaSLで書くことができ、MetaSLコンパイラは、それを任意のサポートされたプラットフォームへ自動的に変換する。新しいプラットフォームが登場して、グラフィックハードウェアの機能が変更されると、MetaSLで書かれたシェイダーは、書き換えの必要なく、新しい機能の利点を自動的に得るようになる。 MetaSL solves this problem by maintaining independence from any target platform. A shader can be written once in MetaSL, and the MetaSL compiler automatically converts it to any supported platform. As new platforms emerge and graphics hardware functionality changes, shaders written in MetaSL will automatically benefit from the new functionality without the need for rewriting.
ターゲットプラットフォームからのこの隔離により、MetaSLシェイダーが、ソフトウェアまたはハードウェアレンダリングモードにおいて自動的に作動できるようになる。同じシェイダーを使用して、マシン上のソフトウェアモードおよび他のマシン上のハードウェアモードをレンダリングすることができる。この機能の別の使用法は、異なる状況に対する、シェイダーの自動的な再目的化である。例えば、映画の視覚効果のために使用するように作成されたシェイダーは、その映画に基づくビデオゲームに対しても使用できる。 This isolation from the target platform allows the MetaSL shader to operate automatically in software or hardware rendering mode. The same shader can be used to render a software mode on a machine and a hardware mode on another machine. Another use of this feature is the automatic repurpose of shaders for different situations. For example, a shader created for use for visual effects in a movie can also be used for video games based on that movie.
多くの場合、同じMetaSLシェイダーを、レンダリングがソフトウェアまたはハードウェアにおいて実行され、ユーザーが複数のシェイダーを実行することを要求される、またはされないかに拘わらず使用することができる。ある場合には、ユーザーは、シェイダーをGPUまたはCPUに対してカスタマイズすることを所望することもある。言語は、これを行ないながら、依然としてMetaSLにおいて両者の技術を実行する機構を提供する。 In many cases, the same MetaSL shader can be used whether rendering is performed in software or hardware and the user is required or not to execute multiple shaders. In some cases, the user may want to customize the shader for the GPU or CPU. The language does this and still provides a mechanism to implement both technologies in MetaSL.
MetaSLコンパイラにより生成されたハードウェアシェイダーは、それが、メンタルレイ(登録商標)およびニューレイ(neuray)(商標)に基づくリアリティサーバー(Reality Server)(登録商標)の次世代によるレンダリングのみにしか使用できないという制限を受ける。メンタルミル(商標)フェノメノン(商標)作成技術は、メンタルレイによるレンダリングまたはゲームのような他のアプリケーションにより外部的に使用できるハードウェアシェイダーを生成する機能を提供する。 The hardware shader generated by the MetaSL compiler is only used for rendering by the next generation of Reality Server (R) based on Mental Ray (R) and Neuray (R) There is a restriction that you can't. Mental Mill ™ Phenomenon ™ creation technology provides the ability to generate hardware shaders that can be used externally by mental ray rendering or other applications such as games.
次節は、MetaSL言語仕様を説明する。MetaSLは、一般のプログラミング言語に見られるような広範囲にわたり、時折、理解が難しい特徴ではなく、共通のシェイディングアルゴリズムに必要なプログラミング要素に集中して、使い易いように設計されている。
MetaSLシェイダーのすべての要素は、シェイダーキーワードで示されるシェイダークラスにグループ化されている。
The next section describes the MetaSL language specification. MetaSL is designed to be easy to use, focusing on the programming elements necessary for a common shading algorithm, rather than the wide, sometimes difficult-to-understand features found in common programming languages.
All elements of MetaSL shaders are grouped into shader classes indicated by shader keywords.
shader my_shader{
// Contents of the shader are found here
};
単一のソースファイルは、複数のシェイダー定義を有することができる。シェイダークラスもまた、子シェイダーの名前の後に続き、コロンで分離されている親シェイダーの名前を記述することにより、別のシェイダーの定義を継承できる。
shader my_shader {
// Contents of the shader are found here
};
A single source file can have multiple shader definitions. A shader class can also inherit the definition of another shader by writing the name of the parent shader that follows the name of the child shader and is separated by a colon.
shader my_parent_shader{
//...
};
shader my_shader : my_parent_shader {
//...
};
これにより、すべての変形例に共通なシェイダー部分を共有しながら、シェイダータイプのいろいろな変形例が実行される。シェイダーの定義は単一の親シェイダーからのみ継承できる。
shader my_parent_shader {
// ...
};
shader my_shader: my_parent_shader {
// ...
};
As a result, various shader type variants are executed while sharing a shader portion common to all the variants. A shader definition can only be inherited from a single parent shader.
シェイダーは、シェイダーがその結果の値を決定するために使用する入力パラメータを、ゼロまたは1つ以上有することができる。パラメータは、下記のように任意の内蔵タイプを使用でき、または、これも下記のように、カスタム構造タイプを使用できる。
シーンにおいて使用されるとき、入力パラメータが文字による値を格納していることもあり、または別のシェイダーの結果に付加されることもあるが、シェイダーは、この可能性に関連する必要はない。シェイダーは、それが別のいずれかの変数をも参照するように、入力パラメータを参照できる。しかし、入力パラメータは読み込みのみ可能で、書き込みはできないことに注意されたい。
A shader can have zero or more input parameters that the shader uses to determine the resulting value. The parameter can be any built-in type as described below, or it can also be a custom structure type as described below.
When used in a scene, an input parameter may store a character value, or may be appended to the result of another shader, but the shader need not be related to this possibility. A shader can reference an input parameter just as it references any other variable. However, note that input parameters can only be read, not written.
シェイダーはその入力パラメータを、入力に示されるセクションにおいて宣言する。各パラメータの宣言が続くラベル。
shader my_shader {
input:
Color cO;
Color cl;
};
この例は、2つのカラー入力パラメータを有するシェイダーを宣言する。
A shader declares its input parameters in the section indicated in the input. A label followed by a declaration for each parameter.
shader my_shader {
input:
Color cO;
Color cl;
};
This example declares a shader with two color input parameters.
入力パラメータはまた、固定または可変サイズの配列であってよい。ダイナミック配列のサイズは前もって知ることはできないので、配列入力パラメータは、内蔵カウントパラメータを含む。「my array」と名前の付いた配列の長さは、my_array.countとして参照できる。固定長の入力パラメータは、ダイナミック配列とは異なり、宣言の一部として示される長さを有する。 Input parameters may also be fixed or variable sized arrays. Since the size of the dynamic array cannot be known in advance, the array input parameter includes a built-in count parameter. The length of the array named “my array” can be referred to as my_array.count. Fixed length input parameters, unlike dynamic arrays, have a length indicated as part of the declaration.
shader my_shader{
input:
int n[4]; // Fixed size array (count = 4)
int m[]; // Variable sized array
};
配列の配列は、入力パラメータタイプとしてはサポートされない。
shader my_shader {
input:
int n [4]; // Fixed size array (count = 4)
int m []; // Variable sized array
};
Arrays of arrays are not supported as input parameter types.
シェイダーは、少なくとも1つの出力パラメータを有していなければならないが、2つ以上有してもよい。出力パラメータは、シェイダーの結果を格納する。シェイダーの目的は、その入力パラメータのある関数を計算し、その関数の結果を出力パラメータに格納することである。
出力パラメータは、任意のタイプであってよく、ユーザー定義の構造タイプを含む。しかし、ダイナミック配列を含むことはできない。
A shader must have at least one output parameter, but may have more than one. The output parameter stores the shader result. The purpose of the shader is to calculate a function with that input parameter and store the result of that function in the output parameter.
The output parameter can be of any type and includes a user-defined structure type. However, it cannot contain dynamic arrays.
シェイダーは、その出力パラメータを、出力により示されるセクションにおいて宣言する。各パラメータの宣言が後に続くラベル。
shader my_shader{
output:
Color ambient_light;
Color direct_light;
};
この例は、2つのカラー出力を有するシェイダーを宣言する。多くのシェイダーは、慣習により「result」と名前が付けられる、単一の出力パラメータのみを有する。
A shader declares its output parameters in the section indicated by the output. A label followed by a declaration for each parameter.
shader my_shader {
output:
Color ambient_light;
Color direct_light;
};
This example declares a shader with two color outputs. Many shaders have only a single output parameter, customarily named “result”.
シェイダーは、入力または出力パラメータではない他の変数を宣言できるが、その代わりシェイダーにより読まれる他の値を格納する。レンダリングが始まる前に初期化するときに、シェイダーは、値を計算でき、それをメンバー変数に格納する。メンバー変数は、レンダリングが始まる前にいったん計算された値を保持するように設計されているが、その後は変化しない。これにより、シェイダーが呼び出される毎に値を計算するという冗長性を回避する。 A shader can declare other variables that are not input or output parameters, but instead store other values that are read by the shader. When initializing before rendering begins, the shader can calculate a value and store it in a member variable. Member variables are designed to hold values that are calculated once before rendering begins, but do not change thereafter. This avoids the redundancy of calculating the value each time the shader is called.
メンバー変数は、メンバー;キーワードにより示されたセクションにおいて宣言される。例えば、
shader my_shader {
input:
Scalar amount;
output:
Color result;
member:
Scalar noise_table [1024];
};
シェイダーの主な仕事は、1つまたは2つ以上の結果値を計算することである。これは、「main」と呼ばれるメソッドによりシェイダークラスにおいて実行される。このメソッドは、レンダラーがシェイダーの結果を必要なとき、またはシェイダーが別のシェイダーの入力パラメータに付加され、そのシェイダーがパラメータ値を必要なときにコールされる。
Member variables are declared in the section indicated by the member; keyword. For example,
shader my_shader {
input:
Scalar amount;
output:
Color result;
member:
Scalar noise_table [1024];
};
The main task of a shader is to calculate one or more result values. This is done in the shader class by a method called “main”. This method is called when a renderer needs the result of a shader, or when a shader is appended to another shader's input parameters and the shader needs a parameter value.
このメソッドの戻りタイプは常にボイドであり、つまり、値を戻さない。その代わり、シェイダーの結果は、その出力パラメータに置かれなければならない。
shader mix_colors{
input:
Color cO;
Color cl;
Scalar mix;
output:
Color result;
void main (){
result = co*(1.0-mix) + cl*mix;
}
};
この例としてのシェイダーは、第3ミックスパラメータに基づいて2つのカラーを混合する。
The return type of this method is always void, that is, it does not return a value. Instead, the shader result must be placed in its output parameter.
shader mix_colors {
input:
Color cO;
Color cl;
Scalar mix;
output:
Color result;
void main () {
result = co * (1.0-mix) + cl * mix;
}
};
This example shader mixes two colors based on a third mix parameter.
mainメソッドは、簡単なシェイダーに対しては都合のよいインラインメソッドとして実行される。メソッドが大きい場合は、そのメソッドをシェイダー定義とは別に実行することが望ましい。これを行なうため、メソッドの名前は、シェイダー名の前に付けなければならず、2つのコロンにより分離される。例えば、
void mix_colors::main(){
result = co* (1.0-mix) + cl*mix;
}
mainメソッドに加えて、mainメソッドに対してhelperメソッドとして機能する、他のメソッドもシェイダークラスで定義できる。これらのメソッドは、任意のタイプの値を返すことができ、任意タイプのパラメータのコールを容認する。メソッド宣言は、シェイダークラスに置かれ、次の例のようである。
The main method is executed as an inline method that is convenient for simple shaders. If the method is large, it is desirable to execute it separately from the shader definition. To do this, the name of the method must be prepended to the shader name, separated by two colons. For example,
void mix_colors :: main () {
result = co * (1.0-mix) + cl * mix;
}
In addition to the main method, other methods that function as helper methods for the main method can also be defined in the shader class. These methods can return any type of value and allow calls to any type of parameter. The method declaration is placed in the shader class, as in the following example:
Vector3 average_normals(Vector3 norml, Vector3 norm2);
mainメソッドの場合と同様に、helperメソッドの実行も、直接シェイダークラス定義において実行されるか、その外側で実行される。シェイダークラス定義の外側で実行されるときは、メソッドの名前を、シェイダーの名前の前に付けなければならず、その後に2つのコロンが続く。
Vector3 average_normals (Vector3 norml, Vector3 norm2);
As with the main method, the helper method is executed either directly in the shader class definition or outside of it. When executed outside a shader class definition, the name of the method must precede the name of the shader, followed by two colons.
MetaSLにより、メソッドのように、特別なシェイダークラスに直接関連しない関数の定義が可能になる。関数は、宣言が任意のシェイダークラスの外側に現れることを除けば、メソッドと同様に宣言される。関数は、その関数への参照の前に現れる宣言を有しなければならない。関数本体は、宣言の一部として含むことができ、または分離した関数宣言は、関数宣言の後に、ソースファイルにおいて後であってもよい。 MetaSL allows you to define functions that are not directly related to special shader classes, such as methods. Functions are declared like methods, except that the declaration appears outside of any shader class. A function must have a declaration that appears before the reference to the function. The function body can be included as part of the declaration, or the separate function declaration may be later in the source file after the function declaration.
メソッドと関数の両者は、同じ名前であるが、コールパラメータの別のセットである、別のメソッドまたは関数を定義することによりオーバーロードできる。関数またはメソッドのオーバーロードされたバージョンは、異なる数のパラメータまたはタイプが異なるパラメータ、またはその両者を有しなければならない。オーバーロードされた関数が、戻りタイプだけが異なるだけでは不十分である。 Both methods and functions can be overloaded by defining another method or function that has the same name but a different set of call parameters. An overloaded version of a function or method must have a different number of parameters and / or different types of parameters. It is not enough for overloaded functions to differ only in return type.
関数およびメソッドへのパラメータは、常に値により渡される。コールパラメータ宣言は、下記の修飾語の1つにより修飾でき、関数またはメソッドがコールパラメータを修正することを可能にし、その修正を、コール元に見えるようにできる。
・in−パラメータ値はコールされている関数にコピーされるが、写し出すことはできない。
Parameters to functions and methods are always passed by value. A call parameter declaration can be modified by one of the following modifiers, allowing a function or method to modify the call parameter and making the modification visible to the caller.
In—The parameter value is copied to the function being called, but cannot be copied.
・out−パラメータ値は、コールされている関数にコピーされず、コールされた関数により読まれても定義されない。しかし、コールされた関数は、パラメータ値を設定でき、その結果は、コール元により渡された変数にコピーして戻される。
・inout−パラメータ値は、コールされている関数にコピーされ、コール元により渡された変数に写し取られる。
Out—The parameter value is not copied to the called function and is not defined when read by the called function. However, the called function can set the parameter value and the result is copied back into the variable passed by the caller.
Inout—The parameter value is copied to the function being called and copied to the variable passed by the caller.
本発明の本形態によれば、関数およびシェイダーメソッドは、再帰的にコールすることはできないということに注意されたい。
シェイダークラスにおける別の特別に名前を付けられたメソッドは、「event」と呼ばれるメソッドである。このメソッドは、シェイダーが、シェイディング操作の前後にタスクを実行することを可能にするためにコールされる。時折、これらは「init」または「exit」関数と称される。
Note that according to this form of the invention, functions and shader methods cannot be called recursively.
Another specially named method in the shader class is a method called “event”. This method is called to allow the shader to perform a task before and after the shading operation. These are sometimes referred to as “init” or “exit” functions.
eventメソッドは、イベントを特定する、単一のEvent_typeパラメータにより渡される。図51は、本発明の本形態による、Event_typeパラメータのリストを説明する表670を示している。
すべてのinit/exitイベントは、Module__init/exit and Class_init/exitを除くスレッドローカル(threadlocal)変数へのアクセスを有している。
The event method is passed with a single Event_type parameter that identifies the event. FIG. 51 shows a table 670 describing a list of Event_type parameters according to this aspect of the invention.
All init / exit events have access to threadlocal variables except Module_init / exit and Class_init / exit.
shader my_shader{
input:
Color c;
output:
Color result;
member:
Scalar noise_table[1024];
void main();
void event(Event_type event) {
if (event == Instance_init) {
for (int i=0; i<1024; i++)
noise_table [i] = Random();
}
}
};
この例において、Instance initイベントは、処理され、ノイズテーブル配列は初期化されて乱数値を含むようになる。
shader my_shader {
input:
Color c;
output:
Color result;
member:
Scalar noise_table [1024];
void main ();
void event (Event_type event) {
if (event == Instance_init) {
for (int i = 0; i <1024; i ++)
noise_table [i] = Random ();
}
}
};
In this example, the Instance init event is processed and the noise table array is initialized to contain random values.
MetaSLは、基本的タイプの広範囲のセットを含む。これらの内蔵タイプは、シェイダーが有する必要性のほとんどをカバーするが、下記に記述するように、カスタム構造を定義することにも使用できる。
下記は、MetaSL固有タイプのリストである。
・Int−単一の整数値
・Bool−ブーリアン値(真または偽)
・Scalar−指定なし精度の浮動少数点値。このタイプは、目標プラットフォームの可能な最高精度にマップする。
MetaSL includes an extensive set of basic types. These built-in types cover most of the needs that shaders have, but can also be used to define custom structures, as described below.
The following is a list of MetaSL specific types.
Int-single integer value Bool-Boolean value (true or false)
Scalar-floating point value with unspecified precision. This type maps to the highest possible accuracy of the target platform.
・Vector2−2つのスカラー成分を有するベクトル
・Vector3−3つのスカラー成分を有するベクトル
・Vector4−4つのスカラー成分を有するベクトル
・Vector2i−2つの整数成分を有するベクトル
・Vector3i−3つの整数成分を有するベクトル
・Vector4i−4つの整数成分を有するベクトル
・Vector2b−2つのブーリアン成分を有するベクトル
・Vector3b−3つのブーリアン成分を有するベクトル
・Vector4b−4つのブーリアン成分を有するベクトル
・Matrix2x2−2行2列のマトリックス
・Matrix3x2−3行2列のマトリックス
・Matrix2x3−2行3列のマトリックス
・Matrix3x3−3行3列のマトリックス
・Matrix4x2−4行2列のマトリックス
・Matrix2x4−2行4列のマトリックス
・Matrix4x3−4行3列のマトリックス
・Matrix3x4−3行4列のマトリックス
・Matrix4x4−4行4列のマトリックス
・Color−r、g、b、およびスカラー成分のカラー
・Texture1d−一次元テクスチャ
・Texture2d−二次元テクスチャ
・Texture3d−三次元テクスチャ
・Texture cube−キューブマップテクスチャ
・Shader−シェイダーへの参照
・String−==および+演算子をサポートする文字列
MetaSLは、名前の付けられた整数定数のセットを表現するための便利な方法として、列挙(enumeration)を定義する関数を提供する。「enum」のキーワードが、括弧で囲まれた識別子のカンマ分離リストの前に使用される。例えば、
enum { LOW, MEDIUM, HIGH };
列挙は、名前を付けることもでき、その場合は、それは新しいタイプを定義する。列挙子(enumerator)もまた、明示的に値を割り当てることができる。例えば、
enum Detail {
LOW = 1,
MEDIUM = 2,
HIGH = 3
};
この例は、可能な値LOW、MEDIUM、およびHIGHを有するDetailと呼ばれる新しいタイプを定義する。列挙タイプ値は、暗黙的に整数に割り当てられ、その結果、明示的に割り当てられた値を有する整数となる。明示的な値が指定されない場合は、値は、最初の列挙子に対してゼロから開始して割り当てられ、その後、1つずつ増加される。
-Vector2-vector with two scalar components-Vector3-vector with three scalar components-Vector4-vector with four scalar components-Vector2i-vector with two integer components-Vector3i-vector with three integer components -Vector4i-vector with 4 integer components-Vector2b-vector with 2 Boolean components-Vector3b-vector with 3 Boolean components-Vector4b-vector with 4 Boolean components-Matrix2x2-2 by 2 matrix Matrix3x2-3 rows and 2 columns matrix-Matrix2x3-2 rows and 3 columns matrix-Matrix3x3-3 rows and 3 columns matrix-Matrix4x2-4 rows and 2 columns matrix-Matrix2x4-2 rows and 4 columns matrix-Matrix4x3-4 rows 3 Matrix of columns-Matrix3x4-3 rows by 4 columns-Matrix4x4-4 rows by 4 Color-r, g, b, and scalar component colors Texture1d-one-dimensional texture Texture2d-two-dimensional texture Texture3d-three-dimensional texture Texture cube-cube map texture Shader-reference to shader-String A string that supports the − == and + operators
MetaSL provides functions that define enumerations as a convenient way to represent a set of named integer constants. The keyword “enum” is used before the comma separated list of parenthesized identifiers. For example,
enum {LOW, MEDIUM, HIGH};
An enumeration can also be named, in which case it defines a new type. An enumerator can also be explicitly assigned a value. For example,
enum Detail {
LOW = 1,
MEDIUM = 2,
HIGH = 3
};
This example defines a new type called Detail with possible values LOW, MEDIUM, and HIGH. An enumeration type value is implicitly assigned to an integer, resulting in an integer having an explicitly assigned value. If no explicit value is specified, the value is assigned to the first enumerator starting from zero and then incremented by one.
すべてのベクトルタイプは、同様な方法でアクセスできる成分を有する。成分は、変数名にピリオドを付けて、その後に、[x、y、z、w]の1つを続けることにより参照できる。長さ2のベクトルは、xおよびy成分のみを有することができ、長さ3のベクトルは、x、y、およびzを有し、長さ4のベクトルは、4成分すべてを有する。
ベクトル成分を参照するときは、同時に複数の成分にアクセスできるが、結果は、同じまたは異なる長さの別のベクトルである。成分の順序もまた任意であってよく、同じ成分を、2回以上使用することもできる。例えば、長さ3のベクトルVに対しては、
・ V.xyは2成分ベクトル<x,y>を返す
・ V.zyxは3成分ベクトル<z,y,x>を返す
・ V.xxyyは4成分ベクトル<x,x,y,y>を返す
ベクトルに書くときに、同じ構文をマスクとして使用できる。違いは、割り当ての左側の成分を繰り返すことができないということである。
All vector types have components that can be accessed in a similar manner. Components can be referenced by appending a period to the variable name followed by one of [x, y, z, w]. A vector of length 2 can have only x and y components, a vector of length 3 has x, y, and z, and a vector of length 4 has all four components.
When referring to a vector component, multiple components can be accessed simultaneously, but the result is another vector of the same or different length. The order of the components can also be arbitrary, and the same component can be used more than once. For example, for a vector V of length 3,
・ V.xy returns a two-component vector <x, y> ・ V.zyx returns a three-component vector <z, y, x> ・ V.xxyy returns a four-component vector <x, x, y, y> The same syntax can be used as a mask when writing to the return vector. The difference is that the left component of the assignment cannot be repeated.
V.yz = Vector2(0.0, 0.0);
この例において、yとz成分は、0.0に設定され、xとy成分は変更されない。
ベクトル成分もまた、配列インデックスを使用してアクセスでき、配列インデックスは変数であってよい。
Scalar sum = 0.0;
for (int i=0; i<4; i++)
sum += V[i];
この例において、Vector4 Vは、ループを使用して合計した成分を有する。
V.yz = Vector2 (0.0, 0.0);
In this example, the y and z components are set to 0.0 and the x and y components are not changed.
Vector components can also be accessed using an array index, which can be a variable.
Scalar sum = 0.0;
for (int i = 0; i <4; i ++)
sum + = V [i];
In this example, Vector4 V has components summed using a loop.
ベクトルは、要素の合計数が、構築中のベクトルにおける要素の数以上であれば、他のベクトル(またはカラー)から直接構築できる。要素は、それらが一覧表示されたときの順序でコンストラクタパラメータから取り出される。
Vector4 v4(1.0, 2.0, 3.0, 4.0);
Vector2 v2(v4);
Vector3 v3(0.0, v2);
上記の3つのベクトルコンストラクタコールはすべて適性である。この例は、図52で示した表680に記載した値により初期化された3つのベクトルの結果となる。
A vector can be constructed directly from another vector (or color) if the total number of elements is greater than or equal to the number of elements in the vector being constructed. Elements are taken from the constructor parameters in the order in which they are listed.
Vector4 v4 (1.0, 2.0, 3.0, 4.0);
Vector2 v2 (v4);
Vector3 v3 (0.0, v2);
The above three vector constructor calls are all appropriate. This example results in three vectors initialized with the values listed in Table 680 shown in FIG.
標準数学演算子(+,-,*,/)は、すべてのベクトルに適用され、成分に関して演算を行なう。標準数学演算子は、オーバーロードされて、式において異なるサイズのスカラーおよびベクトルの混合を可能にするが、いかなる単一の式においても、すべてのベクトルは同じサイズを有しなければならない。スカラーがベクトルと混合されると、スカラーは、各要素がスカラーの値に設定された、同じサイズのベクトルに促進される。 Standard mathematical operators (+,-, *, /) apply to all vectors and operate on components. Standard mathematical operators are overloaded to allow a mixture of differently sized scalars and vectors in an expression, but in any single expression all vectors must have the same size. When a scalar is mixed with a vector, the scalar is promoted to a vector of the same size, with each element set to a scalar value.
Vector2 vl(a,b);
Vector2 v2(c,d);
Vector2 result '= (vl+v2) * e;
この例において、変数a、b、c、d、およびeは、すべて以前に宣言されたスカラー値である。変数の結果は、値<(a+c)*e, (b+d)*e>を有する。
Vector2 vl (a, b);
Vector2 v2 (c, d);
Vector2 result '= (vl + v2) * e;
In this example, the variables a, b, c, d, and e are all scalar values previously declared. The result of the variable has the values <(a + c) * e, (b + d) * e>.
標準ブーリアン論理演算子は、ブーリアンの個々またはベクトルにも適用できる。ブーリアンのベクトルに適用されると、成分に関して演算を行ない、ベクトル結果をもたらす。これらの演算子は、図53で示した表690中に一覧表示されている。
ビットに関する演算子はサポートされていない。比較演算子はサポートされており、ベクトルに対して、成分に関する演算を行ない、ブーリアンベクトル結果をもたらす。サポートされている比較演算子のリストは、図54に示す表700に記載されている。
Standard Boolean logic operators can also be applied to Boolean individual or vectors. When applied to a Boolean vector, it operates on the components and yields a vector result. These operators are listed in the table 690 shown in FIG.
Bit operators are not supported. Comparison operators are supported and perform operations on the components on the vectors, yielding a Boolean vector result. A list of supported comparison operators is set forth in table 700 shown in FIG.
3値条件演算子もまた、成分に関して、ベクトルオペランドに適用できる。条件オペランドは、成分の数が、第2および第3オペランドの成分と同じである、単一なブーリアン式またはベクトルブーリアン式でなければならない。
Vector2 vl(1.0, 2.0);
Vector2 v2(2.0, 1.0);
Vector2 result = vl < v2 ? Vector2(3.0, 4.0): Vector2 (5.0, 6.0);
この例において、結果変数は値<3.0、6.0>を保持する。
Ternary conditional operators can also be applied to vector operands in terms of components. The conditional operand must be a single Boolean expression or a vector Boolean expression with the same number of components as the components of the second and third operands.
Vector2 vl (1.0, 2.0);
Vector2 v2 (2.0, 1.0);
Vector2 result = vl <v2? Vector2 (3.0, 4.0): Vector2 (5.0, 6.0);
In this example, the result variable holds the value <3.0, 6.0>.
Colorタイプのインスタンスは、その構造において、Vector4のインスタンスと同一であるが、そのメンバーは、[x、y、z、w]の代わりに、[r、g、b、a]により参照され、それぞれ、赤、緑、青、およびアルファ成分を意味する。
それらは、Vector4が使用できる場所であればどこでも使用でき、Vector4に適用されるすべての演算は、Colorでも同様に作用する。このタイプの主な目的は、コードの可読性である。そうでない場合は、このタイプは論理的にVector4と同義である。
An instance of the Color type is identical in structure to that of Vector4, but its members are referenced by [r, g, b, a] instead of [x, y, z, w], respectively Means red, green, blue, and alpha components.
They can be used wherever Vector4 can be used, and all operations applied to Vector4 work equally well with Color. The main purpose of this type is code readability. Otherwise, this type is logically synonymous with Vector4.
マトリックスは、2から4の範囲のサイズの行と列により定義される。すべてのマトリックスは、Scalarタイプの要素から構成されている。マトリックスの要素は、配列インデックスがマトリックスから行を選択する配列の表記法(行優先順序)を使用して参照することもできる。結果としての行は、元のマトリックスのサイズにより決まり、Vector2、Vector3、またはVector4である。マトリックスのインデックス付けの結果は、ベクトルであり、ベクトルタイプもインデックス演算子をサポートするので、マトリックスの個々の要素は、多次元配列に対しての構文と同様な構文によりアクセスできる。 The matrix is defined by rows and columns with sizes ranging from 2 to 4. All matrices are composed of Scalar type elements. Matrix elements can also be referenced using an array notation (row priority order) in which the array index selects a row from the matrix. The resulting row depends on the size of the original matrix and is Vector2, Vector3, or Vector4. The result of matrix indexing is a vector, and the vector type also supports index operators, so that the individual elements of the matrix can be accessed with a syntax similar to that for multidimensional arrays.
Matrix4x3 mat(
1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.5, 0.0);
Vector4 row;
Scalar element;
// row will equal <0.0, 1.0, 0.0> after the assignment
row = mat[I];
// element will equal 0.5 after the assignment
element = mat[3][1]
この例により示されるように、マトリックスは、行優先順序で要素の値を容認するコンストラクタも有する。マトリックスは、下記の例のように、行ベクトルを指定することでも構築できる。
Matrix4x3 mat (
1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.5, 0.0);
Vector4 row;
Scalar element;
// row will equal <0.0, 1.0, 0.0> after the assignment
row = mat [I];
// element will equal 0.5 after the assignment
element = mat [3] [1]
As shown by this example, the matrix also has a constructor that accepts the values of the elements in row-first order. A matrix can also be constructed by specifying a row vector, as in the example below.
Vector3 row0(1.0, 0.0, 0.0);
Vector3 row1(0.0, 1.0, 0.0);
Vector3 row2(0.0, 0.0, 1.0);
Vector3 row3(0.0, 0.0, 0.0);
Matrix4x3 mat(row0, row1, row2, row3);
マトリックスコンストラクタに渡されたベクトルの要素の数は、構築されているマトリックスの行における要素数と合わなければならない。
Vector3 row0 (1.0, 0.0, 0.0);
Vector3 row1 (0.0, 1.0, 0.0);
Vector3 row2 (0.0, 0.0, 1.0);
Vector3 row3 (0.0, 0.0, 0.0);
Matrix4x3 mat (row0, row1, row2, row3);
The number of vector elements passed to the matrix constructor must match the number of elements in the matrix row being constructed.
乗算演算子は、2つのマトリックスまたはマトリックスとベクトルの乗算のためにサポートされ、その2つの間で線形代数スタイルの乗算を行なう。2つのマトリックスを乗算するときに予想されるように、左側のマトリックスの列数は、右側のマトリックスの行数に等しくなければならない。N×TマトリッスをT×Mマトリックスに乗算した結果は、N×Mマトリックスである。ベクトルは、ベクトルがマトリックスの左側にあるときに、要素数が行数に等しければ、そして、ベクトルが右側にあるときに、要素数が列数に等しければ、右側からでも左側からでも乗算できる。 The multiplication operator is supported for two matrix or matrix-vector multiplications and performs a linear algebra style multiplication between the two. As expected when multiplying two matrices, the number of columns in the left matrix must be equal to the number of rows in the right matrix. The result of multiplying the N × T matrix by the T × M matrix is an N × M matrix. A vector can be multiplied from either the right side or the left side if the number of elements is equal to the number of rows when the vector is on the left side of the matrix and if the number of elements is equal to the number of columns when the vector is on the right side.
自動的タイプ変換は、1つのタイプの変数を別のタイプの変数に割り当てることを可能にする。唯一の制限は、暗黙的にベクトルを変換するときに、変換は同じサイズのベクトルに対してであるということである。異なるサイズのベクトル間で、またはスカラー間で変換するためには、コンストラクタが使用できるか、または.xyzw表記が使用できるかである。例えば、
Vector3 v3(0,0,0);
Vector2 v2 = Vector2(v3.x, v3.y);
or:
Vector3 v3(0,0,0);
Vector2 v2 = v3.xy;
.xyzw表記は、ベクトルを生成するために、Scalarタイプの変数に適用できる。例えば、
Scalar s = 0.0;
Vector3 v3 = s.xxx;
この状況では、1つの要素ベクトルと考えられるスカラーに対しては、x要素のみが有効である。
Automatic type conversion allows one type of variable to be assigned to another type of variable. The only limitation is that when implicitly transforming a vector, the transform is for vectors of the same size. To convert between vectors of different sizes or between scalars, you can use constructors or use the .xyzw notation. For example,
Vector3 v3 (0,0,0);
Vector2 v2 = Vector2 (v3.x, v3.y);
or:
Vector3 v3 (0,0,0);
Vector2 v2 = v3.xy;
The .xyzw notation can be applied to Scalar type variables to generate vectors. For example,
Scalar s = 0.0;
Vector3 v3 = s.xxx;
In this situation, only x elements are valid for a scalar that is considered to be one element vector.
スカラーを整数に変換するような、精度が落ちる結果となる可能性のある変換は可能だが、コンパイラ警告が発せられる。この警告は、シェイダーのライターが所望するならば発せられないようにできる。
MetaSLは、内蔵タイプの、またはユーザー定義構造のいずれの配列もサポートするが、固定長の配列のみがシェイダー関数においては宣言できる。2つの例外がある。入力パラメータの節で述べたように、シェイダー入力は、ダイナミックなサイズを有する配列として宣言できる。他の例外は、関数またはメソッドに対するパラメータであり、指定されないサイズの配列であってよい。これら両者の場合において、レンダリング中に、シェイダーが起動されるまでには、配列変数の実際のサイズが分かる。シェイダーコードはname. countとして配列のサイズを参照でき、ここにおいてnameは配列変数名である。
Conversions that can result in a loss of precision, such as converting a scalar to an integer, are possible, but a compiler warning is issued. This warning can be disabled if desired by the shader lighter.
MetaSL supports both built-in and user-defined structure arrays, but only fixed-length arrays can be declared in shader functions. There are two exceptions. As mentioned in the Input Parameters section, shader inputs can be declared as an array with a dynamic size. Another exception is a parameter to a function or method, which may be an unspecified size array. In both cases, during rendering, the actual size of the array variable is known by the time the shader is activated. The shader code can refer to the size of the array as name.count, where name is the name of the array variable.
Scalar sum_array(Scalar values[]) {
Scalar sum = 0.0;
for (int i=0; i<values.count; i++)
sum += values[i];
return sum;
}
Scalar a_function() {
Scalar foo[8]; ... // initialize members of foo
return sum_array(foo);
}
この簡単な例は、配列上をループし、成分を合計する。この機能に対するコードは、配列のサイズを実際には知ることなく書かれたが、シェイディングのときは、サイズも分かる。配列変数が配列シェイダーパラメータからもたらされるか、または固定サイズの配列がコール関数において宣言されるかである。
Scalar sum_array (Scalar values []) {
Scalar sum = 0.0;
for (int i = 0; i <values.count; i ++)
sum + = values [i];
return sum;
}
Scalar a_function () {
Scalar foo [8]; ... // initialize members of foo
return sum_array (foo);
}
This simple example loops over the array and sums the components. The code for this feature was written without actually knowing the size of the array, but when shading it also knows the size. Either the array variable comes from an array shader parameter or a fixed size array is declared in the call function.
カスタム構造タイプは、MetaSLシェイダーにより使用されるタイプのセットを拡張するために定義できる。構造タイプ定義の構文は、下記の例のようである。
struct Color_pair {
Color a;
Color b;
};
この例において、Color対と呼ばれる新しいタイプは、2つのカラーから構成されるものとして定義される。
Custom structure types can be defined to extend the set of types used by MetaSL shaders. The structure type definition syntax looks like the example below.
struct Color_pair {
Color a;
Color b;
};
In this example, a new type called Color pair is defined as consisting of two colors.
構造メンバー変数は、いかなる内蔵タイプでもよく、入れ子構造を作成するための別のユーザー定義構造タイプでもよい。構造メンバーは、配列であってもよい。
ユーザー定義構造および列挙は、MetaSLにおけるユーザー定義タイプの唯一の形態である。
シェイダーのmainメソッド内で、特別な状態変数は、暗黙的に宣言され、シェイダーコードが参照するために利用できる。これらの変数は、シェイダーコールという結果になったインターセクションについての情報と共に、レンダラーの現在の状態の両者を記述する値を保持している。例えば、法線は、インターセクションの点において内挿された法線を参照する。
The structure member variable can be any built-in type, or another user-defined structure type for creating a nested structure. The structural member may be a sequence.
User-defined structures and enumerations are the only form of user-defined types in MetaSL.
Within the shader's main method, special state variables are declared implicitly and are available for reference by the shader code. These variables hold values that describe both the renderer's current state, as well as information about the intersection that resulted in the shader call. For example, normals refer to normals interpolated at intersection points.
これらの変数は、シェイダーのmainメソッドの内部においてのみ利用できる。シェイダーがhelperメソッド内のこれらの状態変数の1つにアクセスしようとするとき、変数は明示的にそのメソッドに渡されなければならない。
状態変数のこのセットは、すべてのシェイダーに対しては、暗黙的入力として見える。状態入力のデータタイプは、シェイダーが利用できるすべての状態変数を含むストラクトである。特別状態シェイダーは、この暗黙的入力に接続できる。状態シェイダーは、各状態メンバーに対する入力を有しており、その状態ストラクトを出力する。
These variables are only available inside the shader's main method. When a shader tries to access one of these state variables in a helper method, the variable must be explicitly passed to that method.
This set of state variables appears to all shaders as an implicit input. The state input data type is a struct that contains all the state variables available to the shader. Special state shaders can connect to this implicit input. The state shader has an input for each state member and outputs its state struct.
状態のデータメンバーは、直接は修正できないが、状態を入力として開示すると、1つのシェイダーが、別のシェイダーが、そのシェイダーにより使用される状態値を駆動することを可能にしながら、状態変数を参照することが可能になる。シェイダーの状態入力が付加されないままでいると、シェイダー内からの、状態変数へのいかなる参照も、修正されていない状態値への参照に戻ってしまう。 State data members cannot be modified directly, but disclosing the state as an input refers to a state variable while allowing one shader to drive the state value used by that shader. It becomes possible to do. If the shader state input is left unattached, any reference to the state variable from within the shader will revert to a reference to the unmodified state value.
例えば、照明を計算するシェイダーは、インターセクションの点において垂直な表面を参照する可能性がある。バンプマップシェイダーは、それが、状態法線の組み合わせから計算する修正された法線と、グレースケールのイメージから導出された乱れを作成できる。状態シェイダーは、このように法線を入力としてエクスポーズする照明シェイダーへ付加できる。次に、バンプシェイダー出力は、状態シェイダーの法線入力に付加できる。 For example, a shader that calculates illumination may reference a vertical surface at the intersection point. A bump map shader can create modified normals that it computes from a combination of state normals and perturbations derived from grayscale images. A state shader can thus be added to an illumination shader that exposes the normal as input. The bump shader output can then be added to the normal input of the state shader.
照明シェイダーは、シーンの照明上を繰り返す照明ループを含み、間接的に、照明シェイダーを評価させる可能性が最もある。照明シェイダーに渡された状態値は、表面シェイダーに提供された状態値と同じである。状態は状態シェイダーにより修正されると、その修正は、照明シェイダーにも影響を与える。
暗黙的状態入力パラメータのこのシステムは、シェイダーの書き込みを簡単にする。シェイダーは容易に状態変数を参照でき、一方、同時に別のシェイダーを、その状態変数を修正するために付加する可能性を維持している。状態はそれ自身、実際には修正されないので、別のシェイダーに悪影響を与える危険はない。
The lighting shader includes a lighting loop that repeats over the lighting of the scene, most likely indirectly causing the lighting shader to be evaluated. The state value passed to the lighting shader is the same as the state value provided to the surface shader. If the state is modified by the state shader, the modification also affects the lighting shader.
This system of implicit state input parameters simplifies shader writing. A shader can easily reference a state variable while maintaining the possibility of adding another shader to modify the state variable at the same time. The state itself is not actually corrected, so there is no risk of adversely affecting another shader.
図55は、本発明の本形態による、バンプマッピングを例示する模式図710を示す。最初は、これは少し複雑に見えるかもしれないが、バンプマッピングを実行するグラフは、フェノメノンノード内に詰めることができ、あたかも単一のシェイダーのように見える。
「Perturb法線」シェイダーは、グレースケールイメージの3つのサンプルを使用して、乱れ量を作成する。バンプマップテクスチャをサンプリングするために使用されるテクスチャ座標は、UおよびV方向の両者においてオフセットされており、UおよびV方向におけるグレースケールイメージの勾配を計算することが可能になる。
FIG. 55 shows a schematic diagram 710 illustrating bump mapping according to this aspect of the invention. At first, this may seem a bit complicated, but the graph that performs the bump mapping can be packed inside the Phenomenon node and looks like a single shader.
The “Perturb normal” shader uses three samples of a grayscale image to create a turbulence amount. The texture coordinates used to sample the bump map texture are offset in both the U and V directions, making it possible to calculate the gradient of the grayscale image in the U and V directions.
「量」入力は、乱れ量を拡大/縮小する。「Perturb法線」シェイダーは、この乱れを状態の法線に追加して、新しい修正法線を作成する。
3つの「Textureルックアップ」シェイダーが「Perturb法線」シェイダーの入力を駆動する。これらのシェイダーの2つは、付加された状態シェイダーから修正テクスチャ座標を供給される。状態シェイダーはそれ自身「Offset座標」シェイダーにより作成された修正テクスチャ座標が供給される。
The “amount” input enlarges / reduces the amount of disturbance. The “Perturb Normal” shader adds this perturbation to the state normal and creates a new modified normal.
Three “Texture Lookup” shaders drive the inputs of the “Perturb Normal” shader. Two of these shaders are supplied with modified texture coordinates from the attached state shader. The state shader is itself supplied with modified texture coordinates created by the “Offset coordinates” shader.
模式図全体は、フェノメノンに含まれるので、すべてのユーザーがこの詳細に関心を持つ必要はない。バンプマップフェノメノンは、Texture2dタイプの入力を有し、それは3つのテクスチャルックアップのすべてに供給される。「オフセット」入力により、ユーザーはUおよびV方向におけるオフセットを、単一パラメータによりコントロールできるようになる。「Perturb法線」シェイダーの「量」入力もまた入力としてバンプマップフェノメノンに開示される。 The entire schematic is contained in Phenomenon, so not all users need to be interested in this detail. The Bump Map Phenomenon has a Texture2d type input that feeds all three texture lookups. The “Offset” input allows the user to control the offset in the U and V directions with a single parameter. The “Perturb Normal” shader “Quantity” input is also disclosed as an input to the Bump Map Phenomenon.
図56は、使用中のバンプマップフェノメノンを例示している図720を示している。フォンシェイダー(phong shader)は、それがシーン照明上をループするとき、暗黙的に状態法線を参照する。この場合、フォンシェイダー入力は、状態シェイダーに付加され、バンプシェイダーにより作成された修正法線は、状態シェイダーの法線入力に付加される。
状態シェイダーの存在は、シーンの背後で何が起きているかを、ユーザーに非常に明確にする。興味あるユーザーは、バンプマップフェノメノンを開けて、バンプマップアルゴリズムを視覚的に描写しているグラフを見ることができる。
FIG. 56 shows a diagram 720 illustrating a bump map phenomenon in use. A phong shader implicitly refers to the state normal when it loops over scene lighting. In this case, the von shader input is added to the state shader, and the modified normal created by the bump shader is added to the normal input of the state shader.
The presence of a state shader makes it very clear to the user what is happening behind the scene. Interested users can open the Bump Map Phenomenon and see a graph that visually depicts the Bump Map Algorithm.
状態変数のセットには以下が含まれる。位置、法線、原点、方向、距離、texture_coord_n、およびscreen_position。このリストは、それをより広範囲にするために補充できる。プリプロセッサを使用して、これらの長い名前を共通の短い名前の省略(1文字のこともよくある)で置き換えることもできることに注意されたい。
代替の構成においては、状態変数パラメータが、ノードに追加される。本発明の本形態によれば、特別状態変数のセットは、シェイダーのmainメソッド内で、暗黙的に宣言され、シェイダーコードが参照のために利用できる。これらの変数は、シェイダーコールにつながるインターセクションについての情報と共に、レンダラーの現在の状態の両者を記述する値を保持している。例えば、normal変数は、インターセクションの点における内挿された法線を参照する。
The set of state variables includes: Position, normal, origin, direction, distance, texture_coord_n, and screen_position. This list can be replenished to make it more extensive. Note that a preprocessor can be used to replace these long names with a common short name abbreviation (often a single letter).
In an alternative configuration, state variable parameters are added to the node. According to this aspect of the invention, the set of special state variables is implicitly declared in the shader's main method, and the shader code is available for reference. These variables hold values describing both the renderer's current state, as well as information about the intersection that leads to the shader call. For example, the normal variable refers to the interpolated normal at the intersection point.
本発明の本形態によると、これらの変数は、シェイダーのmainメソッドの内部でのみ利用できる。シェイダーが、helperメソッド内のこれらの状態変数の1つへのアクセスを所望すると、変数は、そのメソッドへ明示的に渡されなければならない。または、状態変数それ自身を別のメソッドに渡してもよく、その場合は、すべての状態変数は、そのメソッドで利用可能になる。 According to this form of the invention, these variables are only available inside the shader's main method. If a shader wants access to one of these state variables in a helper method, the variable must be explicitly passed to that method. Alternatively, the state variable itself may be passed to another method, in which case all the state variables are made available to that method.
状態変数のこのセットは、デフォルトにより、状態それ自身に付加された、すべてのシェイダーへの暗黙的な入力と見なすことができる。しかし、1つまたは2つ以上の入力パラメータを、名前が状態変数に対応しているシェイダーのインスタンスに動的に追加することもできる。その場合、これらの入力は状態値に上書きされ、元のシェイダーソースコードを修正することなく、別のシェイダーの結果への接続が可能になる。上書きされる入力パラメータにより状態変数を修正することに加えて、シェイダーは、MetaSLインプレメンテーションにおける割当てステートメントにより、状態変数を直接修正することもできる。 This set of state variables can be considered by default as an implicit input to all shaders attached to the state itself. However, one or more input parameters can be dynamically added to the shader instance whose name corresponds to the state variable. In that case, these inputs are overwritten with the state value, allowing connection to the result of another shader without modifying the original shader source code. In addition to modifying state variables with overwritten input parameters, shaders can also modify state variables directly through assignment statements in the MetaSL implementation.
状態変数を入力として開示することにより、1つのシェイダーが状態変数を参照することが可能になり、一方、別のシェイダーはそのシェイダーにより使用される状態変数を駆動することが可能になる。特別に参照された状態変数に対して、入力パラメータがない場合は、その変数は元の状態値を参照し続ける。
例えば、照明を計算するシェイダーは、典型的にインターセクションの点における表面法線を参照する。バンプマップシェイダーは、状態法線とグレースケールイメージから導出されたパーターベーションの組合せから計算して、修正法線を生成することもある。「normal」と呼ばれるパラメータを、照明シェイダーのインスタンスに追加することにより、normalを、入力として、その特別のインスタンスに対してのみ開示することができる。そして、バンプシェイダーの出力は、シェイダーのnormal入力に付加できる。
Disclosing a state variable as input allows one shader to reference the state variable, while another shader can drive the state variable used by that shader. If there is no input parameter for a specially referenced state variable, the variable will continue to reference the original state value.
For example, shaders that calculate illumination typically reference surface normals at intersection points. A bump map shader may generate a modified normal by calculating from a combination of state normals and perturbations derived from grayscale images. By adding a parameter called “normal” to an instance of a lighting shader, normal can be disclosed as input only to that particular instance. The output of the bump shader can then be added to the shader's normal input.
本発明の更なる形態によれば、照明シェイダーは、シーンの照明上を繰り返す照明ループを含み、照明シェイダーを直接評価させる。照明シェイダーに渡された状態変数は、表面シェイダーに提供されたものと同じ状態値となる。状態変数がパラメータにより上書きされるか、またはシェイダー内で修正されると、その修正は照明シェイダーにも影響する。しかし、すべての入力パラメータは、シェイダーが実行を始める前に評価されるので、入力パラメータに付加されたシェイダーに影響を与える状態変数を修正することはできない。 According to a further aspect of the invention, the lighting shader includes a lighting loop that repeats over the illumination of the scene, allowing the lighting shader to be evaluated directly. The state variables passed to the illumination shader will have the same state values as those provided to the surface shader. If the state variable is overwritten by a parameter or modified in the shader, the modification also affects the lighting shader. However, since all input parameters are evaluated before the shader begins execution, it is not possible to modify state variables that affect the shader attached to the input parameters.
暗黙的状態入力パラメータのこのシステムは、シェイダーの書込みを単純化する。シェイダーは容易に状態変数を参照でき、一方、同時に、別のシェイダーを付加してその状態変数を修正する可能性もまた維持する。
図57は、バンプマップフェノメノン732の模式図730を示している。図57に示されるように、バンプマッピングを実行するグラフは、フェノメノンノード内部に詰め込むことができ、あたかも単一シェイダーのように見える。
This system of implicit state input parameters simplifies shader writing. A shader can easily reference a state variable, while at the same time maintaining the possibility of adding another shader to modify that state variable.
FIG. 57 shows a schematic diagram 730 of the bump map phenomenon 732. As shown in FIG. 57, the graph performing the bump mapping can be packed inside the Phenomenon node and looks like a single shader.
「Perturb 法線」シェイダー734は、パーターベーション量を作成するために、グレースケールイメージの3つのサンプルを使用する。バンプマップテクスチャをサンプリングするテクスチャ座標は、UおよびV方向の両者においてオフセットされ、これにより、UおよびV方向におけるグレースケールイメージの勾配を計算できる。「量」入力は、パーターベーションの量を拡大/縮小する。「Perturb 法線」シェイダー734は、このパーターベーションを状態「normal」に追加して新しい修正「normal」を作成する。 The “Perturb Normal” shader 734 uses three samples of the grayscale image to create the perturbation amount. The texture coordinates that sample the bump map texture are offset in both the U and V directions, so that the gradient of the grayscale image in the U and V directions can be calculated. The “amount” input scales the perturbation amount. The “Perturb Normal” shader 734 adds this perturbation to the state “normal” to create a new modification “normal”.
3つの「Texture lookup」シェイダー736は、「Perturb 法線」シェイダー004の入力を駆動する。これらのシェイダーの2つは、付加された「Offset coord」シェイダー738から、修正テクスチャ座標が供給される。
模式図全体は、フェノメノン732に含まれており、そのため、すべてのユーザーが詳細に関連しなければならないといことはない。このバンプマップフェノメノンは、3つの「Texture lookup」に供給されたTexture2dタイプの入力を有する。「offset」入力により、ユーザーは、単一のパラメータによりUおよびV方向におけるオフセットのコントロールが可能になる。「Perturb 法線」シェイダーの「量」入力もまた、バンプマップフェノメノンへの入力として開示される。
Three “Texture lookup” shaders 736 drive the inputs of the “Perturb Normal” shader 004. Two of these shaders are supplied with modified texture coordinates from an added “Offset coord” shader 738.
The entire schematic is contained in Phenomenon 732, so that not all users have to be related in detail. This Bump Map Phenomenon has a Texture2d type input supplied to three “Texture lookups”. The “offset” input allows the user to control the offset in the U and V directions with a single parameter. The “Perturb Normal” shader “Quantity” input is also disclosed as input to the Bump Map Phenomenon.
図58は、使用中のバンプマップフェノメノン740の図を示している。フォンシェイダー742は、それがシーン照明上をループするときに、状態normalを暗黙的に参照する。このイラストは、追加された「normal」入力を有するフォンシェイダーのインスタンスを示しており、それにより、normalがバンプマップシェイダーの出力に付加できるようになる。図59A−Bは、状態変数の完全なセットを一覧表示している表750を示している。 FIG. 58 shows a diagram of a bump map phenomenon 740 in use. The von Shader 742 implicitly references the state normal when it loops over the scene lighting. The illustration shows an instance of a von shader with an added “normal” input, which allows normal to be added to the output of the bump map shader. FIGS. 59A-B show a table 750 listing a complete set of state variables.
状態ベクトルは、常に「内部(internal)」空間において提供される。内部空間は定義されず、異なるプラットフォーム間で変化もできる。シェイダーが、座標系に依存せずに計算を実行できるならば、状態ベクトルと直接作用することができ、そうでなければ、状態ベクトルを既知の空間へ変換する必要がある。
いくつかの定義された空間があり、状態は、これらの座標系の間で、ベクトル、点、および法線を変換するマトリックスおよび関数を提供する。図60は、変換マトリックスを一覧表示している表760を示している。
The state vector is always provided in “internal” space. The internal space is not defined and can vary between different platforms. If the shader can perform computations independent of the coordinate system, it can work directly with the state vector, otherwise it needs to be converted to a known space.
There are several defined spaces, and states provide matrices and functions that transform vectors, points, and normals between these coordinate systems. FIG. 60 shows a table 760 that lists the transformation matrices.
照明およびボリュームシェイダーが利用できるいくつかの追加的状態変数があり、それらは、照明の特性およびボリュームシェイダーに対する入力値へのアクセスを提供する。照明またはボリュームシェイダー状態変数を参照するシェイダーノードは、照明またはボリュームシェイダーとして、またはそれ自身が照明またはボリュームシェイダーとして使用されるグラフにおいてのみ使用できる。 There are a number of additional state variables available to lighting and volume shaders, which provide access to lighting characteristics and input values for the volume shader. A shader node that references an illumination or volume shader state variable can only be used in a graph that is used as an illumination or volume shader or itself as an illumination or volume shader.
照明シェイダーは、状態変換関数をコールし、値「light」を、fromまたはtoパラメータとして渡すことができる。
図61は、照明シェイダー状態変数を一覧表示している表770を示し、図62は、ボリュームシェイダー状態変数を一覧表示している表780を示している。
現在のインターセクション状態の原因となっているレイは、レイタイプ、レイシェイダーにより記述され、ray_dispersal_group()およびray_history_group()状態変数および関数である。これらの変数および関数は、レイの属性を記述するために下記の文字列を使用する。
The light shader can call the state conversion function and pass the value “light” as the from or to parameter.
61 shows a table 770 that lists lighting shader state variables, and FIG. 62 shows a table 780 that lists volume shader state variables.
The ray responsible for the current intersection state is described by ray type, ray shader, and is a ray_dispersal_group () and ray_history_group () state variable and function. These variables and functions use the following strings to describe ray attributes:
レイは正確に下記のタイプの1つを有する。
・「eye」-その原点が眼の位置にある第1世代レイ
・「transparent」−現在のオブジェクトへの透明レイ
・「refract」−現在のオブジェクトへの屈折
・「reflect」−現在のオブジェクトからの反射
・「shadow」−シャドウレイ
・「occlusion」−周囲遮断レイ
・「environment」−環境レイ
レイは下記のグループの最大1つのメンバーであってよい。
Rays have exactly one of the following types:
"Eye"-the first generation ray whose origin is at the eye position-"transparent"-transparent ray to the current object-"refract"-refraction to the current object-"reflect"-from the current object Reflection “shadow” —shadow ray • “occlusion” —ambient blockage ray • “environment” —environment ray ray may be at most one member of the following groups:
・「specular」−鏡面透明、反射、または屈折
・「glossy」−光沢透明、反射、または屈折
・「diffuse」−拡散透明、反射、または屈折
シェイダーは、下記のグループの正確に1つのメンバーである。
・「regular」−正規表面またはボリューム
・「photon」−大域照明または火線フォトン
・「light」−照明シェイダーコール
・「displace」−変位シェイダーコール
レイは、下記の履歴フラッグを0または1つ以上を有することができる。
-"Specular"-specular transparency, reflection, or refraction-"glossy"-glossy transparency, reflection, or refraction-"diffuse"-diffuse transparency, reflection, or refraction-Shaders are exactly one member of the following groups: .
• “regular” —regular surface or volume • “photon” —global illumination or fire ray photons • “light” —lighting shader call • “displace” —displacement shader call Ray has zero or more of the following history flags be able to.
・「lightmap」−照明マップシェイダーコール
・「final gather」−最終統合レイ
・「probe」−シェイダーをコールしないプローブレイ
・「hull」−胴体表面を介するパス
・「volume」−レイの原点は、空の空間
所定のTrace_optionsクラスは、次節で記述されるtrace()およびocclusion()関数により使用されるパラメータを保持する。シェイダーはこのタイプのインスタンスをいったん宣言でき、それを複数のトレースコールへ渡す。
-"Lightmap"-light map shader call-"final gather"-final integrated ray-"probe"-probe ray that does not call shader-"hull"-path through the fuselage surface-"volume"-the origin of the ray is empty The given Trace_options class holds the parameters used by the trace () and occlusion () functions described in the next section. A shader can declare an instance of this type once and pass it to multiple trace calls.
Trace_optionsインスタンスが宣言されると、そのメンバー値すべては、デフォルト値に初期化される。そして、シェイダーは種々のセットメソッドをコールして、値をデフォルトとは異なる値に変更できる。図63は、Trace_optionsクラスのメソッドを一覧表示している表790を示している。
図64と65は、インターセクション状態の一部として提供され、状態変数を介してアクセスできる値に依存する関数を一覧表示している表800と810を示す。これらの関数は、状態変数と同様に、シェイダーmainメソッドまたは状態変数がパラメータとして渡されるいかなるメソッドにおいてのみコールできる。
When a Trace_options instance is declared, all of its member values are initialized to default values. The shader can then call various set methods to change the value to something different from the default. FIG. 63 shows a table 790 that lists the methods of the Trace_options class.
FIGS. 64 and 65 show tables 800 and 810 that list functions that are provided as part of the intersection state and depend on values that are accessible via the state variable. These functions, like state variables, can only be called in shader main methods or any method where state variables are passed as parameters.
MetaSLはシェイダーの実行の流れをコントロールする馴染みのあるプログラミングコンストラクトをサポートする。具体的には、次の通りである。
・ループステートメント、for、while、およびdo、while。キーワードcontinueおよびbreakは、ループの実行をコントロールするためにサポートされる。
・オプションのelseクローズを伴う分岐ステートメントifと、switch、caseステートメント。
MetaSL supports familiar programming constructs that control the flow of shader execution. Specifically, it is as follows.
• Loop statements, for, while, and do, while. The keywords continue and break are supported to control loop execution.
• Branch statements if with optional else close, switch, and case statements.
・関数またはメソッドを終了し、関数またはメソッドがボイドタイプを有していなければ値を返すためのreturnステートメント。
フローコントロールステートメントのための構文は、標準Cプログラミング言語で使用されるものと同じものである。
Light_iteratorクラスは、照明繰返しを容易にし、明示的照明リストシェイダー入力パラメータは要求されない。照明イテレータは、暗黙的に、状態を介してシーン照明を参照する。このイテレータのインスタンスは、foreachステートメントの一部として宣言され指定される。構文は下記のように見える。
A return statement to exit a function or method and return a value if the function or method does not have a void type.
The syntax for flow control statements is the same as that used in the standard C programming language.
The Light_iterator class facilitates lighting repetition and does not require explicit lighting list shader input parameters. The lighting iterator implicitly refers to the scene lighting through the state. This iterator instance is declared and specified as part of a foreach statement. The syntax looks like this:
Light_iterator light;
foreach (light) {
// Statements that refer to members of 'light'
}
ほとんどの表面シェイダーは、照明光源をループして、シーンにおける照明から直接照明を合計する。更に、エリア照明は、エリア照明の表面上の点において複数のサンプルを取ることを要求する。foreachステートメントは、適切であれば、シーンにおける照明と、エリア照明の表面上のサンプル点の両者を列挙する。
Light_iterator light;
foreach (light) {
// Statements that refer to members of 'light'
}
Most surface shaders loop the illumination source and sum the illumination directly from the illumination in the scene. Furthermore, area illumination requires taking multiple samples at points on the surface of the area illumination. The foreach statement enumerates both the lighting in the scene and the sample points on the surface of the area lighting, if appropriate.
foreachブロック内で、各照明に対する照明シェイダーを起動することによる結果を含む照明イテレータのメンバーにアクセスできる。Light_iteratorクラスは、図66に示されている表820において一覧表示されている。
シェイダーはいくつの照明が、またはいくつのサンプルが累積されているかを意識する必要はなく、照明およびサンプルの列挙を駆動しているレンダラーに、一度に単一のサンプルに対するBRDFを提供することのみに責任がある。シェイダーは、ループの外側で1つまたは2つ以上の変数を宣言して、照明の結果を格納する可能性がある。ループの各トリップのたびに、シェイダーは、BRDFの結果をこれらの変数に追加する。
Within the foreach block, you can access the members of the lighting iterator that contain the results from invoking the lighting shader for each lighting. The Light_iterator class is listed in the table 820 shown in FIG.
Shaders don't have to be aware of how many lights or how many samples are accumulating, but only provide the BRDF for a single sample at a time to the renderer driving the enumeration of lighting and samples. responsible. A shader may declare one or more variables outside the loop to store the lighting results. For each trip in the loop, the shader adds the BRDF result to these variables.
Color diffuse_light(0,0,0,0);
Light_iterator light; foreach (light) {
diffuse_light += light.dot_nl * light.color;
これは、照明上をループして拡散照明を合計する簡単な例である。
MetaSLの強力な特徴は、特別な目標プラットフォームからは独立してシェイダーを記述できる機能である。これには、MetaSLシェイダーを、ソフトウェアに基づくレンダラーと共にソフトウェア内で、およびGPUが利用できるときにハードウェア内で起動する機能も含まれる。
Color diffuse_light (0,0,0,0);
Light_iterator light; foreach (light) {
diffuse_light + = light.dot_nl * light.color;
This is a simple example of looping over lighting and summing diffuse lighting.
A powerful feature of MetaSL is the ability to describe shaders independently of special target platforms. This includes the ability to launch MetaSL shaders in software with software-based renderers and in hardware when the GPU is available.
ソフトウェアレンダリングは、典型的には、より一般化され、柔軟性があり、それにより、レイトレーシングおよび大域照明を含む多様なレンダリングアルゴリズムが可能になる。この明細書を書いている時点では、グラフィックハードウェアは、一般的にはこれらの特徴をサポートしていない。更に、異なるグラフィックハードウェアは、異なる機能とリソースの制限を有する。 Software rendering is typically more generalized and flexible, allowing a variety of rendering algorithms including ray tracing and global illumination. At the time of writing this specification, graphics hardware generally does not support these features. Furthermore, different graphics hardware has different functions and resource limitations.
MetaSLコンパイラは、シェイダーのライターに、それがコンパイルする特別なシェイダーいずれに対しての条件を示すフィードバックを提供する。これにより、ユーザーは、自分が書いたシェイダーが、グラフィックハードウェアの特別な部分上で実行可能かどうかを知ることができる。可能な場合は、コンパイラは、シェイダーのどの部分が、グラフィックハードウェアとの非互換性の原因となっているかを具体的に示す。例えば、シェイダーがレイトレーシング関数をコールすると、コンパイラは、レイトレーシングコールの存在が、シェイダーがソフトウェア互換のみでなければならないことを強制していることを示す。または、ユーザーは、コンパイラにハードウェアシェイダーを作成させるスイッチを指定することもできる。ハードウェアによりサポートされていないAPIへのコールは、シェイダーから自動的に除去される。 The MetaSL compiler provides feedback to the shader writer indicating the conditions for any of the special shaders it compiles. This allows the user to know if the shader he wrote can be run on a special piece of graphics hardware. Where possible, the compiler will indicate specifically which part of the shader is causing incompatibility with the graphics hardware. For example, when a shader calls a raytracing function, the compiler indicates that the presence of a raytracing call forces the shader to be software compatible only. Alternatively, the user can specify a switch that causes the compiler to create a hardware shader. Calls to APIs not supported by the hardware are automatically removed from the shader.
MetaSLは、下記のプリプロセッサ宣言に対するサポートを含む。#define、#undef、#if、#ifdef、#ifndef、#else、#elif、#endif。
これらの宣言は、Cプログラミング言語における等価なものと同じ意味を有している。引数を伴うマクロもまた次のようにサポートされる。
#define square(a) ((a)*(a))
#include宣言も、他のMetaSLソースファイルを現在のファイルに追加するためにサポートされる。これにより、構造定義およびシェイダーに基づくクラスはファイル間で共有できる。
MetaSL includes support for the following preprocessor declarations: #define, #undef, #if, #ifdef, #ifndef, #else, #elif, #endif.
These declarations have the same meaning as their equivalents in the C programming language. Macros with arguments are also supported as follows:
#define square (a) ((a) * (a))
#include declarations are also supported to add other MetaSL source files to the current file. This allows classes based on structure definitions and shaders to be shared between files.
技術は、シェイダーインプレメンテーションの変形例である。あるシェイダーは、単一の技術のみを必要とするが、複数の技術を実装するのが望ましい状況もある。言語は、シェイダー内で複数の技術を宣言するための機構を提供する。
単一のシェイダーの実装がソフトウェアとハードウェアの両者にマップが可能で、まったく同じシェイダーが、レンダリングがCPUまたはGPU上で行なわれるかに無関係に使用できることがよくある。しかし、ある場合には、例えば、ソフトウェアシェイダーが現在のグラフィックハードウェアによりサポートされていない関数を使用する場合などには、シェイダーがGPU上でも作動するために、シェイダーのための別のメソッドを実装する必要がある。異なるグラフィックプロセッサは、また異なる関数と制限を有しており、従って、特別なGPU上で作動するシェイダーが、別のGPU上で作動するには複雑すぎることもある。技術により、シェイダーの複数のバージョンがハードウェアの異なるクラスをサポートできるようになる。
Technology is a variation of shader implementation. Some shaders require only a single technology, but there are situations where it is desirable to implement multiple technologies. The language provides a mechanism for declaring multiple technologies within a shader.
A single shader implementation can be mapped to both software and hardware, and the exact same shader can often be used regardless of whether rendering is done on the CPU or GPU. However, in some cases, such as when a software shader uses a function that is not supported by the current graphics hardware, the shader implements another method for the shader to work on the GPU. There is a need to. Different graphics processors also have different functions and limitations, so a shader that runs on a special GPU may be too complex to run on another GPU. The technology allows multiple versions of shaders to support different classes of hardware.
あるシェイダーは、異なる状況で使用される種々のシェイディング方法を実装したいとも考えるだろう。例えば、マテリアルシェイダーは、シャドウレイをトレースするときに使用される、表面の点における透明度の量を提供するシャドウ技術を実装するかもしれない。異なる技術は、より高速であるがより低品質の、または、より低速であるがより高品質のシェイダーを実装するために使用することもできる。 A shader may also want to implement various shading methods that are used in different situations. For example, a material shader may implement a shadow technique that provides the amount of transparency at a surface point used when tracing shadow rays. Different techniques can also be used to implement faster but lesser quality or slower but higher quality shaders.
ある意味では、技術はシェイダーの異なるバージョンのようであるが、シェイダーの技術は、シェイダークラス内で宣言され、シェイダーパラメータと他の変数を共有する。これにより、技術は引き続き、クラス内にグループ化されて構成される。シェイダーが1つの技術しか有しないときは、シェイダークラスが、正式にその技術を宣言する必要はない。 In a sense, the technology appears to be a different version of the shader, but the shader technology is declared within the shader class and shares the shader parameters and other variables. Thus, the technology continues to be grouped into classes. When a shader has only one technology, the shader class need not formally declare that technology.
技術宣言は、シェイダークラス定義内の入れ子のクラス定義にいくらか類似して見える。技術宣言は、その技術を参照するために使用できる名前を提供する。技術は、少なくとも、シェイダー技術の主要な機能を実行するmainメソッドを定義しなければならない。更に、技術は、init and exitイベントを扱うeventメソッドを実装することができる。mainメソッドおよびeventメソッドは前節に記述されている。更に、技術は、2つの主要技術方法により使用される、他のローカルなhelperメソッドを含むこともできる。 The technical declaration looks somewhat similar to the nested class definition within the shader class definition. A technology declaration provides a name that can be used to refer to the technology. The technology must at least define a main method that performs the main function of the shader technology. In addition, the technology can implement event methods that handle init and exit events. The main method and event method are described in the previous section. In addition, the technique can also include other local helper methods used by the two main technical methods.
Shader my_shader {
input:
Color c;
output:
Color result;
technique software {
void event(Event_type event);
void main();
}
technique hardware {
void event(Event_type event);
void main();
}
};
void my_shader::software::event(Event_type event) {
…
}
void my_shader::software::main() {
…
}
void my_shader::hardware::event(Event_type event) {
…
}
void my_shader::hardware::main() {
…
}
この例は、ハードウェアとソフトウェアに対する2つの別の技術を実装するシェイダーを示している。技術のmainメソッドおよびeventメソッドは、クラス定義中にインラインで、またはこの例で示されるように分離して実装できる。
Shader my_shader {
input:
Color c;
output:
Color result;
technique software {
void event (Event_type event);
void main ();
}
technique hardware {
void event (Event_type event);
void main ();
}
};
void my_shader :: software :: event (Event_type event) {
...
}
void my_shader :: software :: main () {
...
}
void my_shader :: hardware :: event (Event_type event) {
...
}
void my_shader :: hardware :: main () {
...
}
This example shows a shader that implements two different technologies for hardware and software. The technology main and event methods can be implemented inline in the class definition or separately as shown in this example.
レンダー時に、レンダラーによりアクセスできる分離したルールファイルは、レンダラーに、どのようにしてシェイダーの異なる技術を選択するかを報知する。ルールは、所定のトークンのセットの値に基づいて技術を選択するための基準を記述する。トークン値は、シェイダーが使用される状況を記述する。可能なトークン値は、次の通りである。
・シェイディング品質(Shading quality)−反射で現れる表面の点は(でこぼこで、ぼやけた、またはそうでなければ、ゆがんだ表面の点)より高速であるがより低品質バージョンのシェイダーによりシェイディングされることがよくある。
At render time, a separate rules file accessible by the renderer informs the renderer how to select different shader technologies. The rules describe criteria for selecting a technology based on the value of a predetermined set of tokens. The token value describes the situation in which the shader is used. Possible token values are:
• Shading quality—surface points that appear in reflections are shaded by a faster but lower quality version of the shader (bumpy, blurred, or otherwise distorted surface points). Often.
・シャドウ(Shadow)−シャドウレイをトレーシングする間に、透明度を決定するために表面の点をシェイディングするときは、このトークン値は真である。
・エネルギー(Energy)−照明により生成されるエネルギーを決定して、レンダラーが重要度によりレイをソートできるようにするために照明シェイダーをコールするときは、このトークン値は真である。
Shadow-This token value is true when shading a surface point to determine transparency while tracing a shadow ray.
Energy—This token value is true when calling the lighting shader to determine the energy generated by the lighting and allow the renderer to sort the rays by importance.
・ハードウェア/ソフトウェア(Hardware/Software)−これらのトークン値は、レンダリングがCPU上でソフトウェアにおいて行なわれているか、GPU上でハードウェアにおいて行なわれているかを示す。
・シェイダーバージョン(Shader version)−現在のハードウェアによりサポートされる最高のピクセルシェイダーバージョン。
Hardware / Software—These token values indicate whether the rendering is done in software on the CPU or in hardware on the GPU.
• Shader version-the highest pixel shader version supported by the current hardware.
・ハードウェアベンダーチップセット(Hardware vender chipset)−現在のハードウェアのチップセットを特定する文字列。例えば、nv30またはr420。
ルールは、技術の名前と、トークン値に基づき、特別な技術が選択されたときに定義する式を指定する必要がある。複数のルールは、トークン値の特別なセットのいずれにも合っている。レンダラーが、シェイダーのための技術を選択するために使用するプロセスは次の通りである。最初は、シェイダーに存在する技術に対するルールのみを考慮する。これらのルールから、それぞれが順番にテストされ、第1の適合ルールが技術を選択する。合うルールがない場合は、エラー/警告が発せられるか、デフォルト技術が、シェイダーに対して使用される。
Hardware vender chipset—A string that identifies the current hardware chipset. For example, nv30 or r420.
The rule needs to specify an expression to be defined when a particular technology is selected based on the technology name and token value. Multiple rules are suitable for any special set of token values. The process that the renderer uses to select a technique for the shader is as follows. At first, consider only the rules for the technology that exists in the shader. From these rules, each is tested in turn, and the first matching rule selects the technique. If no rule matches, an error / warning is issued or the default technique is used for the shader.
下記は、ルールファイルの例を示している。
beauty: software and shade_quality > 1
fast: software and shade_quality = 1
standard: software
fancy_hardware: hardware and shader_vers?}on >= 3.0
nvidia_hardware: hardware and chipset == "nv30"
basic_hardware: hardware
最初の3つのルールは、「standard」と呼ばれる、シェイディング品質レベルのすべてを扱う単一の技術または、2つの異なる品質レベルのシェイディングを別々に扱うための2つの技術「beauty」と「fast」を有するシェイダーを有するソフトウェアシェイダーをサポートする。トークン値は、作動時にシェイダーが利用することも可能で、単一のstandard技術を有するシェイダーは、所望する品質レベルに従って、オプションの計算を実行することができる。
The following shows an example of a rule file.
beauty: software and shade_quality> 1
fast: software and shade_quality = 1
standard: software
fancy_hardware: hardware and shader_vers?} on> = 3.0
nvidia_hardware: hardware and chipset == "nv30"
basic_hardware: hardware
The first three rules are called “standard”, a single technique that handles all of the shading quality levels, or two techniques “beauty” and “fast” for handling two different quality levels of shading separately. Software shaders with shaders with The token value can also be used by the shader when activated, and a shader with a single standard technology can perform optional calculations according to the desired quality level.
第2の3つのルールは、ハードウェアの異なるクラスをサポートするための異なる技術の例である。高度なハードウェア技術は、シェイダーモデル3.0またはそれ以降にのみ利用できる機能を利用することができる。nvidia_hardware技術は、NVIDIAのnv30チップセットに特有な特徴を使用できる。最終的に、basic_hardwareは、一般のハードウェアを扱うための、多様に対処可能な技術といえる。 The second three rules are examples of different technologies to support different classes of hardware. Advanced hardware technology can make use of features that are only available in shader model 3.0 or later. nvidia_hardware technology can use features specific to NVIDIA's nv30 chipset. Finally, basic_hardware can be said to be a technology that can handle various types of hardware for handling general hardware.
言語は、マテリアルシェイダーがその結果を、単一のカラー値の代わりに、一連の成分として表現することを可能にする機構を含む。これにより、成分を、後での合成のためにイメージバッファーを分離するために格納することが可能になる。個々のパスもまた、すべての成分のサブセットのレンダリングを行なうことができ、それらを、以前にレンダリングされた残りの成分と組み合わせることができる。 The language includes a mechanism that allows material shaders to express their results as a series of components instead of a single color value. This allows the components to be stored to separate the image buffer for later synthesis. Individual passes can also render a subset of all components, which can be combined with the remaining previously rendered components.
シェイダーがその結果を複数の成分に分解するとき、同時にすべての成分、またはすべての成分のサブセットを計算するシェイダーの変形例を自動的に生成することができる。成分のサブセットのみが計算されているときは、成分が依存した他の計算を、自動的に生成されたシェイダーから省略することができる。例えば、シェイダーが大域照明を使用して、間接照明を計算し、その間接照明を別の層に格納すると、大域照明を再計算することなしに、他の層を再レンダリングされ、間接照明層と合成できる。同じシェイダーソースコードを各パスに対して使用できるが、レンダラーは、単一のソースから、必要な成分のみを計算する個々のシェイダーを自動的に生成する。これは、層のいずれかがソフトウェアレンダリングに関連するならば、明らかにC++コンパイラと共に利用できるソースコードを有することに依存する。 When the shader breaks the result into multiple components, a shader variant can be automatically generated that calculates all components, or a subset of all components at the same time. When only a subset of the components are being calculated, other calculations on which the components depend can be omitted from the automatically generated shader. For example, if a shader uses global lighting to calculate indirect lighting and stores that indirect lighting in another layer, the other layers are re-rendered without recalculating the global lighting, and the indirect lighting layer Can be synthesized. The same shader source code can be used for each pass, but the renderer automatically generates individual shaders that calculate only the necessary components from a single source. This obviously relies on having source code that can be used with a C ++ compiler if any of the layers are related to software rendering.
マテリアルシェイダーは、その結果を、各成分に対して別個の出力を宣言することにより成分に分解する。出力変数の名前は、現在のレンダリングにおける層の名前を定義する。
shader Material_shader {
input:
…
output:
Color diffuse_lighting;
Color specular_lighting;
Color indirect_lighting;
};
この例は、拡散、鏡面反射、および間接照明のための3つの成分を指定するマテリアルシェイダーを示している。
The material shader breaks the result into components by declaring a separate output for each component. The name of the output variable defines the name of the layer in the current rendering.
shader Material_shader {
input:
...
output:
Color diffuse_lighting;
Color specular_lighting;
Color indirect_lighting;
};
This example shows a material shader that specifies three components for diffusion, specular reflection, and indirect illumination.
複数のマテリアルシェイダーが、その結果を異なる層に分解するシーンに存在すると、層の合計数は大きくなる可能性がある。ユーザーは、これらの層のそれぞれに、別のイメージバッファーを割り当てることを所望しないかもしれない。シーン定義ファイルにおける機構により、ユーザーは、層をイメージバッファーに組み合わせるための合成ルールを指定できる。ユーザーは、いくつのイメージバッファーを作成するかを指定し、各バッファーに対して、ピクセルがレンダリングされるときにそのバッファーに置くべきカラーを決定する式を指定する。式は次のような層の値の関数として表現できる。 If multiple material shaders exist in a scene that breaks down the results into different layers, the total number of layers can be large. The user may not want to allocate a separate image buffer for each of these layers. A mechanism in the scene definition file allows the user to specify compositing rules for combining layers into an image buffer. The user specifies how many image buffers to create and, for each buffer, an expression that determines the color that should be placed in that buffer when the pixel is rendered. The expression can be expressed as a function of the layer values:
Imagel = indirect_lighting
Image2 = diffuse_lighting + specular_lighting
この例において、前の例におけるシェイダー結果構造からの3つの層は、2つのイメージバッファーへルーティングされる。
標準MetaSLライブラリは、API機能を提供し、それにより、シェイダーはレイを投じることができる。レイトレーシングは、計算量が非常に多い。レンダリング時間を最適化するためにレンダラーは、レイトレーシングを遅延して、複数のシェイダーコールがグループ化できるようにする機構を提供する。これは、キャッシュの一貫性を改善し、従って、全体のシェイダー性能を改善する。シェイダーは、レイトレーシングのためにレイを予定するための関数をコールするオプションを有している。この関数は、レイが実際にトレーシングされる直前に戻り、シェイダーと他のシェイダーが処理を続行することが可能になる。
Imagel = indirect_lighting
Image2 = diffuse_lighting + specular_lighting
In this example, the three layers from the shader result structure in the previous example are routed to two image buffers.
The standard MetaSL library provides API functionality that allows shaders to cast rays. Ray tracing is very computationally intensive. To optimize rendering time, the renderer provides a mechanism that delays ray tracing so that multiple shader calls can be grouped. This improves cache coherency and thus improves overall shader performance. The shader has an option to call a function to schedule a ray for ray tracing. This function returns just before the ray is actually traced, allowing the shader and other shaders to continue processing.
シェイダーがレイトレーシングを予定するときは、レイトレーシングからの結果をシェイダーの結果と合成することのコントロールを支援するファクタも提供しなければならない。更に、最終イメージへのレイの重要性を記述する重量ファクタも提供し、それにより、重要性に基づくサンプリングが可能になる。例えば、ファクタは、ユーザー指定の反射量と組み合わされたフレネル減衰の結果であってもよい。レイを予定することは、暗黙的に層を定義する。層合成ルールにおける式は、レイを予定する時に提供されるファクタを参照できる。例えば、次の通りである。 When a shader schedules raytracing, it must also provide factors that help control the synthesis of the results from the raytracing with the shader results. It also provides a weight factor that describes the importance of the ray to the final image, thereby enabling importance based sampling. For example, the factor may be the result of Fresnel attenuation combined with a user-specified amount of reflection. Scheduling a ray implicitly defines a layer. The expression in the layer composition rule can refer to the factors provided when scheduling a ray. For example:
Imagel = diffuse + reflectionFactor * reflection
シェイダーがレイトレーシングの結果に直接作用する必要があり、後の合成のためにレイを予定できない場合もある。そのような場合には、同期レイトレーシング関数が依然として利用できる。
シェイダーパラメータは、グラフィカルユーザーインタフェース(GUI)を使用するアプリケーションにおいてユーザーが設定することがよくある。ユーザーがGUIにおけるシェイダーと相互作用するためには、アプリケーションは、シェイダーパラメータと、シェイダーそれ自身についてのいくつかの追加的情報を知る必要がある。
Imagel = diffuse + reflectionFactor * reflection
The shader needs to act directly on the raytracing results and may not schedule the ray for later compositing. In such cases, synchronous ray tracing functions are still available.
Shader parameters are often set by a user in an application that uses a graphical user interface (GUI). In order for the user to interact with the shader in the GUI, the application needs to know the shader parameters and some additional information about the shader itself.
シェイダーソースコードに注釈を書き込むことにより、情報属性をシェイダー、パラメータ、または技術に付加することができる。注釈は、シェイダー、パラメータ、または技術宣言の直後に、属性のリストを曲線括弧で囲むことにより置く。属性インスタンスは、コンストラクタへ渡されるオプションのパラメータにより、同様なメソッドでクラスに宣言される。構文は次のようである。 By writing annotations in the shader source code, information attributes can be added to shaders, parameters, or techniques. Annotations are placed immediately after a shader, parameter, or technology declaration by enclosing a list of attributes in curly brackets. An attribute instance is declared in a class with a similar method, with optional parameters passed to the constructor. The syntax is as follows:
{
attribute_name(paraml, param2, ... );
attribute_name(paraml, ... );
}
属性コンストラクタへのパラメータは、状態変数をデフォルト値として割り当てる特別な場合を除いて、直定数でなければならない。いくつかの標準属性は予め定義されている。
{
attribute_name (paraml, param2, ...);
attribute_name (paraml, ...);
}
Parameters to attribute constructors must be direct constants, except in special cases where state variables are assigned as default values. Some standard attributes are predefined.
・default value (object value)−パラメータに対するデフォルト値を指定するためにパラメータに付加される。
−value−パラメータに対するデフォルトとして使用される値。この値のタイプは、パラメータと同じタイプである。
・soft range (object min, object max)−パラメータに対する有効な値の範囲を指定する。この範囲は、ユーザーが所望するのであれば超えることができる。
Default value (object value)-appended to the parameter to specify the default value for the parameter.
-Value-The value used as the default for the parameter. The type of this value is the same type as the parameter.
Soft range (object min, object max)-specifies the range of valid values for the parameter. This range can be exceeded if the user desires.
−min−範囲の下端。この値のタイプは、パラメータのタイプと同じである。
−max−範囲の上端。この値のタイプは、パラメータのタイプと同じである。
・hard range (object min, object max)−超えることができないパラメータに対する境界を指定する。
−min−範囲の下端。この値のタイプは、パラメータのタイプと同じである。
-Min- The lower end of the range. The value type is the same as the parameter type.
-Max- The upper end of the range. The value type is the same as the parameter type.
• hard range (object min, object max)-specifies the boundaries for parameters that cannot be exceeded.
-Min- The lower end of the range. The value type is the same as the parameter type.
−max−範囲の上端。この値のタイプは、パラメータのタイプと同じである。
・display name (string name)−ユーザーに表示すべきシェイダー、パラメータ、または技術の名前。
−name−表示名。これは、典型的な変数名よりももっと読み易い名前であってよく、スペースを含むことができる。
-Max- The upper end of the range. The value type is the same as the parameter type.
Display name (string name)-the name of the shader, parameter, or technology that should be displayed to the user.
−name—Display name. This can be a more readable name than a typical variable name and can include spaces.
・description (string description)−シェイダー、パラメータ、または技術の記述。
−description−記述。アプリケーションはこの文字列を使用してGUIにツールチップを提供できる。
・hidden−パラメータに付加され、パラメータがアプリケーションGUI内で示されてはいけないことを示す。この属性はパラメータを有しない。属性が存在するときは、パラメータは、隠されていると考えられるか、または隠されない。
Description (string description) —A description of the shader, parameter, or technology.
-Description-description. An application can use this string to provide a tooltip for the GUI.
Hidden-added to the parameter, indicating that the parameter must not be shown in the application GUI. This attribute has no parameters. When the attribute is present, the parameter is considered hidden or not hidden.
・enum label (int value, string label)−enumタイプであるパラメータに付加される。この属性の2つ以上のインスタンスが、可能なenum値に対して1つずつ、enumタイプのパラメータに付加される可能性がある。
−value−パラメータが設定される可能なenum値の1つ。
−label−enum値をGUIにおけるオプションとして提示するときに使用するラベル。
• enum label (int value, string label)-added to a parameter of type enum. Two or more instances of this attribute may be added to enum type parameters, one for each possible enum value.
-Value-one of the possible enum values for which the parameter is set.
-Label-Label to use when presenting the enum value as an option in the GUI.
これらの属性と他のGUI関連の属性は、外部ファイルを介してシェイダーに割り当てることができる。シェイダーソースコードを多数の注釈で一杯にすることは常には望ましいこととはいえない。
下記は、使用中の属性の例である。
shader mix_colors {
input:
Color colorl {
default_value(Color(0,0,0,1));
display_name("Color 1");
};
Color color2 {
default_value(Color(1,1,1,1));
display_name("Color 2");
};
Scalar mix {
default_value(0.5);
soft_range(0.0, 1.0);
display_name("Mix amount");
};
output:
Color result;
void main() {
result = colorl*(1.0-mix) + color2*mix;
}
} { Description("Blends two colors using a mix amount parameter") };
下記のキーワードは、現在は、MetaSL内では使用されていないが、将来のバージョンのために保存されている。class, const, private, protected, public, template, this, typedef, union, virtual。
These attributes and other GUI-related attributes can be assigned to shaders via external files. Filling a shader source code with many annotations is not always desirable.
The following are examples of attributes in use:
shader mix_colors {
input:
Color colorl {
default_value (Color (0,0,0,1));
display_name ("Color 1");
};
Color color2 {
default_value (Color (1,1,1,1));
display_name ("Color 2");
};
Scalar mix {
default_value (0.5);
soft_range (0.0, 1.0);
display_name ("Mix amount");
};
output:
Color result;
void main () {
result = colorl * (1.0-mix) + color2 * mix;
}
} {Description ("Blends two colors using a mix amount parameter")};
The following keywords are not currently used in MetaSL, but are saved for future versions. class, const, private, protected, public, template, this, typedef, union, virtual.
MetaSLは、固有関数の標準ライブラリを含む。下記は、本発明の範囲を逸脱することなく拡張でき、ソフトウェアのみの方法を含まない、照明関数およびレイトレーシング関数を含むリストである。
・数学的関数:abs, acos, all, any, acos, asin, atan, ceil, clamp, cos, degrees, exp, exp2, oor, frac, lerp, log, log2, log10, max, min, mod, pow, radians, round, rsqrt, saturate, sign, sin, smoothstep, sqrt, step, tan。
MetaSL includes a standard library of eigenfunctions. The following is a list including lighting and ray tracing functions that can be extended without departing from the scope of the present invention and does not include software-only methods.
・ Mathematical functions: abs, acos, all, any, acos, asin, atan, ceil, clamp, cos, degrees, exp, exp2, oor, frac, lerp, log, log2, log10, max, min, mod, pow , radians, round, rsqrt, saturate, sign, sin, smoothstep, sqrt, step, tan.
・幾何学的関数:cross, distance, dot, faceforward, length, normalize, reflect, refract。
・テクスチャマップ関数:texture lookup。テクスチャ関数は、ソフトウェアおよびハードウェアシェイダーの統合に対して興味ある問題を投げかける。ハードウェアテクスチャ関数は、普通は、いくつかのバージョンがあり、それにより投影テクスチャリング(projective texturing)(wによる分割が「texture lookup」に構築される)、明示的フィルタ幅(explicit filter width)、深度比較を有する深度テクスチャルックアップ(depth texture lookup with depth compare)を可能としている。CgもまたテクスチャルックアップのRECTバージョンを有し、正規化座標の代わりに、テクスチャのピクセル座標を使用する。このように、関数はハードウェアとソフトウェアの両者に提供される。しかし、楕円フィルタ処理(elliptical filtering)を有するソフトウェアのみのテクスチャルックアップを提供することが望ましい。
Geometric functions: cross, distance, dot, faceforward, length, normalize, reflect, refract.
Texture map function: texture lookup. Texture functions pose an interesting problem for software and hardware shader integration. The hardware texture function usually has several versions, thereby projective texturing (division by w is built into “texture lookup”), explicit filter width, Allows depth texture lookup with depth compare. Cg also has a RECT version of texture lookup that uses texture pixel coordinates instead of normalized coordinates. In this way, functions are provided to both hardware and software. However, it is desirable to provide software-only texture lookup with elliptical filtering.
・導関数:ddx, ddy, fwidth。
図67は、本発明の更なる形態によるMetaSLコンパイラのアーキテクチャ830を例示する図を示している。MetaSLコンパイラは、MetaSLシェイダーのターゲットフォーマットへの変換、およびシェイダーグラフを単一のシェイダーにコンパイルすること、の両者を扱う。MetaSLコンパイラのアーキテクチャは、プラグインにより拡張可能で、それにより、異なる入力構文と共に、将来の言語ターゲットをサポートすることが可能になる。
Derivatives: ddx, ddy, fwidth.
FIG. 67 shows a diagram illustrating an architecture 830 of a MetaSL compiler according to a further aspect of the present invention. The MetaSL compiler handles both the conversion of MetaSL shaders to target formats and the compilation of shader graphs into a single shader. The MetaSL compiler architecture can be extended with plug-ins, which can support future language targets with different input syntax.
コンパイラフロントエンドは、異なる入力言語をサポートする、プラグイン可能なパーサーモジュールをサポートする。MetaSLが主要な入力言語と期待されているが、他の言語を拡張によりサポートすることも可能である。これにより、例えば、シェイダーが書かれた言語に対するパーサーが作成されれば、シェイダーの既存のコードベースを利用することが可能になる。 The compiler front end supports pluggable parser modules that support different input languages. MetaSL is expected to be the primary input language, but other languages can be supported by extensions. Thereby, for example, if a parser for a language in which a shader is written is created, the existing code base of the shader can be used.
コンパイラバックエンドもまた、プラグインモジュールにより拡張可能である。MetaSLコンパイラは、多くの処理を扱い、バックエンドプラグインに高いレベルのシェイダーの表現を提供し、シェイダーコードを生成するために使用できる。現在使用されている、いくつかの言語およびプラットフォームに対するサポートが計画されているが、将来、新しいプラットフォームが現れることはほぼ確実である。ミル技術の主な利点は、シェイダーをこれらの変更から隔離することである。新しいプラットフォームまたは言語が利用できるようになると、新しいバックエンドプラグインモジュールを、これらのターゲットをサポートするために実装できる。 The compiler backend can also be extended with plug-in modules. The MetaSL compiler handles a lot of processing, provides a high-level shader representation for backend plug-ins, and can be used to generate shader code. Support for several languages and platforms currently in use is planned, but it is almost certain that new platforms will appear in the future. The main advantage of mill technology is that it isolates the shader from these changes. As new platforms or languages become available, new back-end plug-in modules can be implemented to support these targets.
MetaSLコンパイラは、現在、高いレベルの言語を目標としているが、GPUを直接目標として、高レベルの表現からマシンコードを生成する可能性も存在する。これにより、コードジェネレータが、この高レベル表現から直接機能し、固有コンパイラを迂回するという理由で、特別なハードウェアは、利用できる固有の最適化を利用できる。
ミルのMetaSLコンパイラの別の構成要素は、フェノメノンフェノメノンシェイダーグラフ・コンパイラである。グラフ・コンパイラは、シェイダーグラフを処理し、それらを単一のシェイダーにコンパイルする。これらのシェイダーは、シェイダーアタッチメントのオーバーヘッドを回避し、それにより、少数の複雑なノードではなく、より多数の単純なノードからグラフを構築することが可能になる。これは、シェイダーの内部構造を、専門的なプログラマでないユーザーに対してよりアクセスし易くする。
The MetaSL compiler currently targets high-level languages, but there is also the possibility of generating machine code from high-level expressions with the GPU as the direct target. This allows special hardware to take advantage of the specific optimizations available because the code generator works directly from this high level representation and bypasses the native compiler.
Another component of Mill's MetaSL compiler is the Phenomenon Phenomenon shader graph compiler. The graph compiler processes shader graphs and compiles them into a single shader. These shaders avoid the overhead of shader attachment, thereby allowing the graph to be constructed from a larger number of simple nodes rather than a small number of complex nodes. This makes the shader's internal structure more accessible to users who are not professional programmers.
図68は、本発明の代替形態による、MetaSLコンパイラのアーキテクチャ840を例示する図を示している。
下記の例は、MetaSLに実装されたフォンシェイダーを示している。
shader Phong {
input:
Color ambience;
Color ambient;
Color diffuse;
Color specular;
Scalar exponent;
output:
Color result;
void main() {
result = ambience * ambient;
Light_iterator light;
foreach(light) {
result += light.color * max(0, light.dot_nl);
result += light.color * specular *
phong_specular(light.direction, exponent);
}
}
};
この例でコールされたphong_specular関数は、MetaSLにより提供された内蔵関数である。表面法線およびレイ方向のような状態パラメータは、暗黙的に関数に渡される。
FIG. 68 shows a diagram illustrating a MetaSL compiler architecture 840 according to an alternative form of the invention.
The example below shows a phone shader implemented in MetaSL.
shader Phong {
input:
Color ambience;
Color ambient;
Color diffuse;
Color specular;
Scalar exponent;
output:
Color result;
void main () {
result = ambience * ambient;
Light_iterator light;
foreach (light) {
result + = light.color * max (0, light.dot_nl);
result + = light.color * specular *
phong_specular (light.direction, exponent);
}
}
};
The phong_specular function called in this example is a built-in function provided by MetaSL. State parameters such as surface normal and ray direction are implicitly passed to the function.
下記の例は、MetaSLに実装された簡単なチェッカーテクスチャシェイダーを示している。
shader Checker {
Input:
Color colorl;
Color color2;
Vector2 coords;
Vector2 size;
output:
Color result;
void main() {
Vector2 m = fmod(abs(coords), size)/size;
Vector2b b = m < 0.5f;
result = lerp(colorl, color2, b.x ^^ b.y);
}
};
The example below shows a simple checker texture shader implemented in MetaSL.
shader Checker {
Input:
Color colorl;
Color color2;
Vector2 coords;
Vector2 size;
output:
Color result;
void main () {
Vector2 m = fmod (abs (coords), size) / size;
Vector2b b = m <0.5f;
result = lerp (colorl, color2, bx ^^ by);
}
};
D.MetaSLシェイダーデバッガ
ここで、イメージベースのシェイダーデバッグの概念のインプレメンテーションを提供する、メンタルミルMetaSLシェイダーデバッガアプリケーションを説明する。
D. MetaSL Shader Debugger Here we describe a mental mill MetaSL shader debugger application that provides an implementation of the concept of image-based shader debugging.
図69は、本発明の更なる形態によるデバッガUI850のスクリーンショットを示している。シェイダーデバッガUI850は、現在ロードされているシェイダーに対するMetaSLコードを表示するコードビューパネル852と、選択されたステートメントにおける範囲ですべての変数を表示する変数リストパネル854と、選択された変数の値、または変数が選択されていないときは、シェイダー全体の結果を表示する3Dビューウィンドウ856を備える。さらに、エラー表示ウィンドウ858も備える。 FIG. 69 shows a screenshot of a debugger UI 850 according to a further aspect of the present invention. The shader debugger UI 850 includes a code view panel 852 that displays MetaSL code for the currently loaded shader, a variable list panel 854 that displays all variables in the range in the selected statement, and the value of the selected variable, or When no variable is selected, a 3D view window 856 is displayed that displays the results of the entire shader. Further, an error display window 858 is also provided.
図70は、シェイダーをロードするときに現れるデバッガUI860のスクリーンショットを示しており、コンパイルエラーがあると、それらは、エラー表示ウィンドウ868に一覧表示される。リストにおいてエラーを選択すると、エラーが現れたコード862のラインが強調表示される。シェイダーファイルは、F5キーを押すことにより再ロードされる。 FIG. 70 shows a screenshot of the debugger UI 860 that appears when loading a shader, and if there are compilation errors, they are listed in an error display window 868. Selecting an error in the list highlights the line of code 862 where the error occurred. The shader file is reloaded by pressing the F5 key.
図71は、シェイダーがいったん首尾よくロードされ、エラーなくコンパイルされると現れる、デバッガUI870のスクリーンショットを示している。デバッグは、コードビューパネル874内のステートメント872を選択することにより開始される。選択されたステートメントは、選択されたステートメントのラインに沿って、明るい緑色で強調表示される。変数ウィンドウは、選択されたステートメントに対する範囲の変数876を表示する。 FIG. 71 shows a screenshot of the debugger UI 870 that appears once the shader has been successfully loaded and compiled without errors. Debugging is initiated by selecting statement 872 in code view panel 874. The selected statement is highlighted in light green along the line of the selected statement. The variable window displays a range of variables 876 for the selected statement.
図71に示されるように、ステートメントは、変数上のコードクリックのライン上でクリックすることで選択され、その値をレンダーウィンドウに表示する。図71のスクリーンショット870においては、「normal」変数(Vector3タイプ)が選択されている。ベクトル値は、それぞれのカラーにマップされる。ステートメントであるラインは、白い背景を有する。ステートメントでないラインは灰色である。 As shown in FIG. 71, a statement is selected by clicking on a line of code clicks on a variable and displays its value in a render window. In the screen shot 870 of FIG. 71, the “normal” variable (Vector3 type) is selected. A vector value is mapped to each color. A line that is a statement has a white background. Lines that are not statements are gray.
図72は、デバッガスクリーン880のスクリーンショットを示しており、条件ステートメントとループがどのように扱われるかを例示している。条件ステートメントとループは、いくつかのデータ点に対しては実行されず、従って、選択されたステートメントが条件クローズであるときは、変数は、あるデータ点に対しては、見ることができない。
図72に示されるように、選択されたステートメント882が条件ステートメントであるときは、条件値が真であるピクセル884のみがデバッグ値を表示する。残りのピクセルは元の結果を表示する。
FIG. 72 shows a screenshot of the debugger screen 880 illustrating how condition statements and loops are handled. Conditional statements and loops are not executed for some data points, so when the selected statement is a conditional close, the variable is not visible for some data points.
As shown in FIG. 72, when the selected statement 882 is a conditional statement, only the pixel 884 whose condition value is true displays the debug value. The remaining pixels display the original result.
図73は、デバッガスクリーン890のスクリーンショットを示しており、選択されたステートメントがループにあるときに何が起こるかを例示している。その場合は、表示された値は、ループを介する第1パスを表現している。ループカウンタを追加して、ユーザーがループを介してどのパスをデバッグしたいかを指定できるようにすることも可能である。 FIG. 73 shows a screenshot of the debugger screen 890, illustrating what happens when the selected statement is in a loop. In that case, the displayed value represents the first pass through the loop. A loop counter can be added to allow the user to specify which path he wants to debug through the loop.
ユーザーは、左右の矢印キーを使用して、コードのラインを前後に移動することにより、ステートメントを進むことができる。アップおよびダウン矢印キーは、変数リスト中を移動する。
スペースバーは、ビューポートにおけるサンプルオブジェクトタイプ内を循環する。
図74は、デバッガスクリーン900のスクリーンショットを示し、テクスチャ座標がどのように扱われるかを示している。ユーザーは、この例に示されるように、テクスチャ座標を選択して見ることができる。プロトタイプは、テクスチャ座標の4つのセットを提供し、それぞれは、以前のセットの2倍多い回数だけ並べて表示されている。UとVの導出ベクトルもまた供給される。
The user can advance the statement by moving the line of code back and forth using the left and right arrow keys. The up and down arrow keys move through the variable list.
The space bar cycles through the sample object type in the viewport.
FIG. 74 shows a screenshot of the debugger screen 900 and shows how texture coordinates are handled. The user can select and view the texture coordinates as shown in this example. The prototype provides four sets of texture coordinates, each displayed side by side twice as many times as the previous set. U and V derived vectors are also provided.
ベクトル値がカラーにマップされると、その値が1を超えると、ラップするように設定される。この例においては、選択されたテクスチャ座標は、4回繰り返され、それはデバッガにおける変数902を見るときに明確に見ることができる。
図74において、テクスチャ座標のセットは、2倍のタイリングで利用できる。
図75は、デバッガスクリーン910のスクリーンショットを示しており、視差のマップにより、テクスチャ座標を変形することにより深度のイリュージョンが生成されている。図76のスクリーンショット920において、テクスチャ座標のオフセットは、デバッガにおけるテクスチャ座標を見ると、明確に見ることができる。
When a vector value is mapped to a color, if the value exceeds 1, it is set to wrap. In this example, the selected texture coordinate is repeated four times, which can be clearly seen when looking at the variable 902 in the debugger.
In FIG. 74, a set of texture coordinates can be used with double tiling.
FIG. 75 shows a screen shot of the debugger screen 910, in which a depth illusion is generated by transforming texture coordinates according to a parallax map. In the screen shot 920 of FIG. 76, the texture coordinate offset can be clearly seen by looking at the texture coordinates in the debugger.
図77と78は、デバッガスクリーン930と940のスクリーンショットであり、他のシェイダーを例示している。
・結論
上記の記述は、本発明の特別な実施形態に限定されてきた。しかし、種々の変形および修正が、本発明に対してなされ、本発明の利点のいくつかまたはすべてを得ることができるということは明白であろう。付随する請求項の目的は、これらと、他の変形例および修正例を、本発明の真の精神および範囲に含まれるものとしてカバーすることである。
77 and 78 are screenshots of debugger screens 930 and 940 illustrating other shaders.
Conclusion The above description has been limited to specific embodiments of the present invention. However, it will be apparent that various changes and modifications can be made to the invention to obtain some or all of the advantages of the invention. The purpose of the appended claims is to cover these and other variations and modifications as falling within the true spirit and scope of the invention.
Claims (38)
メタノードの作成のために作動可能で、メタノードが、ネットワークにおいてより複雑なシェイダーを構築するために組み合わせることができる構成要素シェイダーを備えるメタノード環境と、
前記メタノード環境と連絡状態にあり、ユーザーが前記メタノード環境を使用してシェイダーグラフおよびフェノーミナを構築できるようにするために、前記メタノード環境を管理するグラフィカルユーザーインタフェース(GUI)と、を備える、ことを特徴とする、コンピュータグラフィックシステム。 In a computer graphics system for generating an image of a scene from a representation to which at least one instantiated phenomenon is added, the instantiated phenomenon comprises an encapsulated shader DAG comprising at least one shader node; The improvement of the system is
A metanode environment comprising component shaders that are operable for the creation of metanodes and that can be combined to build more complex shaders in the network;
A graphical user interface (GUI) for managing the metanode environment to be in contact with the metanode environment and to allow a user to build shader graphs and femininas using the metanode environment; A computer graphic system.
人間のオペレータにより使用可能で、前記メタノード環境を管理し、シェイダーを実装し、分離シェイディングアプリケーションを統合するソフトウェア言語を更に備える、ことを特徴とする、請求項1記載のコンピュータグラフィックシステム。 The improvement
The computer graphics system of claim 1, further comprising a software language that can be used by a human operator to manage the metanode environment, implement a shader, and integrate a separate shading application.
前記メタノード環境と連係して、シェイダーグラフとフェノーミナとを構築するGUIを生成するために使用可能な少なくとも1つのGUIライブラリを更に備える、ことを特徴とする、請求項1記載のコンピュータグラフィックシステム。 The improvement
The computer graphics system of claim 1, further comprising at least one GUI library that can be used to generate a GUI that builds a shader graph and a phenomina in conjunction with the metanode environment.
前記ソフトウェア言語は、選択されたハードウェアプラットフォームに対する複数の選択されたシェイダー言語のスーパーセットとして構成可能であり、かつ、
前記ソフトウェア言語は、コンパイラ機能が、前記ソフトウェア言語において表現されたフェノメノンの再使用可能な単一の記述から、選択されたシェイダー言語において選択されたハードウェアプラットフォームに対して最適化されたソフトウェアコードを生成することを可能にする、ことを特徴とする、請求項2記載のコンピュータグラフィックシステム。 In the further improvement,
The software language can be configured as a superset of a plurality of selected shader languages for a selected hardware platform; and
The software language includes software code whose compiler function is optimized for a selected hardware platform in a selected shader language from a single reusable description of Phenomenon expressed in the software language. The computer graphics system of claim 2, wherein the computer graphics system is capable of being generated.
前記選択されたシェイダー言語に対する固有のコンパイラ機能を使用して、前記選択されたハードウェアプラットフォーム及び前記選択されたシェイダー言語に対する前記最適化ソフトウェアコードを、前記選択された集積回路インスタンス化に対するマシン語に変換することを更に含む、ことを特徴とする、請求項4記載のコンピュータグラフィックシステム。 The improvement
Using the compiler functions specific to the selected shader language, the optimized software code for the selected hardware platform and the selected shader language is converted into a machine language for the selected integrated circuit instantiation. 5. The computer graphic system of claim 4, further comprising converting.
前記GUIと連絡状態にあり、(1)前記ユーザーが、シェイダーにおける可能性のある欠陥を検出して補正できるようにし、(2)テスト中のシェイダー、メタノード、またはフェノメノンによるテストシーンが常にレンダリングされるビューイングウィンドウを提供する、対話式で、視覚的なリアルタイムデバッグ環境を更に備える、ことを特徴とする、請求項1記載のコンピュータグラフィックシステム。 The improvement
Being in contact with the GUI, (1) allowing the user to detect and correct potential defects in the shader, and (2) a test scene with the shader, metanode, or phenomenon that is being tested is always rendered The computer graphics system of claim 1, further comprising an interactive visual real-time debugging environment that provides a viewing window.
前記GUIと連絡状態にあり、(1)前記ユーザーが、シェイダーにおける可能性のある欠陥を検出して補正できるようにし、(2)テスト中のシェイダー、メタノード、またはフェノメノンによるテストシーンが常にレンダリングされるビューイングウィンドウを提供する、対話式で、視覚的なリアルタイムデバッグ環境を更に備える、ことを特徴とする、請求項2記載のコンピュータグラフィックシステム。 The improvement
Being in contact with the GUI, (1) allowing the user to detect and correct any possible defects in the shader, and (2) a test scene with the shader, metanode, or phenomenon that is being tested is always rendered The computer graphics system of claim 2, further comprising an interactive visual real-time debugging environment that provides a viewing window.
前記フェノメノンクリエータが、
ネットワークにおいてより複雑なシェイダーを構築するために組み合わせることができる要素シェイダーを備えるメタノードの作成を実施可能なメタノード環境と、
前記メタノード環境と連絡状態にあり、ユーザーが、前記メタノード環境を使用して、シェイダーグラフとフェノーミナとを構築できるように、前記メタノード環境を管理するグラフィカルユーザーインタフェース(GUI)と、
前記オペレータにより使用可能で、前記メタノード環境を管理し、シェイダーを実装し、分離シェイディングアプリケーションを統合し得るソフトウェア言語であって、選択されたハードウェアプラットフォームに対する複数の選択されたシェイダー言語のスーパーセットとして構成可能で、コンパイラ機能が、ソフトウェア言語において表現されたフェノメノンの、再使用可能な単一の記述から、選択されたシェイダー言語における選択されたハードウェアプラットフォームに対する最適化されたソフトウェアコードを生成することを可能にするソフトウェア言語と、を備える、ことを特徴とする、コンピュータグラフィックシステム。 A computer graphics system that allows an operator to create a phenomenon with an encapsulated shader DAG comprising at least one shader node, the computer graphics system comprising: (A) a plurality of basic shader nodes including shaders And (B) a Phenomenon creator configured to allow the operator to interconnect the basic shader node from the basic shader node database to a DAG, The Phenomenon Creator for verifying that the interconnection between the basic shader nodes provided by the operator comprises a DAG, and in improving the system,
The Phenomenon Creator is
A metanode environment capable of creating metanodes with element shaders that can be combined to build more complex shaders in the network;
A graphical user interface (GUI) that manages the metanode environment so that the metanode environment is in contact and a user can use the metanode environment to build a shader graph and a phenomina;
A software language that can be used by the operator to manage the metanode environment, implement a shader, and integrate a separate shading application, a superset of a plurality of selected shader languages for a selected hardware platform The compiler function generates optimized software code for a selected hardware platform in a selected shader language from a single reusable description of Phenomenon expressed in the software language A computer graphics system comprising: a software language that enables
前記フェノメノンエディタが、
ネットワークにおいてより複雑なシェイダーを構築するために組み合わせることができる構成要素シェイダーを備えるメタノードの作成を実施可能なメタノード環境と、
前記メタノード環境と連絡状態にあり、ユーザーが、前記メタノード環境を使用して、シェイダーグラフとフェノーミナとを構築できるように、前記メタノード環境を管理するグラフィカルユーザーインタフェース(GUI)と、
前記オペレータにより使用可能で、前記メタノード環境を管理し、シェイダーを実装し、分離シェイディングアプリケーションを統合し得るソフトウェア言語であって、選択されたハードウェアプラットフォームに対する複数の選択されたシェイダー言語のスーパーセットとして構成可能で、コンパイラ機能が、ソフトウェア言語において表現されたフェノメノンの、再使用可能な単一の記述から、選択されたシェイダー言語における選択されたハードウェアプラットフォームに対する最適化されたソフトウェアコードを生成することを可能にするソフトウェア言語と、を備える、ことを特徴とする、コンピュータグラフィックシステム。 In a computer graphic system that allows an operator to generate an instantiated Phenomenon from a Phenomenon with an encapsulated shader DAG comprising at least one shader DAG having at least one shader node, the computer graphic The system provides (A) a Phenomenon database configured to store the Phenomenon, and (B) the operator selects the Phenomenon and provides a value for at least one parameter associated with the at least one shader node. A Phenomenon editor configured to allow for the improvement of the system,
The Phenomenon Editor
A metanode environment capable of creating metanodes with component shaders that can be combined to build more complex shaders in the network;
A graphical user interface (GUI) that manages the metanode environment so that the metanode environment is in contact and a user can use the metanode environment to build a shader graph and a phenomina;
A software language that can be used by the operator to manage the metanode environment, implement a shader, and integrate a separate shading application, a superset of a plurality of selected shader languages for a selected hardware platform The compiler function generates optimized software code for a selected hardware platform in a selected shader language from a single reusable description of Phenomenon expressed in the software language A computer graphics system comprising: a software language that enables
ネットワークにおいてより複雑なシェイダーを構築するために組み合わせることができる要素シェイダーを備えるメタノードの作成を実施可能なメタノード環境と、
前記メタノード環境と連絡状態にあり、ユーザーが、前記メタノード環境を使用して、シェイダーグラフとフェノーミナとを構築できるように、前記メタノード環境を管理するグラフィカルユーザーインタフェース(GUI)と、
前記オペレータにより使用可能で、前記メタノード環境を管理し、シェイダーを実装し、分離シェイディングアプリケーションを統合し得るソフトウェア言語であって、選択されたハードウェアプラットフォームに対する複数の選択されたシェイダー言語のスーパーセットとして構成可能で、コンパイラ機能が、ソフトウェア言語において表現されたフェノメノンの、再使用可能な単一の記述から、選択されたシェイダー言語における選択されたハードウェアプラットフォームに対する最適化されたソフトウェアコードを生成することを可能にするソフトウェア言語と、を備える、ことを特徴とする、コンピュータグラフィックシステム。 A computer graphics system for generating an image of a scene from a representation appended with at least one instantiated Phenomenon comprising an encapsulated shader DAG comprising at least one shader node, the computer graphics system comprising: (A) The at least one instantiated Phenomenon determines whether preprocessing associated with the representation is necessary and, if necessary, performs the preprocessing to generate a preprocessed representation of the scene A preprocessor configured, and (B) a renderer configured to generate a rendered image from the preprocessed representation of the scene, the system improvement comprising:
A metanode environment capable of creating metanodes with element shaders that can be combined to build more complex shaders in the network;
A graphical user interface (GUI) that manages the metanode environment so that the metanode environment is in contact and a user can use the metanode environment to build a shader graph and a phenomina;
A software language that can be used by the operator to manage the metanode environment, implement a shader, and integrate a separate shading application, a superset of a plurality of selected shader languages for a selected hardware platform The compiler function generates optimized software code for a selected hardware platform in a selected shader language from a single reusable description of Phenomenon expressed in the software language A computer graphics system comprising: a software language that enables
ネットワークにおいてより複雑なシェイダーを構築するために組み合わせることができる構成要素シェイダーを備えるメタノードの作成を実施可能なメタノード環境と、
前記メタノード環境と連絡状態にあり、ユーザーが、前記メタノード環境を使用して、シェイダーグラフとフェノーミナとを構築できるように、前記メタノード環境を管理するグラフィカルユーザーインタフェース(GUI)と、
前記オペレータにより使用可能で、前記メタノード環境を管理し、シェイダーを実装し、分離シェイディングアプリケーションを統合し得るソフトウェア言語であって、選択されたハードウェアプラットフォームに対する複数の選択されたシェイダー言語のスーパーセットとして構成可能で、コンパイラ機能が、ソフトウェア言語において表現されたフェノメノンの、再使用可能な単一の記述から、選択されたシェイダー言語における選択されたハードウェアプラットフォームに対する最適化されたソフトウェアコードを生成することを可能にするソフトウェア言語と、
前記メタノード環境と連係して使用可能で、シェイダーグラフおよびフェノーミナを構築するGUIを生成するための少なくとも1つのGUIライブラリと、
前記GUIと連絡状態にあり、対話的で、視覚的で、かつリアルタイムなデバッグ環境であって、(1)前記ユーザーがシェイダーにおける可能性のある欠陥を検出して補正できるようにし、(2)テスト中のシェイダー、メタノード、またはフェノメノンによるテストシーンが常にレンダリングされるビューイングウィンドウを提供するデバッグ環境と、
前記コンパイラ機能と連絡状態にある機器であって、前記選択されたハードウェアプラットフォーム及び選択されたシェイダー言語に対する最適化されたソフトウェアコードを、前記選択されたシェイダー言語に対する固有のコンパイラ機能を使用して、選択された集積回路のインスタンス化に対するマシン語に変換する機器と、を備える、ことを特徴とする、コンピュータグラフィックシステム。 In a computer graphics system for generating an image of a scene from a representation appended with at least one instantiated Phenomenon comprising an encapsulated shader DAG comprising at least one shader node, the system improvement comprises:
A metanode environment capable of creating metanodes with component shaders that can be combined to build more complex shaders in the network;
A graphical user interface (GUI) that manages the metanode environment so that the metanode environment is in contact and a user can use the metanode environment to build a shader graph and a phenomina;
A software language that can be used by the operator to manage the metanode environment, implement a shader, and integrate a separate shading application, a superset of a plurality of selected shader languages for a selected hardware platform The compiler function generates optimized software code for a selected hardware platform in a selected shader language from a single reusable description of Phenomenon expressed in the software language A software language that enables
At least one GUI library for generating a GUI that can be used in conjunction with the metanode environment and that builds shader graphs and fenomina;
An interactive, visual, and real-time debugging environment in contact with the GUI, (1) allowing the user to detect and correct potential defects in the shader; (2) A debugging environment that provides a viewing window in which test scenes from shaders, metanodes, or Phenomenon under test are always rendered;
A device in communication with the compiler function, wherein the optimized software code for the selected hardware platform and the selected shader language is obtained using the intrinsic compiler function for the selected shader language. A computer graphic system comprising: a machine language for the instantiation of the selected integrated circuit.
より複雑なシェイダーを構築するために、ネットワークにおいて組み合わせることができる構成要素シェイダーを備えるメタノードを作成するために作動可能なメタノード環境を構成することと、
前記メタノード環境と連絡状態にあり、前記メタノード環境を管理して、ユーザーが、前記メタノード環境を使用してシェイダーグラフおよびフェノーミナを構築できるようにするグラフィカルユーザーインタフェース(GUI)を構成することと、
インタフェースとして人間のオペレータにより使用可能で、前記メタノード環境を管理し、シェイダーを実装し、分離シェイディングアプリケーションを統合し得るソフトウェア言語であって、選択されたハードウェアプラットフォームに対する複数の選択されたシェイダー言語のスーパーセットとして構成可能で、コンパイラ機能が、ソフトウェア言語において表現されたフェノメノンの、再使用可能な単一の記述から、選択されたシェイダー言語における選択されたハードウェアプラットフォームに対する最適化されたソフトウェアコードを生成するソフトウェア言語を提供することと、
前記メタノード環境と連係して使用でき、シェイダーグラフおよびフェノーミナを構築するGUIを生成する少なくとも1つのGUIライブラリを提供することと、
前記GUIと連絡状態にあり、対話的で、視覚的で、かつリアルタイムなデバッグ環境であって、(1)前記ユーザーがシェイダーにおける可能性のある欠陥を検出して補正できるようにし、(2)テスト中のシェイダー、メタノード、またはフェノメノンによるテストシーンが常にレンダリングされるビューイングウィンドウを提供するデバッグ環境を構成することと、
前記コンパイラ機能と連絡状態にある機器であって、前記選択されたハードウェアプラットフォーム及び選択されたシェイダー言語に対する最適化されたソフトウェアコードを、前記選択されたシェイダー言語に対する固有のコンパイラ機能を使用して、選択された集積回路のインスタンス化に対するマシン語に変換する機器を構成することと、を含む、ことを特徴とする、方法。 Enables the generation of an image of a scene in a computer graphics system for generating an image of a scene from a representation with at least one instantiated Phenomenon comprising an encapsulated shader DAG comprising at least one shader node A method,
Configuring a metanode environment operable to create a metanode with component shaders that can be combined in the network to build more complex shaders;
Configuring a graphical user interface (GUI) that is in communication with the metanode environment, manages the metanode environment, and allows a user to build shader graphs and femininas using the metanode environment;
A software language that can be used by a human operator as an interface to manage the metanode environment, implement shaders, and integrate separate shading applications, with multiple selected shader languages for a selected hardware platform Optimized software code for a selected hardware platform in a selected shader language from a single reusable description of Phenomenon expressed in the software language, which can be configured as a superset of Providing a software language that generates
Providing at least one GUI library that can be used in conjunction with the metanode environment to generate a GUI for building shader graphs and fenomina;
An interactive, visual, and real-time debugging environment in contact with the GUI, (1) allowing the user to detect and correct potential defects in the shader; (2) Configuring a debugging environment that provides a viewing window in which test scenes from shaders, metanodes, or Phenomenon under test are always rendered;
A device in communication with the compiler function, wherein the optimized software code for the selected hardware platform and the selected shader language is obtained using the intrinsic compiler function for the selected shader language. Configuring the device to convert to machine language for instantiation of the selected integrated circuit.
前記GUI上のグラフィカル表現を含むプロファイリングを介しての、シェイダーの性能分析を更に含む、ことを特徴とする、請求項8記載のコンピュータグラフィックシステム。 The improvement
9. The computer graphics system of claim 8, further comprising a shader performance analysis via profiling including a graphical representation on the GUI.
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US69612005P | 2005-07-01 | 2005-07-01 | |
| US70742405P | 2005-08-11 | 2005-08-11 | |
| PCT/US2006/025827 WO2007005739A2 (en) | 2005-07-01 | 2006-06-30 | Computer graphics shader systems and methods |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2009500730A true JP2009500730A (en) | 2009-01-08 |
Family
ID=37605099
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008519658A Pending JP2009500730A (en) | 2005-07-01 | 2006-06-30 | Computer graphic shader system and method |
Country Status (5)
| Country | Link |
|---|---|
| EP (1) | EP1907964A4 (en) |
| JP (1) | JP2009500730A (en) |
| AU (1) | AU2006265815A1 (en) |
| CA (1) | CA2613541A1 (en) |
| WO (1) | WO2007005739A2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20190110136A (en) * | 2017-02-06 | 2019-09-27 | 루씨드 소프트웨어 인코포레이티드 | Diagrams of Structured Data |
| JP2024513325A (en) * | 2021-10-25 | 2024-03-25 | テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド | Physical special effects rendering methods and devices, computer equipment, and computer programs |
Families Citing this family (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| FR2917199B1 (en) * | 2007-06-05 | 2011-08-19 | Thales Sa | SOURCE CODE GENERATOR FOR A GRAPHIC CARD |
| US8310483B2 (en) | 2007-11-20 | 2012-11-13 | Dreamworks Animation Llc | Tinting a surface to simulate a visual effect in a computer generated scene |
| US8345045B2 (en) * | 2008-03-04 | 2013-01-01 | Microsoft Corporation | Shader-based extensions for a declarative presentation framework |
| US8698818B2 (en) * | 2008-05-15 | 2014-04-15 | Microsoft Corporation | Software rasterization optimization |
| US8866827B2 (en) | 2008-06-26 | 2014-10-21 | Microsoft Corporation | Bulk-synchronous graphics processing unit programming |
| JP5123353B2 (en) | 2010-05-06 | 2013-01-23 | 株式会社スクウェア・エニックス | A virtual flashlight that illuminates and discovers real-time scenes |
| US20130063460A1 (en) * | 2011-09-08 | 2013-03-14 | Microsoft Corporation | Visual shader designer |
| US9589382B2 (en) | 2013-03-15 | 2017-03-07 | Dreamworks Animation Llc | Render setup graph |
| US9218785B2 (en) * | 2013-03-15 | 2015-12-22 | Dreamworks Animation Llc | Lighting correction filters |
| US9811936B2 (en) | 2013-03-15 | 2017-11-07 | Dreamworks Animation L.L.C. | Level-based data sharing for digital content production |
| US9514562B2 (en) | 2013-03-15 | 2016-12-06 | Dreamworks Animation Llc | Procedural partitioning of a scene |
| US9659398B2 (en) | 2013-03-15 | 2017-05-23 | Dreamworks Animation Llc | Multiple visual representations of lighting effects in a computer animation scene |
| DE102014214666A1 (en) * | 2014-07-25 | 2016-01-28 | Bayerische Motoren Werke Aktiengesellschaft | Hardware-independent display of graphic effects |
| US10740074B2 (en) * | 2018-11-30 | 2020-08-11 | Advanced Micro Devices, Inc. | Conditional construct splitting for latency hiding |
| CN109727186B (en) * | 2018-12-12 | 2023-03-21 | 中国航空工业集团公司西安航空计算技术研究所 | SystemC-based GPU (graphics processing Unit) fragment coloring task scheduling method |
| CN111460570B (en) * | 2020-05-06 | 2023-01-06 | 北方工业大学 | Complex structure node auxiliary construction method based on BIM technology |
| CN113407090A (en) * | 2021-05-31 | 2021-09-17 | 北京达佳互联信息技术有限公司 | Interface color sampling method and device, electronic equipment and storage medium |
| CN114359464B (en) * | 2021-11-30 | 2024-11-08 | 成都鲁易科技有限公司 | A method and device for image rendering based on GLSL ES |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001509620A (en) * | 1997-07-02 | 2001-07-24 | メンタル イメージズ ゲゼルシャフト ミット ベシュレンクテル ハフトング ウント ツェーオー.カーゲー | Computer graphics system |
| JP2002063590A (en) * | 2000-08-23 | 2002-02-28 | Nintendo Co Ltd | Recirculating shade tree blender for graphics system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050140672A1 (en) * | 2003-02-18 | 2005-06-30 | Jeremy Hubbell | Shader editor and compiler |
-
2006
- 2006-06-30 AU AU2006265815A patent/AU2006265815A1/en not_active Abandoned
- 2006-06-30 CA CA002613541A patent/CA2613541A1/en not_active Abandoned
- 2006-06-30 EP EP06774417A patent/EP1907964A4/en not_active Withdrawn
- 2006-06-30 JP JP2008519658A patent/JP2009500730A/en active Pending
- 2006-06-30 WO PCT/US2006/025827 patent/WO2007005739A2/en not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001509620A (en) * | 1997-07-02 | 2001-07-24 | メンタル イメージズ ゲゼルシャフト ミット ベシュレンクテル ハフトング ウント ツェーオー.カーゲー | Computer graphics system |
| JP2002063590A (en) * | 2000-08-23 | 2002-02-28 | Nintendo Co Ltd | Recirculating shade tree blender for graphics system |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20190110136A (en) * | 2017-02-06 | 2019-09-27 | 루씨드 소프트웨어 인코포레이티드 | Diagrams of Structured Data |
| JP2020510896A (en) * | 2017-02-06 | 2020-04-09 | ルーシッド ソフトウェア,インコーポレイテッド | Diagram for structured data |
| US10929004B2 (en) | 2017-02-06 | 2021-02-23 | Lucid Software, Inc. | Diagrams for structured data |
| KR102290012B1 (en) * | 2017-02-06 | 2021-08-19 | 루씨드 소프트웨어 인코포레이티드 | Diagrams for structured data |
| JP2024513325A (en) * | 2021-10-25 | 2024-03-25 | テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド | Physical special effects rendering methods and devices, computer equipment, and computer programs |
| JP7582589B2 (en) | 2021-10-25 | 2024-11-13 | テンセント・テクノロジー・(シェンジェン)・カンパニー・リミテッド | Method and apparatus for rendering physical special effects, computer device, and computer program |
Also Published As
| Publication number | Publication date |
|---|---|
| EP1907964A2 (en) | 2008-04-09 |
| EP1907964A4 (en) | 2009-08-12 |
| AU2006265815A1 (en) | 2007-01-11 |
| WO2007005739A2 (en) | 2007-01-11 |
| CA2613541A1 (en) | 2007-01-11 |
| WO2007005739A3 (en) | 2008-09-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7548238B2 (en) | Computer graphics shader systems and methods | |
| Haines et al. | Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs | |
| JP2009500730A (en) | Computer graphic shader system and method | |
| Peercy et al. | Interactive multi-pass programmable shading | |
| Wang et al. | OpenSceneGraph 3.0: Beginner's guide | |
| US6496190B1 (en) | System and method for generating and using systems of cooperating and encapsulated shaders and shader DAGs for use in a computer graphics system | |
| Wyman et al. | Introduction to directx raytracing | |
| WO1999052080A1 (en) | A time inheritance scene graph for representation of media content | |
| Najork et al. | Obliq-3D: A high-level, fast-turnaround 3D animation system | |
| Wolff | OpenGL 4 Shading Language Cookbook | |
| De Vries | Learn opengl | |
| Ragan-Kelley | Practical interactive lighting design for RenderMan scenes | |
| Von Pilgrim et al. | Eclipse GEF3D: bringing 3d to existing 2d editors | |
| Gluyas | Real-Time Raytracer for Translucent Materials | |
| Babič | Shader graph module for Age | |
| Revie | Designing a Data-Driven Renderer | |
| Granof | Submitted to the Faculty of the | |
| Reyes | A graph editing framework for the StreamIt language | |
| Goliaš | Hybrid renderer | |
| Bauchinger | Designing a modern rendering engine | |
| Vojtko | Design and Implementation of a Modular Shader System for Cross-Platform Game Development | |
| Angel et al. | An interactive introduction to WebGL | |
| Sostek | Programming Abstractions for GPU-Accelerated Agent-Based Simulations | |
| Ferrer Comas | PixelWizard: pixel art VFX tool | |
| Atella | Rendering Hypercomplex Fractals |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101019 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110118 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110215 |