lume shaders for maya 2008

david | mentalray,rendering | Wednesday, January 2nd, 2008

I've noticed that Master Zap often uses the Glare shader in his renderings. This shader is part of a suite of shaders, called LumeTools, that ship with Autodesk 3ds Max.

About 3 years ago the Lume shaders were ported to maya by Jan Sandstrom (pixero) with some help from Francesca from Ctrl.Studios. I had read about stability problems when using them in maya, so I never really made any effort to try them.

Ok, fast forward to now. The lume shaders are included with Max 2008. The old maya port still works and I have had no stability problems so far.

Here's how to get the current LumeTools Collection up and running in maya 2008.

First you need the latest lume.dll file (I'm assuming windows here). Apparantly the Glare shader was updated by Zap in April 2007. I dont know if anything else has been changed though.

Autodesk have made a trial version of Max 2008 available for download and it contains the Lume shaders. I had to download the whole 580MB file just to get the tiny 196KB lume.dll file, so if you have trouble getting this, let me know and I'll send you a copy.

Next you need all the lume support files which you can download from Jan Sandstrom's site. This includes the hypershader icons, the AE_Template scripts and the very important .mi file.

lume.dll goes in your mentalray custom lib folder. lume.mi goes in the include folder. The icons go in your icons folder and the AE files in your scripts folder.

What you should know is that to get the Lume shaders to work in maya required that most of them had to be "phenomenised" to work around the problem of spaces in the original attribute names. For example the Lume shader called Glare has been phenomenised and named Glare_LUME. The same naming system has been used for each shader. So in the hypershader you must ignore Glare and use Glare_LUME instead.

My small addition to the configuration was to hide the original shaders from the hypershader menu to avoid confusion. To do this you need to add some lines to mentalrayCustomNodeClass.mel (which can be found in D:\Program Files\Autodesk\Maya2008\scripts\others).

Copy the file to your local scripts folder and edit the copy. Add the following block of code

if( $nodeType == "Adjustments" ||
$nodeType == "BumpCapture" ||
$nodeType == "Glare" ||
$nodeType == "Distortion" ||
$nodeType == "Mist" ||
$nodeType == "Submerge" ||
$nodeType == "Landscape" ||
$nodeType == "EdgeShadow" ||
$nodeType == "WaterSurfaceShadow" ||
$nodeType == "Facade" ||
$nodeType == "Glass" ||
$nodeType == "Glow" ||
$nodeType == "Edge" ||
$nodeType == "Metal" ||
$nodeType == "Translucency" ||
$nodeType == "WaterSurface" ||
$nodeType == "Illumination" ||
$nodeType == "Ocean" )
return "rendernode/mentalray/internal";

This should be inserted before the 2nd last line, which is

return "";

When you restart maya you should find the Lume shaders available in the hypershader create menu. All the problem shaders have been hidden.

You can read about the shaders at the LumeTools web site where they have an online manual. It is not written for maya but is still useful.

So far I have only really played with Glare and Landscape and I think they will both be quite useful.

The Glare effect could be done in post, but when done in the render it works on the high dynamic range data before being clamped to 8 bit.

The Landscape shader is an interesting proceedural shader that shades based on curvature and height of the geometry and can be used for much more than just landscapes.

Many of the others seem a bit redundant given the mia_material and the mip shaders. Time will tell.

Update 25 March 2008: A few people requested an example of how to hook up the glare shader, so here is a very simple one. The glare node is connected to the camera's output shader slot. It looks like this when rendered.

glareSimple_testRender.jpg

54 Comments »

  1. Hi David,

    ...
    BTW, Great blog, I learned many things from here.

    Thanks in advance

    Comment by beau_cg — January 8, 2008 @ 10:45 pm

  2. look really interesting...wana test it out ...

    Comment by Vai — January 9, 2008 @ 8:55 pm

  3. I have emailed to both of you.

    Comment by david — January 9, 2008 @ 11:10 pm

  4. Hi David, great info you posted here!
    Already got the .dll, but thats for windows.
    Unfortunately - or not - I use maya for OS X. Do you know of any way to install Lume for the mac?

    Thanks in advance!

    Comment by Daniel — January 11, 2008 @ 5:03 am

  5. No, I am not aware of a version of Lume for the mac. Maybe someone else can help.

    Comment by david — January 11, 2008 @ 11:21 pm

  6. Hi David,

    ...
    Many thanks :)

    Comment by Frosty — January 21, 2008 @ 5:08 pm

  7. Frosty, check your inbox.

    Comment by david — January 21, 2008 @ 11:41 pm

  8. hello.. Id like to try these shaders especially for my Maui project..

    thanks.. lolly.

    Comment by lollygag — January 22, 2008 @ 10:32 am

  9. I have done exactly as described however, the problem shaders as well as the _lume versions are showing up still.

    Of not I do have the production Shaders unhidden too is this something that could be causing the issue.

    Comment by calmasacow — January 25, 2008 @ 2:15 am

  10. calmasacow, I also have the production shaders unhidden, so that should not really be a problem. I have emailed you a copy of my edited mentalrayCustomNodeClass.mel which you can compare with your own.

    Comment by david — January 25, 2008 @ 10:59 pm

  11. hi, could you send your mentalrayCustomNodeClass.mel so i can compare with mine. I just can't get it to work. Or its all these script folders that fools me.

    My Documents\maya\2008\prefs\scripts
    My Documents\\maya\2008\scripts
    My Documents\\maya\scripts

    I don't install custom shaders too often, so i always forget witch one it is.

    Thx.

    Comment by MR_nutty — February 13, 2008 @ 9:51 am

  12. MR_nutty, I replied via email.

    Comment by david — February 13, 2008 @ 10:07 pm

  13. ...

    I can't install Max because it won't get passed the MS Framework stage...ugh! That's Max again for ya!

    Thanks.

    Comment by Kiernan — February 24, 2008 @ 2:30 pm

  14. Kiernan, its on its way.

    Comment by david — February 26, 2008 @ 9:47 pm

  15. same man is this imfomation stored somewhere else becasue I replaced my mentalrayCustomNodeClass.mel with the original and all of the lume tools and all of the producction shaders are still there. What could cause this?

    Comment by calmasacow — March 11, 2008 @ 5:14 am

  16. calmasacow, there are a few possibilities. mentalrayCustomNodeClass.mel can be used to hide shaders or to expose them in a certain way. If you place a custom shader in one of your MI_CUSTOM_SHADER_PATH folders with no reference to it in mentalrayCustomNodeClass.mel then the shader will be visible by default. In the case of the lume shaders I edited mentalrayCustomNodeClass.mel to hide some of them (the ones that cause problems for maya due to attribute names containing spaces).
    If you want to permanently remove the lume shaders then you will need to remove the dll and mi files.

    But the production shaders are different because they are installed as part of maya and the standard mentalrayCustomNodeClass.mel contains code to hide them by default. If they are still showing up then you most likely have changed the mentalrayCustomNodeClass.mel in some way. If you have a syntax error in the file, for example, then it could be causing the lines that hide the mip shaders to be ignored.

    Comment by david — March 11, 2008 @ 10:22 pm

  17. Hey David! Thanks for making this post, im really interested in trying this, however. I have no idea how to use them or how to hook them up. Also, whenever I try to render, It just doesnt go through. When I downloaded the files from the link you gave - it never came with a .dll file....I was wondering if you have it, and if you do could you send it to me? Also, if you can kind of point me in the right direction on how to hook up some stuff that would be great. Im mostly interested in the Glare Glow effect and my goal is to get this effect : http://www.dmmultimedia.com/lights/test_lights_007d.jpg

    The effect on the left to be exact! Thanks in advance Sir.
    -Ryan

    Comment by rdeyoung — March 25, 2008 @ 4:25 pm

  18. ryan, I have emailed you an example. In case anyone else is interested I have added a link to the end of the post.

    Comment by david — March 25, 2008 @ 11:26 pm

  19. Hi David,

    We have been using the LUME shaders for some time now, but I need to use them on our Linux based render farm. do you have the linux versions of the shaders or can you point me towards where I can find them? At the moment I am most interested in getting the Linux version of the glare shader

    Andrew

    Comment by acirillo — April 15, 2008 @ 4:13 pm

  20. Sorry Andrew, I dont know where (or even if) you would find a linux version of Lume for maya. There are a few contacts you could try on the Lume website. Alternatively you could try JS_Glare at http://www.pixero.com/downloads_mr.html

    Comment by david — April 15, 2008 @ 11:19 pm

  21. Thanks David. I actually got on to mental images Berlin directly and they are sending the shader pack through to me (so the Linux versions do in fact exist). It helps that I am currently working in the office next door to mental images Melbourne so I was able to cut some corners.

    Comment by acirillo — April 16, 2008 @ 8:32 pm

  22. HElp me David wan kenobi... you're my only hope....

    I tried downloading 3dsMax three times but the electricity got down the three times and now I can't re-start the download... I've searched all over the google-net, but i cant find the lume.dll, I installed the JS_glare, but it's not what i was looking for... : (
    ...

    Comment by Zael — May 10, 2008 @ 10:55 am

  23. Que la fuerza esté con vosotros.

    Comment by david — May 11, 2008 @ 1:44 am

  24. Captain oh captain.... thou saveth my life...

    Public thanks for those who care for a complete stranger

    Comment by Zael — May 21, 2008 @ 11:59 am

  25. Hi David, terrific blog!

    ...

    Thanks in advance.

    Comment by Ale2x72 — May 23, 2008 @ 8:43 am

  26. Hey David,

    Zee couldn't be more right

    " Captain oh captain…. thou saveth my life…

    Public thanks for those who care for a complete stranger"

    Excellent blog, learned a lot here! ...

    Thanx in advance.

    Comment by Wilbert — June 10, 2008 @ 9:03 pm

  27. Hey David,

    I messed about with the glare shader and your example file. The glare works fine, and I even got it to work in my own scenes. But now there's a new problem. Al the mia materials are turned green in the viewport, and the preview in hypershade is gone to. It renders just fine, but it's kinda hard to work like this. You can see a screenshot here:

    http://www.flickr.com/photos/wilbertvandenbroek/2567039045/sizes/o/

    Is this a know problem?

    Thanx in advance.

    Comment by Wilbert — June 11, 2008 @ 12:48 am

  28. Hey David,

    Finally got everything working with the glare shader, and now I have two questions.
    1. How can you set labels in Maya so that the glare only affects certain objects?
    2. When I render an object with Sun&Sky system and glare, the physical sky gets blow out of proportion by the glare because glare sees it as very bright. Is there a way to solve this?

    Thanks in advance.

    Comment by Wilbert — June 11, 2008 @ 8:42 pm

  29. Hi Wilbert, glad its working now. Just so others know... if you copy-and-paste the text from this blog post into a mel script, you may end up with formatting characters that dont work in maya - it needs to be plain text only.

    To answer you questions Wilbert, I have to say I dont know for sure. 1. The lume glare docs say you can list objects to receive the glare, but I have not tried this in maya. 2. I would render this sort of thing in layers, rather than try to build the glare on top of a tone mapping situation.

    Comment by david — June 11, 2008 @ 11:35 pm

  30. Hi David,
    i pasted the Code you have here and first i couldnt find the Glare_LUME Material.
    After i deleted the code in my mentalrayCustomNodeClass.mel file and remove everything from lib, inclide and scripts folder maya try to look for the Lume Shaders and load again in the Mental Ray Shaders (Hypershade).
    My 3th Problem is. When i try to creat another MaYa MR Shader appears all the time RED and give my an error. Where RED? Example: If i creat a mia_material (standart in MaYa 2008) the name of the Shader = mia_material is red.
    At the moment i cant post a Pic or something, but if you drop my an eMail i can send you a pic or Video.
    If you can help me, i will appreciate.
    Thank you very much for your support and help.

    Cheers
    XBO

    Comment by 2xbo — July 11, 2008 @ 6:00 pm

  31. XBO, I have replied by email. Hopefully we can work out the problem.

    Comment by david — July 12, 2008 @ 12:09 am

  32. Hi David,

    Thanks for the scene file.

    I've installed the scripts and all looks ok but I can't render the scene in mentalray.

    I'm on a mac. Are there any known issues ona mac?

    Cheers,

    Steve

    Comment by sherridge101 — July 12, 2008 @ 7:15 pm

  33. Hi Steve, I don't know much about lume on a mac (or mac in general). But I do know that the lume.mll wil definately not work on a mac. I think that the equivalent mac file would have a .so extension, but I dont even know if they have ported it.

    Maybe a mac user can comment here and let us know how to get lume set up (if it is possible at all).

    Comment by david — July 12, 2008 @ 9:56 pm

  34. Hi David,

    I'm really interested in playing around with the Lume shaders in Maya 2008. I have a project that I'm working on right now that I would love to try them out on.
    ...
    Thanks in advance and great blog btw!

    Comment by ChewyPixels — July 18, 2008 @ 12:37 am

  35. Hi David,

    These are really interesting shaders...

    Many Thanks!!

    Comment by HeXa — July 19, 2008 @ 12:12 am

  36. HI david ,please help me!

    i 'd had according to your way to copy the commond to the mentalrayCustomNodeClass.mel
    but those problem shaders have not been hidden in hypershade, i've tried it for many times because of i don.t understand program.
    Can you email a mentalrayCustomNodeClass.mel of maya2009 to me,thanks!

    Comment by alucard_cg — January 24, 2009 @ 2:01 pm

  37. Check your inbox. Hopefully it will work for you.

    Comment by david — January 24, 2009 @ 2:22 pm

  38. hello i tried installing the shader for maya 2009.
    i saw the icons them in the hypershade but when i connected the lumeglare to the output of my camera,it rendered black. dont know if i have the right 4 files.
    here's mine: http://sor.typepad.com : lume-shader.rar (right click save as)
    could you plz tell me if it's the right files.
    thanks

    Comment by royter — April 21, 2009 @ 7:28 am

  39. royter, I the link is not correct in you previous comment. Even if it was, I don't have regular access to maya2009 so I'm not sure when I'd get a chance to check your files. And when I do, its on vista64.

    What is you OS? The version of the dll that I have here, was from the max2008 trial, and is 32bit. Remember that this will not work with maya 64bit.

    I'm also interested to know if there is a 64bit version of this shader available. I heard a while ago that there is a 64bit linux version, so it makes sense that there would be a win64 version too. I don't know how you would get hold of it though.

    Comment by david — April 21, 2009 @ 11:04 pm

  40. actually i my os is a winxp 32bit , Maya 2009.
    i guess i found these files from pixero's site.
    can you send me the correct files ( the one you'r using).
    i'll give it a try in Maya 2009 on my os.

    Comment by royter — April 25, 2009 @ 9:54 am

  41. I saw on cgtalk - http://forums.cgsociety.org/showpost.php?p=5829604&postcount=15 - that you got it working. We are on 2008 win64 at work, so I'm not using lume for anything right now. I'm still trying to find a 64bit version.

    The advice in the post after yours, by fabergambis, is correct I think. I remember having this problem too.

    Comment by david — April 25, 2009 @ 11:36 am

  42. actually it's working, but it's making MR unstable.
    that's why i asked for the files.
    thanks.

    Comment by royter — April 28, 2009 @ 4:40 am

  43. Hi David, I already wrote about my problem on CGTalk http://forums.cgsociety.org/showthread.php?f=7&t=757749 so I'm asking if you know if it's normal that lume tools doesn't show in swatches and viewport, or have I to add some code in mrCustomNodeClass or somewhere.
    Thanks in advance.
    Keep on with your terrific blog!

    Comment by fabergambis — May 1, 2009 @ 1:31 am

  44. fabergambis, I do not think they show in the swatches or the viewport. You might be able to get some of them to work in the swatch by editing mentalrayCustomNodeClass.mel.

    If you look in there you will see that the nodes are grouped in sections. Some sections return with a line that has "swatch/mentalRaySwatchGen". You could try adding that to the return statement that affects the lume shaders and see what happens.

    I cant test this at the moment, so please make sure you keep a backup copy of mentalrayCustomNodeClass.mel - and let us know what happens.

    Comment by david — May 1, 2009 @ 1:47 am

  45. They do so well! You need to add the names of the shaders to the first macrocategory between:

    return "rendernode/mentalray/material:connection/mentalray/shadow:/connection/mentalray/photon:shader/surface:swatch/mentalRaySwatchGen";

    and

    return "rendernode/mentalray/material:shader/surface:swatch/mentalRaySwatchGen";

    and so for the other categories.
    Thanks for your input.

    Comment by fabergambis — May 1, 2009 @ 3:35 am

  46. royter: I emailed you some files, but the email bounced. Email me if you still need them.

    Comment by david — May 3, 2009 @ 11:38 pm

  47. Hey David, can you send me lume.dll and all the files to rubent100@yahoo.com
    im interested in trying this out.

    Comment by Rubent100 — September 29, 2009 @ 5:38 am

  48. David, I'm having some issues installing and running these, would you mind emailing me?

    Many Thanks!

    Comment by Dangertaz — December 15, 2009 @ 12:43 pm

  49. hello i was wondering it anyone has got glair lume to work with maya2009sp1a on win64

    cheers

    matt

    Comment by matthew999 — March 23, 2010 @ 2:10 am

  50. I just tried the example scene (link in the article above, near the end) and could not get it to render with glare in x64 2009sp1a. A warning message in the output window says "Nothing to glare".
    The same scene renders correctly in 2010 x64. I guess thats not going to help you much, except give you a reason to upgrade maybe.

    Comment by david — March 26, 2010 @ 9:58 pm

  51. hi david, thanks for your responce, thats the error i was getting too, i might hold out for maya2011.

    cheers for such a brilliant blog :)

    matt

    Comment by matthew999 — April 2, 2010 @ 8:12 pm

  52. Hi,

    I know this is an old post but I have always been interested in trying out the Lume set and I recently made an attempt using the lume.dll from my Softimage 2012 x64 installation. I have a MI_CUSTOM_SHADER_PATH setup and have successfully installed many of the Pixero Mental Ray Shaders in my Maya 2012 x64 Win 7 setup. Unfortunately the installation didn't work - no errors in the script editor, it simply didn't load. I am thinking it might be the SI .dll - just wondering if you knew if a specific .dll needs to be used (3ds Max?) or if these will even load in the current version of Maya? Thanks!

    -nbreslow

    Comment by nbreslow — September 1, 2011 @ 2:11 am

  53. I cant give you any help with lume for maya 2012 since I have not tried it myself. The last version I had working was maya 2010. I may be able to get hold of the max 2012 dll. If I do I'll let you know.

    Comment by david — September 1, 2011 @ 11:46 pm

  54. Hi,

    Thanks so much for the reply, much appreciated. No worries - just curious, please don't go to any trouble on my account. I can always do the setup inside of Softimage as Lume is still integrated there.

    I am much more comfortable with render setup in Maya and really only do particle stuff in SI. I must admit, Soft really is growing on me though...

    Thanks!

    -nbreslow

    Comment by nbreslow — September 2, 2011 @ 12:36 am

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck