cmds.render() ignoring Color Management settings

cmds.render() ignoring Color Management settings

Anonymous
Not applicable
1,317 Views
3 Replies
Message 1 of 4

cmds.render() ignoring Color Management settings

Anonymous
Not applicable

There are four ways to "render" a VP2.0 scene that I know of.

 

Maya Viewport, Playblast, Maya Render View, and cmds.render()

The first three render options adhere to the settings for color management ie: View Trasnform -> sRGB gamma.

BUT when using the command cmds.render() I get a non gamma corrected output image, no matter the settings inside the "render settings" or the "global settings". I have tried changing to all types of output formats (png,jpg,iff,jpg) have tried View Transform/Color Space Conversion, and just about every output transform option, with no change in the rendered file. This is a huge road block for my current project!

 

Please advise.

Software: Maya 2018.4

0 Likes
1,318 Views
3 Replies
Replies (3)
Message 2 of 4

tony.su
Autodesk Support
Autodesk Support

When you use cmds.render() , you use software renderer.

http://help.autodesk.com/view/MAYAUL/2018/ENU/?guid=__CommandsPython_index_html

The render command is used to start off a MayaSoftware rendering session of the currently active camera. 

It's not Hardware renderer.

 

You can try set renderer to hardware renderer, then set Color Management, use this python script.

import maya.mel as mel
mel.eval("renderIntoNewWindow render;")

You will get the result in Render View window.



Tony Su
Product Support
0 Likes
Message 3 of 4

Anonymous
Not applicable

what?!

 

First you said the render command is a software render. then in the next line you said use the render mel command....?

 

For anyone stumbling across this post I was able to achieve results by setting the gammaCorrection on the defaultRenderGlobals node to 2.2. I'm doing this attribute set on about 10 different items, as well as changing the projects /image/ directory. Overall I'm having to do a lot of workarounds to get a rendered image into a directory of my choosing. Pretty disappointed in the lacking forward facing render API.

0 Likes
Message 4 of 4

tony.su
Autodesk Support
Autodesk Support

VP2.0 is a kind of hardware renderer, it use GPU. And when you use cmds.render(),  you use MayaSoftware renderer. MayaSoftware renderer is a software renderer with a long long history, no major updates for more than a decade. So I don't suggest you use it.

So I suggest you use an other mel to render with renderer you select in render setting.

I don't understand the words you replied. I'm not sure about it. Why you insist use cmds.render() and MayaSoftware renderer?

 

1.jpg



Tony Su
Product Support
0 Likes