Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Work In Progress (https://simplymaya.com/forum/forumdisplay.php?f=34)
-   -   Linear Lighting - gamma script (https://simplymaya.com/forum/showthread.php?t=34183)

Gen 24-06-2010 08:34 AM

Linear Lighting - gamma script
 
1 Attachment(s)
Hey guys, been working on something :D 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.

http://i300.photobucket.com/albums/n...M_gammaALL.jpg

Jay 24-06-2010 08:38 AM

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

murambi 24-06-2010 02:07 PM

umhhhh is all this to do with scripting

Perfecto 24-06-2010 02:07 PM

I'll have to try it out, I'm impressed. Especially since I know next to nothing about scripting.

G-Man 24-06-2010 03:23 PM

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

gster123 24-06-2010 03:33 PM

Nice one Genny.

I use scripting quite a bit for various bits and bobs.

stwert 24-06-2010 04:29 PM

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 :eek:;

G-Man 24-06-2010 08:07 PM

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

if triangulate=true
then quadrangulate
else ignore

g-man

Gen 25-06-2010 01:54 AM

Thanks for the support guys. :D
@ 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.

http://i300.photobucket.com/albums/n...n_viewPort.jpg


Organizing some thoughts..

http://i300.photobucket.com/albums/n...rough_proc.jpg

murambi 25-06-2010 04:54 PM

i honestly dont know whats going on but good luck on the car paint shader

Gen 25-06-2010 05:51 PM

Quote:

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 ><

murambi 25-06-2010 11:11 PM

just tested it and its a very handy great work on this cant wait for you to get to mi_car paint :ahemmmmm: ;)

Gen 26-06-2010 09:41 PM

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

Gen 01-07-2010 08:15 PM

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.

http://i300.photobucket.com/albums/n...mmaCorrect.gif

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


http://i300.photobucket.com/albums/n...T/sss_GC_1.jpg

daverave 01-07-2010 09:52 PM

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


All times are GMT. The time now is 11:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018