Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 24-06-2010, 09:34 AM   #1
Gen
Moderator
 
Gen's Avatar
 
Join Date: Dec 2006
Location: South FL
Posts: 3,457
Thanks: 13
Thanked 635 Times in 558 Posts
Default Linear Lighting - gamma script

Hey guys, been working on something and I thought I'd share!

I've searched the net but didn't find anything satisfactory soooo I made my own.

This is one of the scripts I made to deal with gamma issues with linear lighting workflow with Maya/Mental Ray. I'm still going to be tweaking but it works.

Description:

Plugs gamma nodes into all existing mia_material, x and passes materials in the scene while retaining colors and textures so you can build networks withough tediously type 0.455 :s . SSS and carpaint coming soon.

/crossesfingers

Also, because mia materials and with gamma nodes + textures can end up looking yucky in the viewport.
the script creates dummy or "MULE" shaders (in this case, blinns) to serve as realtime stand-ins for the mia material and assigns them to whatever objects using the mia mat but Mental Ray will only see the mia mats come render time. Oh yeah, it does some renaming to clean things up, like the generic pain in the arse names giving to shading groups that do not change even when you renamed the shader.

Directions:

Drop the script file into your local script folder like "C:\MyDocuments\maya\scripts". And when you want to execute it, just type "PMM_gammaALL;"into the commandline or script editor (might as well just drag drop that onto a shelf or whatever).

NOTE: I have personally made a Hypershade tab for Mental Ray materials only soooo I have a retreat from the blinns and lamberts.

Think I'm going to copy some of this into the readme file >.>

Anyways test away, C&C welcome.

>>>>------screenie-------<<<<<<<

Edit: didn't realize how wide that image was, yikes.

Attached Files
File Type: rar pmm_gammaall.rar (144.7 KB, 71 views)

Last edited by GecT : 24-06-2010 at 09:37 AM.
Gen is offline   Reply With Quote
Old 24-06-2010, 09:38 AM   #2
Jay
Senior Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,234
Thanks: 39
Thanked 425 Times in 381 Posts
Default

Gen thats great, you gal you!!

Yeah those shader can look a little muddy. If you can sort an sss version that would really float my boat

best
Jay
Jay is offline   Reply With Quote
Old 24-06-2010, 03:07 PM   #3
murambi
Head of 3d Admedia
 
murambi's Avatar
 
Join Date: May 2007
Location: nairobi , ken-ya
Posts: 1,327
Thanks: 21
Thanked 129 Times in 128 Posts
Default

umhhhh is all this to do with scripting
murambi is offline   Reply With Quote
Old 24-06-2010, 03:07 PM   #4
Perfecto
Registered User
 
Perfecto's Avatar
 
Join Date: Mar 2007
Location: TN (USA)
Posts: 1,882
Thanks: 8
Thanked 127 Times in 119 Posts
Default

I'll have to try it out, I'm impressed. Especially since I know next to nothing about scripting.
__________________
Don't be satisfied with what you can do but rather strive to do the things you can't do!
Exceed Expectations!
Perfecto is offline   Reply With Quote
Old 24-06-2010, 04:23 PM   #5
G-Man
Subscriber
 
G-Man's Avatar
 
Join Date: May 2004
Location: Bowling Green. Kentucky U.S.A.
Posts: 810
Thanks: 9
Thanked 27 Times in 23 Posts
Default

Sweet Genny.
Now....
can you write a freeware version of Jay's " Make it the best model ever with the most perfectest render, no tris/ N-gons and already well lit " Button....that will bring me coffee too?!


g-man
__________________
Follow My Business
On The Web!
Or
On Facebook!
G-Man is offline   Reply With Quote
Old 24-06-2010, 04:33 PM   #6
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

Nice one Genny.

I use scripting quite a bit for various bits and bobs.
__________________
"No pressure, no diamonds" Thomas Carlyle
gster123 is offline   Reply With Quote
Old 24-06-2010, 05:29 PM   #7
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,371
Thanks: 74
Thanked 709 Times in 642 Posts
Default

Cool, scripting is on my to-do list, as is learning about that linear workflow. Do you use python or MEL?

@g-man - I believe there's a MEL command something like:
makeItAwesome -ngons False -tris False -render ;
stwert is offline   Reply With Quote
Old 24-06-2010, 09:07 PM   #8
G-Man
Subscriber
 
G-Man's Avatar
 
Join Date: May 2004
Location: Bowling Green. Kentucky U.S.A.
Posts: 810
Thanks: 9
Thanked 27 Times in 23 Posts
Default

you mean -
if n-gon=true
then quadrangulate.selected

if triangulate=true
then quadrangulate
else ignore

g-man
__________________
Follow My Business
On The Web!
Or
On Facebook!
G-Man is offline   Reply With Quote
Old 25-06-2010, 02:54 AM   #9
Gen
Moderator
 
Gen's Avatar
 
Join Date: Dec 2006
Location: South FL
Posts: 3,457
Thanks: 13
Thanked 635 Times in 558 Posts
Default

Thanks for the support guys.
@ stwert - I use MEL.


I've been twiddling around with the SSS addition, the car paint is a whole other issue. The blinn seems good enough for a mule so I'm kinda going through the process of seeing what attributes need tweaking to mimic the SSS.




Organizing some thoughts..

Gen is offline   Reply With Quote
Old 25-06-2010, 05:54 PM   #10
murambi
Head of 3d Admedia
 
murambi's Avatar
 
Join Date: May 2007
Location: nairobi , ken-ya
Posts: 1,327
Thanks: 21
Thanked 129 Times in 128 Posts
Default

i honestly dont know whats going on but good luck on the car paint shader
murambi is offline   Reply With Quote
Old 25-06-2010, 06:51 PM   #11
Gen
Moderator
 
Gen's Avatar
 
Join Date: Dec 2006
Location: South FL
Posts: 3,457
Thanks: 13
Thanked 635 Times in 558 Posts
Default

Originally posted by murambi
i honestly dont know whats going on but good luck on the car paint shader
Lol Raphael, I guess I better explain.

I'm creating scripts to plug gamma correct nodes into mia_mats, SSS shaders etc so it'll ease the burden of dealing with washed out colors/textures when working with the mental ray physical sky for example. Oh just try the script already ><
Gen is offline   Reply With Quote
Old 26-06-2010, 12:11 AM   #12
murambi
Head of 3d Admedia
 
murambi's Avatar
 
Join Date: May 2007
Location: nairobi , ken-ya
Posts: 1,327
Thanks: 21
Thanked 129 Times in 128 Posts
Default

just tested it and its a very handy great work on this cant wait for you to get to mi_car paint :ahemmmmm:
murambi is offline   Reply With Quote
Old 26-06-2010, 10:41 PM   #13
Gen
Moderator
 
Gen's Avatar
 
Join Date: Dec 2006
Location: South FL
Posts: 3,457
Thanks: 13
Thanked 635 Times in 558 Posts
Default

Thank you ^^. But I'm smacking myself in the head at the moment, because I should have connected the mia attributes to the mule attributes instead, so they stay updated autmatically ><

Edit: spoke too soon, I knew I did it that way for a reason lol

Last edited by GecT : 26-06-2010 at 10:45 PM.
Gen is offline   Reply With Quote
Old 01-07-2010, 09:15 PM   #14
Gen
Moderator
 
Gen's Avatar
 
Join Date: Dec 2006
Location: South FL
Posts: 3,457
Thanks: 13
Thanked 635 Times in 558 Posts
Default

Alright should be done with adding the SSS support soon.

So far so good, no renaming of nodes as of yet but it works.

Before & After comparison.



And now finally some color/texture viewport feedback for SSS shaders yay. Oh yeah, now the mules update automatically.


Gen is offline   Reply With Quote
Old 01-07-2010, 10:52 PM   #15
daverave
The thin red line
 
daverave's Avatar
 
Join Date: Aug 2009
Location: England
Posts: 4,471
Thanks: 101
Thanked 952 Times in 879 Posts
Default

Hi Genny
Im not a great lighting guy {some thing I will need to address) but I can see great benifits in your script, I thanks you for sharring..............dave
__________________


Avatar Challenge Winner 2010
daverave is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.