Notifications
Clear all
[Closed] Grabbing viewport sequence with multi-pass effects
Jul 31, 2019 5:50 pm
I know this might have been discussed before. But I’ve been unable to find a solution to this particular problem though – so here we go _smile:
It’s pretty easy to grab a viewport with multi-pass effects such as DOF or Motion Blur. But when I try to do it in a sequence, the frames are not drawn long enough for the viewport to be able to iterate over the image effects. Has anyone found a solution to this?
Here is a sample script that saves out a sequence (based on an example found in another thread here). On my 3ds Max 2020, I get not multi-pass effect when running this:
for i in 0 to 10 do
(
slidertime = i
maxOps.displayActiveCameraViewWithMultiPassEffect()
grab_viewpBMP = viewport.getViewportDib()
tempBMP = bitmap 1920 1080
pasteBitmap grab_viewpBMP tempBMP (box2 0 0 1920 1080) [0,0]
tempBMP.filename = ("MyViewportSnapshot_" + i as string +".jpg")
save tempBMP
close tempBMP
close grab_viewpBMP
tempBMP = undefined
grab_viewpBMP = undefined
freeSceneBitmaps()
)