Animated Hair and Fur Map


The hair and fur modifier does not accept animated texture maps in the diffuse slot. In a pinch I created a script that has a ghetto workaround. It will load a static file into the modifier, and then send a single frame render off to backburner, then iterate through the sequences.

The variables that you'll need to edit are flagged up at the beginning. Currently this is set to operate on one selected object at a time.

If you are rendering this locally, you'll need to run backburner anyways. It comes with the max install, so you should be fine. You'll need to be running the server, monitor, and manager, for this to work.

If you are rendering on a network, make sure that the paths defined are all visible to all of the slave computers otherwise it will not work.

m = NetRender.GetManager()
m.connect #automatic ""

-- set this as the directory of your image maps
global theFilePath = "c:\project"
-- set this as your object with the hair and fur modifier on it
global theObject = selection
-- the output directory and filename that will be rendered MUST BE VISIBLE ON NETWORK IF NETWORK RENDERING!!
global theOutput = "c:\project\renders\thefilename_"

select theObject

-- set this to your frame range
for i=0 to 29 do

FrameMath = "000" + i as string
CurrentFrame = substring FrameMath (FrameMath.count-3) 4
ThisFramesMap = theFilePath + CurrentFrame as string + ".jpg"

$.modifiers[#Hair_and_Fur].maps[12] = Bitmaptexture fileName:ThisFramesMap
$.modifiers[#Hair_and_Fur].mapEnables[12] = on
$.modifiers[#Hair_and_Fur].maps[15] = Bitmaptexture fileName:ThisFramesMap
$.modifiers[#Hair_and_Fur].mapEnables[15] = on

rendSaveFile = true
rendOutputFilename = theOutput + CurrentFrame as string + ".tga"

job = m.newjob()
job.includeMaps = False = maxFileName as string + "_Frame_" + CurrentFrame as string + "_" + random 1000 9999 as string
job.fromframe = i
job.toframe = i

print CurrentFrame
print ThisFramesMap
print ("Frame#_" + CurrentFrame + " Submitted")