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

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