Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 05-10-2007 , 06:06 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520

Install shader

Hi,

I've just tried to install the z depth shader for mental ray, for about an hour! And of course it doesn't work. I've spend quite some time messing with the "maya.rayrc" file following the step by step instructions.
Now is there any comprehensive way of installing additional shaders? Without writing pieces of "code" maybe?
I'm using maya 2008 on a mac and any help would be greatly appreciated.

thanks.


www.animateme.me.uk
# 2 06-10-2007 , 01:23 AM
mirek03's Avatar
Subscriber
Join Date: Feb 2006
Location: Australia
Posts: 2,752
this has had me completely confused for years too.., so I would love o know.., how does one use these shaders that can be downloaded from all corners of the web.., mostly they seem ascii files (something like that anyway)


take it easy and life will be easy
# 3 06-10-2007 , 01:46 PM
Registered User
Join Date: Aug 2006
Location: /dev/null
Posts: 891
I'm bored, so could you post a link to the instructions or something so I can take a look at them and see if I can get any info out of them?


C. P. U. Its not a big processor... Its a series of pipes!
# 4 06-10-2007 , 01:54 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
thanks, if you want to have a look, here's the package

Attached Files
File Type: zip zdepthdof_mayamac_v1.6.zip (162.5 KB, 249 views)

www.animateme.me.uk
# 5 06-10-2007 , 01:56 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
and this is my maya.rayrc file with the modifications I made, it looked nothing like the one in the example in the first place anyway, so I wasn't too surprised when it didn't work. I just wished there was a simple button for installing add ons.

Attached Files
File Type: zip maya.rayrc.zip (1.0 KB, 232 views)

www.animateme.me.uk
# 6 06-10-2007 , 02:07 PM
Registered User
Join Date: Aug 2006
Location: /dev/null
Posts: 891
Doesn't look that difficult. I think all you have to do is to add this line to the file they mentioned in the instructions:

registry "{USER}" value "[user_folder]/Library/Preferences/Alias/maya/6.0/mentalray" end registry

... under this one:

registry "{MAYABASE}" value "/Applications/Alias/maya6.0/Maya.app/Contents/mentalray" end registry


And add this one:

MI_CUSTOM_SHADER_PATH = [user_folder]/Library/Preferences/Alias/maya/6.0/mentalray/include

in the section where the lines being with 'MI_CUSTOM_SHADER_PATH'



Rember to replace the 'user_folder' bits in the lines with the path to your actual user folder. If Mac OS is similair to Linux (which I read it is), your home folder should be like this: /home/your user name

Hope this helps...


C. P. U. Its not a big processor... Its a series of pipes!
# 7 06-10-2007 , 02:16 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
thanks for your help, I've done all this, but the shader still doesn't show up in my mental ray nodes...
But as I said my maya.rayrc looked very different from the example one so in some cases I had no idea where to place stuff.

cheers


www.animateme.me.uk
# 8 06-10-2007 , 02:20 PM
Registered User
Join Date: Aug 2006
Location: /dev/null
Posts: 891
You said the maya.rayrc file was modified, so what does the original look like?

From what I've seen the maya rayrc is a registry, so the entries you put into it have to be in certain places and in a certain way. It may look different, but I think its probaly the same regardless...


C. P. U. Its not a big processor... Its a series of pipes!
# 9 06-10-2007 , 02:26 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
the original one looked just like the one you saw but without the lines I had to add for the z-depth shader.
I've attached the original one as well

Attached Files
File Type: zip maya.rayrc_original.zip (918 Bytes, 230 views)

www.animateme.me.uk
# 10 06-10-2007 , 02:47 PM
Registered User
Join Date: Aug 2006
Location: /dev/null
Posts: 891
OK, I've had another look and I have to admit I was wrong with the previous post. Sorry. The instructions that came with the shader are pretty confusing:

The section that deals with editing the the maya.rayrc file is badly written. It doesn't say what should be added, just 'make it look like this'.

And the maya.rayrc file is confusing too. I'm think that the lines with '#' are remarks. So what are the registry entries doing with '#' stuck in front of them?

Is the maya.rayrc file supposed to start only when there are custom modifications and addons?


C. P. U. Its not a big processor... Its a series of pipes!
# 11 06-10-2007 , 02:52 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
You know, I have noooo idea, while maya is very user friendly, having to install plugins and add ons that way is just hostile, I removed the '#' in front of the relevant entries as well, but it didn't change a thing.

thanks a lot for your support though, at least I'm not the only one finding that annoying. -If you happen to find a way, please let me know.

cheers


www.animateme.me.uk
# 12 06-10-2007 , 03:03 PM
Registered User
Join Date: Aug 2006
Location: /dev/null
Posts: 891
OK... I made a quick modification of the original file. You'll still have to modify the [user_folder] bits in the file to the path where your user folder is.

Hope this works, I've no idea since I can't test it.

Attached Files
File Type: zip maya.rayrc.zip (982 Bytes, 230 views)

C. P. U. Its not a big processor... Its a series of pipes!
# 13 06-10-2007 , 03:14 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
unfortunately it didn't work. I'll double check all the paths and everything when I've got time

thanks a lot


www.animateme.me.uk
# 14 06-10-2007 , 03:20 PM
Registered User
Join Date: Aug 2006
Location: /dev/null
Posts: 891
farbtopf > 'thanks a lot'

Your welcome. user added image

Let us know if you manage to get it working.


C. P. U. Its not a big processor... Its a series of pipes!
# 15 06-10-2007 , 03:27 PM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
Works now, thanks to you!
I think the problem is that unlike the readme says maya doesn't look in the library first. I disregarded the guys advice not to mess with the files in the actual maya package. And after I replaced the original maya.rayrc with yours and copied the assets in the actual maya folder it worked!

thanks again, so what was it you did to the maya.rayrc, I saw you added quite a lot of stuff, so I assume you know your stuff.

still adding shaders that way is a bit inconvenient especially for the not that experienced user. Maybe something they can think about for maya 2009user added image

cheers


www.animateme.me.uk
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads