Skip to main content

Posts

Showing posts from 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

Using stand alone mental ray

If you render a scene using Maya, 3dsMax, XSI, and so on, you can skip this part of article. If you have your own shaders or you are managing a render firm, then this might help you a bit. References of mental ray The following mental ray references are the important ones. Thomas Driemeyer, Rendering with mental ray, 3nd Ed. (Mental Ray Handbooks 1), ISBN-13: 978-3211228753 Thomas Driemeyer and Rolf Herken, Programming mental ray, (Mental Ray Handbooks 2), ISBN-13: 978-3211838518 Andy Kopra, Writing Mental Ray Shaders: A Perceptual Introduction (Mental Ray Handbooks 3), ISBN-13: 978-3211489642 These are advanced documentation and there are some more introductory documents around. Among these three books, I think Andy Korpa's book is easier to read. There is also a support page of the book http://www.writingshaders.com/ . Getting mental ray In my case, I use mental ray at my company. Therefore, I have no problem to get mental ray. However, if you want to have mental ray in private,

What is mental ray shader?

mental ray shader is C/C++ code that is invoked by the mental ray core when a ray hits an object. The name ``shader'' is used by hysterical reason, I think ``Plugin'' is much better word nowadays. mental ray shader gives us a lot of freedom for users, but, I think we do not need to write a custom shader in most of the cases. The meaning of 'gives us a lot of freedom' is when a ray hit an object, a user could almost everything by a shader. For example, when a ray hit an object, mental ray can send an email from the shader. (I believe that mental ray designer does not recommended this kind of side effect usage, but, a shader is just a plugin and it should be possible.) You can do anything means also it is difficult to handle the shaders. mental ray was developed for a long time and takes care of backward compatibility, this contributed for its complexity.

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

About this blog

This blog is about mental ray, a rendering software. What is mental ray? Mental ray is a rendering software produced by a German company (a subsidiary company of NVidia. (2009)) mental images, GmbH . Several DCC (Digital Contents Creation) software, e.g., Maya, 3dsMax, Softimage XSI, employ mental ray as one of a renderer. Mental ray is also used in some CAD software, like Solidworks. The famous usage is special effect of some movies, such as StarWars, Matrix II/III, recently one is The Curious Case of Benjamin Button. http://www.mentalimages.com/products/mental-ray.html http://www.mentalimages.com/gallery/motion-pictures.html The main sales point of mental ray is a lot of features and you can do a lot of things. But on the other hand, we can do everything means sometimes we can do nothing. It is complex and thus difficult. Especially the customization ability of shaders is flexible, but it is a bit hard for me. However, usually it is suffice to use the provided shaders. One of my Ital