enjoyMentalRayStringOptions, a UI to easely use MR string options


#169

I hope so. If AD start to seriously listen users, it could be a radical change…


#170

I thought I read somewhere on your blog that using the user_ibl_env wasn’t a good idea? Seems like it takes much more work to setup than having the shading parameter within the render globals tab like the Native IBL environment…Of course you know much more about this than myself.


#171

The only major benefit of user_ibl_env is that it’s guaranteed not to lose energy.

But if the Environment Light (Native IBL) isn’t exposed and it’s not something you want to mess with exposing, then the user_ibl_env is available.


#172

ah…I see, thanks for the heads up! looks like I will do a bit more investigation with it. I do like how you have it exposed via nvidia forums UI script. Seems like common sense for them to add it by default, could you see a reason why they wouldn’t or are there any issues you’ve come across one might beware of? And just for my curiosity do you use any of these newer techniques in production?


#173

We use the Environment Lighting mode in production (Native IBL)

It’s easier to use (more native to Maya workflow) and doesn’t lose a lot of energy by default. You can solve the loss of energy by follow the steps on the blog (increased resolution and/or shader samples)


#174

Thanks David,

Heres hoping for a smoother 2014 with Mental Ray…


#175

Hiya,

First - great script! I have found it very useful, thanks so much for making it. I tried running it with Maya 2014 Win x64 and recieved an error in the script editor:

import enjoyMentalRayStringOptions
enjoyMentalRayStringOptions.Ui().create()
# Error: Item not found: false
# Traceback (most recent call last):
#   File "<maya console>", line 2, in 
#   File "D:\Maya\2014-x64\mentalray\scripts\enjoyMentalRayStringOptions.py", line 952, in create
#	 createdControl = self.createControl( stringOption, localParent )
#   File "D:\Maya\2014-x64\mentalray\scripts\enjoyMentalRayStringOptions.py", line 1079, in createControl
#	 cmds.optionMenuGrp( curOptionMenuGrp, edit=True, value=str(stringOption.value) )
# RuntimeError: Item not found: false # 

Not sure if the script is 2014 compatible yet but I saw you had updated it for MR 3.11 and gave it a shot. Thanks!

-Nick


#176

Hi!

This is a very strange problem you’ve got there. :frowning:

I didn’t have Maya 2014 yet so I can’t test, but I will try asap. :smiley:


#177

Thanks for looking into it! Appreciate it. Will check back in, let me know if you need me to do any testing.

-Nick


#178

hi nbreslow, until Narann gets a chance to do a proper update you can comment out the redundant stuff.

I was not too careful, mostly i wanted the IS stuff for object lights. here is what i had ended up with. Maybe Narann can tell you if i missed something


#179

I think AD added a string option with a default value I didn’t deal with (the “false” one).


#180

I’ve just launched my script with Maya 2014 and don’t have any problem. :frowning:

Can someone send me a scene reproducing the problem please? :slight_smile:


#181

when i tested it it, i just had the default scene open, no objects in the scene but the mr plugin was loaded and iirc i had the globals menu open


#182

Hi,

I think I pinpointed the problem. I am using the community UI posted on the Elemental Ray forum here and when I remove those scripts yours works as expected. Not sure if you can test against this but it would be great to have both these working together. Sorry I didn’t mention it earlier but I used your script and the previous 2013 community UI without issue. Hope that helps!

-Nick


#183

This really help me. I will test this. :slight_smile:


#184

I’ve pointed the problem: maya-render-settings-mental-ray UI create this value by default:

“environment lighting mode” “false”.

The problem is that “false” was not in the official documentation:

http://docs.autodesk.com/MENTALRAY/2014/ENU/mental-ray-help/files/manual/options.html#ibl

“environment lighting mode” “off”|“automatic”|“approximate”|“light”

I can create a special case to deal with that but I would like to know MR community UI guys opinion on this before do anything. :slight_smile:

I think “false” is a “valid value” for mental ray (it understand it as “off”) but IMHO, we should follow the documentation specs and use “off”.

For the others, add this two line (at 1078):

				# add elements
				for value in stringOption.valueList :
					
					cmds.menuItem( label=value )
				
+				if stringOption.name == "environment lighting mode" and stringOption.value == "false" :
+					stringOption.value = "off"
					
				# select element
				cmds.optionMenuGrp( curOptionMenuGrp, edit=True, value=str(stringOption.value) )

This seems to work with me. :buttrock:


#185

Hi Narann,

Works for me too! Script is running (haven’t tested anything really though, just got the window to pop up). Thanks for fixing it. I bet the MR community UI guys(depending on how busy they are) could probably give you some definitive answers - it has been out for a few weeks.

One small thing - You version numbers…in the script header the version is listed as .97, in the script header change list it shows it is up to .98 and the script window itself shows .96. Just wanted to let you know.

Will check back in and thank you so much for this script - it has proved very useful!

-Nick


#186

I’ve send a bug report here to ask them what to do:

https://code.google.com/p/maya-render-settings-mental-ray/issues/detail?id=16

The answer for now is “accepted”. I suppose they will change this from their side. :slight_smile:
I will keep an eye on commit list and see if they do the change.

I just realize yes. :slight_smile:
I will do both at the same time when I will do the fix. :slight_smile:

I’m happy it help you. :slight_smile:


#187

Great script! But I wish you hadn’t used tab characters. :frowning: Makes it difficult to edit.

Edit:

Well I found a quick way in notepad++ to replace all the tab characters with white spaces. Much easier to add to it now. :slight_smile: Really like your classes by the way, great approach. Very easy to extend the functionality.


#188

Hard problem I know. ^^’

That was the point when I created it: Easy to add stuff. :slight_smile: