Bake a texture sequence in Maya 2018

Bake a texture sequence in Maya 2018

Anonymous
Not applicable
3,622 Views
1 Reply
Message 1 of 2

Bake a texture sequence in Maya 2018

Anonymous
Not applicable

Hi, I'm trying to bake a file texture that combines some a projection node with some other colour correction nodes into a new texture.  I know you can use convert to file texture in the hypershade to bake a single frame, but is there a way to bake a texture sequence from 1-100?

There are a couple of old script lying around that work with older versions of maya but is there anything available for maya 2018?

 

thanks

0 Likes
Accepted solutions (1)
3,623 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Figured it out!

Using  Kiel Knebba's python script and following this thread https://forums.autodesk.com/t5/maya-shading-lighting-and/baking-mental-ray-s-ao-as-texture-for-all-f... I was able to get the script working.

 

import maya.cmds as cmds
scriptName = 'bakeTextureSequence'
scriptsDir = cmds.internalVar(userScriptDir=True)
execfile(scriptsDir + scriptName + '.py')
bakeTextureSequence() 

Unfortunately, there was a transparency map in the node network, that was not being taken into account.

if you change line 530 in the bakeTextureSequence.py alpha from 0 to 1 you can use transparency maps.

              file = cmds.convertSolidTx(shader, eachGeo, antiAlias=0, bm=1, fts=1, sp=0, sh=0, alpha=1, doubleSided=0, componentRange=0, resolutionX=xRes, resolutionY=xRes, fileFormat=fileFormat, fileImageName=imageDir)

 

0 Likes