Skip to main content

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 to mia_material convert 3dsmax script here (https://code.google.com/p/shitohichi-tools/source/browse/#hg/mentalray/max2mia_material). This is based on Zap's VRay shader to mia_material converter (http://mentalraytips.blogspot.com/). Thank you, Zap. You can find two scripts. The main script is yh_max2mia_material.ms. Open this and evaluate, then the shaders in the scene will be converted. (yh_material_object_map.ms is a collection of subroutines. Therefore, this script is also needed.)

Of course, automatic conversion never be perfect. Some will fail. But, I think this is a good start point if there are many shaders in your scene.

From next week, SIGGRAPH starts. (I've never been SIGGRAPH.) I assume there is some iray demo there.

I concludes the shader conversion story here, at least this moment.

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