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

iray 5: iray in standalone mental ray

So far, I told about exporting an mi file. Now here is the shader conversion for iray. iray supports mia_material. To reuse current scenes, it is nice if I could convert the 3dsmax shaders to mia_material (Arch&Design) shader. I could imagine that some of other shaders will be supported also, but, iray is a CUDA program. CUDA has a divergence problem, it means, if many kind of shaders are in the scene, the performance becomes low. That's natural. A shader is a function and many different shaders are running on a CUDA device, I could see it will be slow. But, if the same function everywhere, then CUDA works well. (in theory. If function itself has a lot of branches, then there is a problem. Though many obstacles are there, but many kind of shaders seems to have not so chance. ) Also I imagine there is less trouble if I use the mental images native supported shaders since iray is a new renderer. In my personal opinion, I would convert the shaders. You can find 3dsmax shaders ...

iray 3: iray in standalone mental ray

How to export mi file from 3dsmax. 1. Assign mental ray renderer as Production renderer First open the Render Set Up dialog. Figure export_mi_1 show that opening the rollout of assign renderer and then choosing the mental ray renderer as Production renderer. Figure export_mi_1 2. Export a mi file from 3dmax. Choose Render Set Up --- Processing Tab. First you need to choose a filename as in Figure export_mi_2. Without a file name, the checkbox of 'Export on Render' is disabled. This was difficult for me. I wanted to export a file, but Export on Render is disabled. I wish I could choose the Export on Render and then see a warning message, ''an export file name is not specified.'' Next, push the Render button, then a mi file is exported. Figure export_mi_2 This is also difficult for me. When you ' export ' a file, push the ' render ' button. I wish it was like   When you ' export ' a file, push the ' export ' ...

iray 2: iray in standalone mental ray

Even iray has no customized shaders, iray has a shader. It is mia_material (Arch&Design in 3dsmax) only. Actually, it is a shader that has mia_material interface and the implementation is different from mental ray (only for iray). mental images explains this is for the users who already know the mia_material. Such user doesn't need to learn the iray shader from the scratch. Therefore, some of the physically meaningless parameters of mia_material are disabled. They also said that they will support more physical shaders, like BRDF shaders. Someone  asked about volume shaders support at the confenence, but, unfortunately, iray version 1 doesn't support volume shaders and will be supported in the following versions sometime. As for a DCC software user, the problem of iray is they can use it from 3dsmax/Maya/XSI or not. But NVidia's explanation is 'that is autodesk's decision.' Although, mental ray 3.8+ standalone or NVidia RealityServer support iray. (See ment...