CGTalk > Software > Autodesk Maya > Maya Rendering
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 11-08-2011, 05:16 PM   #1
Mini-Zun
New Member
Hans Baldzuhn
France
 
Join Date: May 2008
Posts: 22
Smile MentalRay 3.9 - native UI integration

Last Update : v1.2.2
MentalRay 3.9 UI native integration v 1.2.2

Hi all !

We recently upgraded to 2012 at work (working on 2009 since then)
and with all the new features coming with mentalRay 3.9 that where not exposed in the UI, I choose to blow my brain out and add all new (and old) non exposed string options into the Render Settings window !

I know there are already script that enable string options (like Dorian's one), but my goal was to do it exactly the same way as if autodesk had done it itself. Nothing to source, nothing to do, it's here, just like if autodesk had done his job !
And I tried to respect syntax, naming convention and every thing else.

All new string options are added the same way they were before (declared in 3 global string array in mentalRayUi.mel) so they are created with the node miDefaultOption.
New tabs, new layout, new controls, and everything I changed is done the way it was before.

I really felt like an archaeologist while trying to understand all mel file, looking in the folder /script/others for every procedure call and global variable usage to find where everything was natively created.

Here is some UI behavior that was kept (even if everything should have been kept, I may have forgotten a few things):
- Modifying the UI updates the string (of course ...) and modifying the string by hand also updates the UI.
- When a function disable (or enable) another (as referred in mentalRay documentation), controls are greyed as well to match what the render setting is already doing for other controls.
- As every added thing is disabled by default, their UI is also folded by default to ensure it's not an invasive modification.
- All string options are now saved with the render setting preset. (All previously used string option (e.g. for IP) were not saved with preset !).
- All controls are annoted (using uiRes) with information taken from mentalRay documentation.

Here is the list of all modification I made :
- adding Key differentials under Features Tab (even if I don't now what it is ...).
- adding Unified Sampling under Quality Tab.
- adding Progressive rendering under Quality Tab.
- adding Native IBL under Indirect Lighting Tab.
- adding FinalGather Legacy under Indirect Lighting Tab.
- adding FinalGather passes Legacy under Indirect Lighting Tab.
- modifying FinalGather mode under Indirect Lighting Tab (the control now match the one in miDefaultOptions).
- adding Iray Tab.

AND the last but not the least !

- All tab are now resizable ! When you stretch the render setting horizontally, the scroll layout stretch as well (I really wonder why is was not created like that by default ... It was driving me crazy).

And here are screenshots from the modified render setting window ! (carefully hilighted in green):









Note that everything was checked multiple time. I didn't found any error or non working control.
It even work if opening a old scene from 2009.
But I would be really surprised if no one encounter any error ><.

As everything is working now, I choose to share it. And I need advices on a few things :
- I tried to place all new control on the place that seems the best for me, but I may be mistaking. So if you think something should be somewhere else, just tell me !
- In the same way, I tried to "auto Grey" controls that are not compatible or mandatory, but I may have forgotten some or maybe some control shouldn't be greyed.
- I didn't do anything for importons, irradiance particle, photon and all those strange indirect option that I never ever used in vfx production. But if you have any request I would be glad to add it if possible.

Current known limitation :
(Note that this limitations was already here with how autodesk handles string options.)
- you cannot override any string options because it's a multi-attribute. And I don't know how you can override a standar control (currently, all options you can override are actually attributeControl, which is a direct connection to an existing real attribute.)

Thanks to all people who participate in Dorian's topic http://forums.cgsociety.org/showthr...19&page=1&pp=15 for all the information I found here while I was trying to find how each option is working. I spent also a lot of time on the mentalImage forum.
(note that I didn't took any line of any script I found anywhere. I didn't even tested (nor downloaded) any script to manage string options.)

If found yesterday that Bitter was already working on a native integration, It don't want to steal anything to anyone. The modifications I made was firstly for me and if anyone can benefit from it I would be glad. Moreover, if someone can avoid strong headache thanks to the headache I got working on it, it's a pleasure !

I also want to add a few things about things I read :
- Final gather passes do work ! But only in batch render mode ... and it's enabled by default (even without any modification to anything). I noticed it because our render manager is using imf_disp to display rendering image on the render farm, and here you can see the 3 defaults passes of finalgather. Even without looking at the image with imf_disp, you can see it in the render log.
- There is a way to enable Iray when you don't have administration privilege. What I did : I copied the folder Maya2012 located in C:/programe files/Autodesk and placed it in my local folder (in where I can do whatever I want). Then I added the necessary .dll to enable Iray, and from now I'm starting maya from the local folder. Works perfectly !
- I remember someone talking about export options that had to be checked/unchecked to be able to render with Iray, but after some tests, it appears that it didn't change anything. For me Iray works without any change to the default export options. I would like to know if it works for every one.

To use those modified mel file, the simpler way is to put all of them in your folder maya/2012-x64/prefs/scripts. They will override standard mel and you don't change anything to your maya installation. Just delete the files and maya is back to normal (note that a scene saved will keep all string options (e.i., if you enable Iray, save the scene, delete all modified mel and reopen the scene, iray will still be enable. All string options are saved within the file. So you will have to disable it by hand).
I'm used to place all "override" mel in this script and all custom script in maya/2012-x64/scripts, so I don't mix them as they are not the same thing at all. But you could do whatever you prefer.

There it is ! Hope you like it !

The link to the creativecrash page :
MentalRay 3.9 UI native integration v 1.1.1

For now I can't upload the file on cgtalk, as this is my first post ><

Hans

PS : I'm using maya 2012, but since it's only a mel modificaiton, it should work for any version. The script do not remove any mandatory string option so it can't make your render setting disapear. And like it is explained in mentalRay documentation : "Values of a wrong type are ignored. Also, misspelled or unknown options are silently ignored by mental ray."
BUT ! Be aware thare from now if you use the mel file provided, ALL string options added are now MANDATORY ! If another script delete any string option, you will not be able to open the render setting anymore ! So if you need to use another script to do something that my modificaiton is not doing, do it carefully !

Last edited by Mini-Zun : 04-24-2012 at 10:09 AM. Reason: update Link
 
Old 11-10-2011, 08:54 AM   #2
Mini-Zun
New Member
Hans Baldzuhn
France
 
Join Date: May 2008
Posts: 22
Little Update : v1.0.1
- added Iray rendering mode under Iray Tab.
- added Firefly filter under Iray Tab.
- added Hair caps option under Options Tab.
- added Hair acceleration under Options Tab.
- added Rasterize hair disposable under Option Tab.

Basically I searched in the release note every thing that was talking about string options. And I added the firefly filter after Lumis asked for on creative crash.

But I found something strange in the release note, they are talking about "finalgather precomputation legacy" and not "finalgather legacy" (which was the one I added thanks to Bitter's explanations). So I tried both and only "finalgather legacy" has an effect (as expected). "finalgather precomputaiton legacy" don't change anything. Is that a mistake in the release note or does the string option had an update ?

I have another question : for final gather mode, the mental Ray documentation is talking about 4 mode :
"3.4"
"strict 3.4"
"automatic"
"multiframe"
"force"

But the attribute in miDefaultOptions is calling them :
Original
Compatible
Automatic
Multiframe
Force

and I found that the order is not the same.
mayatomr translate Original to "strict 3.4" and if Compatible is selected, the string option "finalgather mode" is not exported. And I suppose that it's the "3.4" mode. But should'nt it being called "orignal" as it's the one without modification ?
The simplest way to correct that would be to change the names of the menuGrp items in the render setting to match the ones in the mentalRay documentation.
Does it make sense to you ?
 
Old 11-11-2011, 10:43 PM   #3
Hans-CC
VisualFX Artist
 
Hans-CC's Avatar
portfolio
Hans Castro
San Jose, Costa Rica
 
Join Date: Jun 2004
Posts: 135
awesome !!!

Thanks
This will be really usefull.


H.
 
Old 11-12-2011, 01:54 AM   #4
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,415
So much of your time must have been invested in this. You've done an amazing job of integrating this stuff.
Part of me (the cynical part I guess) smiled when I read:
Quote:
Originally Posted by Mini-Zun
...my goal was to do it exactly the same way as if autodesk had done it itself.
And I thought... would they have done it as well as you? Maybe. Someday. Who knows?

So thanks for sharing the fruits of your labor. I'd been using Dorian's script, but having this stuff in renderSettings will make a big difference.

cheers
David
__________________
http://www.djx.com.au
 
Old 11-12-2011, 06:58 AM   #5
InfernalDarkness
Madness. Madness, I say!
 
InfernalDarkness's Avatar
portfolio
Sho Pi
CG arch/viz
Seattle, USA
 
Join Date: May 2008
Posts: 5,591
Looks very nice! Gonna give it a shot tonight.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Old 11-12-2011, 08:29 AM   #6
SebKaine
Expert
 
SebKaine's Avatar
portfolio
Emmanuel Mouillet
Fx Artist
Freelance
Paris, FR
 
Join Date: Dec 2005
Posts: 996
Thanks for your hard work ! This looks greats !

Quote:
...my goal was to do it exactly the same way as if autodesk had done it itself

I'am also a big fan of this one !
__________________
emfx.fr
 
Old 11-12-2011, 08:59 AM   #7
chuckie7413
"be distinct"
 
chuckie7413's Avatar
Richard Levene
USA
 
Join Date: Mar 2006
Posts: 337
This is briiliant!

Thanks so much for sharing.

Best,

Richard
__________________
beDistinct RecomFarmhouse IMDB LinkedIN
 
Old 11-12-2011, 12:23 PM   #8
Ruis
New Member
portfolio
Rui Santos
Porto,
 
Join Date: Aug 2011
Posts: 16
Thank you so much for your work
 
Old 11-12-2011, 06:35 PM   #9
Redsand1080
43% Burnt
 
Redsand1080's Avatar
portfolio
Justin Jenkins
Senior Technical Artist
Camber Corporation
USA
 
Join Date: Jul 2003
Posts: 803
Send a message via AIM to Redsand1080
Man, that looks great. Awesome job! Thanks for posting it up!

-Justin
__________________
If animation is the illusion of life, then life is the illusion of reality.


"On ne sort pas DU REVE."

 
Old 11-13-2011, 12:30 AM   #10
m0z
SOuP cook
 
m0z's Avatar
portfolio
Mathias Markovits
CG Allrounder
ViennaPaint
Austria
 
Join Date: Apr 2010
Posts: 413
great, thanks a ton
__________________
mathiasmarkovits[dot]com
 
Old 11-13-2011, 07:39 PM   #11
MarkoShovljanski
New Member
portfolio
Marko Shovljanski
me
Novi Sad, Serbia
 
Join Date: Oct 2010
Posts: 10
// Error: Cannot find procedure "mentalRayOptionsCheckIray". //


And I don't have an iray tab.

help?! maya 2012 sap, windows 7
__________________
http://markoshovljanski.com/
 
Old 11-14-2011, 08:38 AM   #12
Mini-Zun
New Member
Hans Baldzuhn
France
 
Join Date: May 2008
Posts: 22
Thanks everyone !
In fact it was quite fun to do

here are the new features in 1.0.1 :
- added Iray rendering mode under Iray Tab.
- added Firefly filter under Iray Tab.
- added Hair caps option under Options Tab.
- added Hair acceleration under Options Tab.
- added Rasterize hair disposable under Option Tab.

@MarkoShovljanski:
I don't understand why you have this error. I just checked with brand new maya prefs with the mel files in /2012-x64/prefs/scripts/ and everything work well.

Before copying the files, did you have any modification to the render settings ? Are you sure you have all files ? (19 in total).

edit : I found a mistake in one of the mel files. There are unescessary call to mentalRayOptionsCheckIray procedure inside createMentalRayOptionsTab.mel. But this shouldn't prevent the creation of the iray tab.
It's modified and updated. Tell me if it's working now

Last edited by Mini-Zun : 11-14-2011 at 08:46 AM.
 
Old 11-14-2011, 04:48 PM   #13
13xbmspec
Frequenter
 
13xbmspec's Avatar
Shane Proctor
Studio Artist
Full Sail University
Winter Park, US
 
Join Date: Mar 2005
Posts: 137
Is there something I'm doing wrong with Progressive Rendering?

Here's the scene, simple MIA_X_Passes (Default) on a sphere with a IBL for reflections and lighting.

I'll render the scene with Progressive turned on (Using IPR in the Render View) and it'll render successfully. But, as soon as I make a change (in this instance, color) It crashes.

Am I just using it incorrectly?
 
Old 11-14-2011, 05:12 PM   #14
chuckie7413
"be distinct"
 
chuckie7413's Avatar
Richard Levene
USA
 
Join Date: Mar 2006
Posts: 337
Yeah unfortunately Autodesk changed something and progressive no longer works with IBL.

It was working back in 2010 but they changed something and always crashes.

Very very annoying.

Would like to know if anyone has it working with IPR though. I tried changing some render option settigns, similar to how people set up their scene to render with Iray but it seems that yes you can get progressive to render with IPR but for me it was not actually progressing. It would do the first substep and then just not refine.

Rich
__________________
beDistinct RecomFarmhouse IMDB LinkedIN
 
Old 11-14-2011, 05:36 PM   #15
RagingBull
Bellend ^_^
 
RagingBull's Avatar
Robot
Matchmoving
London, United Kingdom
 
Join Date: Mar 2004
Posts: 592
Many thanks for posting this, although I'm primarily VR now this still looks incredibly useful when I do want to make use of MR, and yep I laughed as well with the AD jib
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:21 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.