Wednesday, May 20, 2009

The architecture of mental ray

Figure 1 shows the standard mental ray architecture.
Figure 1 standard mental ray architecture.

F1: Application scene file: Application proper file. For example, .max (3dsmax), .ma or .mb (Maya), .scn (XSI).

F2: .mi file: mental ray scene description file. If the DCC software has mental ray plugin, or integrates mental ray, they usually support .mi file export. (A2)

1. Application: DCC (Digital contents creation) software. For example, Maya, 3DSMax, XSI, CAD program, and so on.

2. mental ray core: mental ray core program. There are library version mental ray and stand alone mental ray. The library version mental ray is usually invoked by a DCC application via translator module of the application. A translator is a module of a DCC application which translate the DCC application's internal data structure to the mental ray data structure. The stand alone version mental ray reads a .mi file and performs the rendering. If you have only mental ray core, mental ray does not work. mental ray always needs shaders. It might be easier to understand that if you realize the shaders are plugin software.

3. mental ray base shader: mental ray supports these shaders as default. There are basic light sources and basic materials. For example, one of the simplest shader is the Lambert shader.

4. Application shaders: Each DCC application or CAD software has own proper shaders. For example, 3dsMax has 3dmaxshaders, Maya has mayabase shader package.

5. Custom shaders: User defined shaders or special shaders from mental ray (for example, mia_material. In 3dsMax language, it is Design and Architectural shader).

Although this structure is a standard, some application does not tightly communicate with mental ray and uses .mi files.

The important thing of this figure is that mental ray core itself does not work without (either default or special) shaders. Shaders have an impornat role in the standalone mental ray or an integrated mental ray in DCC application. Actually, mental ray can not generate meaningfull images without shaders. (mental ray core still can generate a black image without shaders.)

No comments:

Post a Comment