Folks,
I am running into a bizarre issue while rendering. I have a scene that imports geometry files (obj) at batch render time on per frame basis. (I did try using expressions first but they only work interactively and not in batch render)
I have a pre render frame MEL script which imports file at every frame which checks and deletes previous geomtry left by previous imports.
Similarly, I have a post render frame MEL script which deletes the imported content after rendering.
All this works fine for Maya Software renderer, however it does not work with Mental Ray renderer.
I found out that I needed to uncheck "Optimize Non-Animated Display Visibility" option under Metal Ray>Translation>Performance to get this to work a bit. Now mental ray gets new imported geometry every frame and renders it, however it does not delete the previous frame geometry. So I have renderings which accumulate previous frame objects.
In render logs I see that I do the clean up properly, but mental ray just renders everything accumulated till that frame.
Can anyone of you provide an insight on what needs to done to get this working correctly.
Thanks
--Amit