An automated process of Maya batch render with Redshift

Figure 1: Image from https://www.fxguide.com/fxfeatured/the-art-of-digital-faces-at-ict-from-digital-emily-to-digital-ira/?utm_source=twitterfeed&utm_medium=twitter
Figure 2: Building a perfect accurate lighting condition in Maya to validate the software process. Red dots represent spotlights in the light cage and green ones are cameras in real position.
Figure 3: In reality, we get specular image by subtracting diffuse information from a normal lighting result. Diffuse lighting is taken by a cross-polarization way.
Figure 4: Specular result from gradient lighting under x+, x-, y+, y-, z+, z- direction.
Figure 5: World space normal rebuilt from 6 gradient light illumination. (Courtesy of SIGGRAPH 2009 Course Notes: The Digital Emily Project)
  1. Redshift renderer can only set one camera as renderable in Render Setting.
FIgure 6: Using the render layer override
for c in cams:
c.rnd.set(0)
targetCam.rnd.set(1)
Figure 7: we need to override ‘File name prefix’ and ‘Renderable Camera’ per layer to automate the process.
pm.PyNode("defaultRenderGlobals").imageFilePrefix.set(path)

pm.editRenderLayerAdjustment("defaultRenderGlobals.imageFilePrefix", layer = layerName)

pm.editRenderLayerAdjustment(q=1,alg=1)
renderlayerNode = pm.PyNode(renderLayerName)
renderLayerID = renderlayerNode.rlid.get()
pm.PyNode(‘renderLayerManager.crl’).set(renderLayerID)
‘sets -e -forceElement yourMaterialSG;’
cmd = ‘sets -e -forceElement initialShadingGroup;’
pm.mel.eval(cmd)
#end of walk around
cmd = ‘sets -e -forceElement {};’.format(mat)
Figure 8: example of layers of material/Gradient lighting permutation.
Figure 9: Result of batch rendering.
Figure 10: World space normal reconstructed by images we batch rendered.
Figure 11: A final result: a tangent space normal from reconstructed mesh and world space normal maps.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Death of 3rd-Party Cookies? What Google Chrome’s Tracking Protection Will Look Like

Best Thing To Do When You Are Quarantined At Home

PTCL An Experience.

Replacing the Battery on a 2005 VW New Beetle Convertible

CCTV captures ærmed rõbber dancing excitedly during robbery operation (Video)

CCTV captures ærmed rõbber dancing excitedly during robbery operation (Video)

Gallery Guardian app polices the photos on your child’s smartphone

Samsung AR, fun concept or road to the future

Front Light vs. Back Light: Why Front Lights Are Eye-friendly

Front Light vs. Back Light: Why Front Lights Are Eye-friendly

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
arnold paul

arnold paul

More from Medium

CRISPR — General Info

In Support of grid-template-areas:

Deployment and maintainability

Dlithe 3rd week Experience