Skip to main content

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.)

Comments

Popular posts from this blog

What is shader?

Shader is one of the important component of mental ray. Let me tell about it a bit. A shader is a program code fragment that computes how light interacts with objects. This was the original concept of shader in early computer graphics time and nowadays the role of shader and its meaning are expanded. In one of the common scenario in computer graphics, objects are usually represented as polygons. First, the intensity of each vertex is computed, then inside the polygon is filled by an interpolation method. This becomes more complex as the computer graphics technology developed. There were two shader development directions. One is a hardware rendering that concentrates rendering speed and interactivity. The other is a software rendering that concentrates the image quality. Nowadays graphics hardware is called GPU (Graphics Processing Unit). The early stage GPU has fixed functionalities. Because fixed functionality can be achieved more performance in practice. The implementation was based ...

A note of mental ray/iray camera terminology.

The original mental ray camera is a pinhole camera. Therefore, some of the terminology differs with a normal camera. I will write them down here. aperture: This is the film width size. This has no relationship with lens aperture/opening. mental ray's camera was a pinhole camera, there is no lens aperture. focal: This is the distance from lens to the film (sensor). Pinhole camera always focused, so there is no focal length meaning. But using parameters aperture and focal length, we can compute the horizontal field of view. I think these two parameters exist for this purpose. aspect ratio: This is film(sensor)'s aspect ratio. There is no relationship with pixel resolution and camera geometry.  aspect ratio = film width/film height. Note: If we use aperture, focal, and aspect ratio, we can compute the vertical field of view. mental ray/iray camera model (pinhole camera) without lens shader Current mental ray/iray can have depth of field effect, etc., this termino...

mental ray license bug is fixed on an Intel Core i7 machine

There was a critical license related bug in mental ray 3.7 on Intel Core i7 and the fixed version seems to be distributed now. http://forum.mentalimages.com/showthread.php?t=5511 The fixed mental ray (SPM) version (might depends on OEM) is the following. mental ray 3.7: 3.7.1.31 (2009 September 16) or higher mental ray 3.7+: 3.7.53.6 (2009 October 22) or higher The detail of this problem is: When you want to run mental ray on Intel Core i7 machine, you will get the following error message: Sorry, no license available and can not run mental ray even you have enough licenses left. It seems recent Intel's CPU becomes complex to count the number of cores. This bug seems related with this. http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/ Personally, I don't like the license that limits the number of cores. Because the new machines has more cores, but we can not use these cores because of license shortage. If I buy a new machine...