DaveWortley
01-12-2009, 07:19 PM
For those who use Strip Rendering there's a bug in 3dsmax 9 that often causes painful headaches. If the filename has a integer on the end sometimes backburner will fail to stitch the pass together. And after a 13hour render near deadline that can be quite painful. There's a script in photoshop online somewhere (i've lost it) that can help you stitch the renders back together (requiring figuring out the maths, more on this later)
We had one such emergency today and I managed to quickly bodge something together in maxscript to save the day.
Made a 1x1 Plane the size of 1 strip. Used Array to instance that down for all the strips, then used this script to put the strip maps on the strips.
files = getFiles "C:\\test\*.tga"
i = 1
for f in files do (
newmat = Standardmaterial()
newmat.selfillumination = 100
newmat.diffusemap = Bitmaptexture fileName:f
newmat.diffusemap.coords.blur = 0.01
$selection[i].material = newmat
i = i+1
)
Then rendered this and got something which whilst wasn't pixel perfect, surficed and saved the day!
So I want to improve this script now for the next emergency. So problems...
1. Strip height and overlay...
Even though we specify with no overlay backburner renders strips bigger than necessary. For example. My Render 10000x8994
1st strip is 60 high
the other 199 are 68 pixels.
So for an image 8994, divided by 200 is almost 45, so I used that as my incremental and bodged the first overlap. But I wondering if anyone knows how backburner divides it all up so I can automate replicating the strip layout.
2. Render exact size?
So how Can I select a bunch of objects and Render just those objects. Like Crop Selected Render, but then define the final width/height I want. Is there an easy way to align a Orthographic Camera Frustrum to a plane?
Or does anyone have any other suggestions of how one could replicate the stitching task?
Regards
Dave
We had one such emergency today and I managed to quickly bodge something together in maxscript to save the day.
Made a 1x1 Plane the size of 1 strip. Used Array to instance that down for all the strips, then used this script to put the strip maps on the strips.
files = getFiles "C:\\test\*.tga"
i = 1
for f in files do (
newmat = Standardmaterial()
newmat.selfillumination = 100
newmat.diffusemap = Bitmaptexture fileName:f
newmat.diffusemap.coords.blur = 0.01
$selection[i].material = newmat
i = i+1
)
Then rendered this and got something which whilst wasn't pixel perfect, surficed and saved the day!
So I want to improve this script now for the next emergency. So problems...
1. Strip height and overlay...
Even though we specify with no overlay backburner renders strips bigger than necessary. For example. My Render 10000x8994
1st strip is 60 high
the other 199 are 68 pixels.
So for an image 8994, divided by 200 is almost 45, so I used that as my incremental and bodged the first overlap. But I wondering if anyone knows how backburner divides it all up so I can automate replicating the strip layout.
2. Render exact size?
So how Can I select a bunch of objects and Render just those objects. Like Crop Selected Render, but then define the final width/height I want. Is there an easy way to align a Orthographic Camera Frustrum to a plane?
Or does anyone have any other suggestions of how one could replicate the stitching task?
Regards
Dave
