3ds max 中已知的内存泄漏?
我在 3ds max 中设置了一个脚本来将一堆动画渲染到帧中。为此,我打开一个包含所有材质的文件,将动画(作为 bip)加载到图形上,然后进行渲染。
我们看到一个问题,脚本最终会失败,因为它无法打开下一个文件 - max 消耗了所有系统内存。当然,关闭 max 会释放内存,我们就可以继续执行脚本了。
我检查了 heapfree
变量,希望在我的脚本中看到内存泄漏,希望在我自己的(maxscript)代码中看到内存泄漏 - 但每次之后的可用空间量是相同的动画片。
那么,它一定是 3ds max 消耗了所有内存。 max 中的任何内容都不需要从动画到动画保存——有什么方法可以让 max 释放内存吗? (我尝试过resetMaxFile()并手动删除场景中的所有对象)。是否有任何已知的操作会导致 max 失控?
I've set up a script in 3ds max to render a bunch of animations into frames. To do this, I open up a file with all of the materials, load an animation (as a bip) onto the figure, then render.
We were seeing a problem where eventually the script would fail because it was unable to open the next file-- max had consumed all of the system memory. Closing max, of course, freed the memory, and we were able to continue with the script.
I checked out the heapfree
variable, hoping to see a memory leak within my script, hoping to see a memory leak within my own (maxscript) code-- but the amount of free space was the same after every animation.
Then, it must be 3ds max which is consuming all of that memory. Nothing in max need be saved from animation to animation-- is there some way to get max to free that memory? (I've tried resetMaxFile()
and manually deleting all of the objects in the scene). Is there any known sets of operations that cause max to grow out of control?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过在循环末尾添加以下内容:
gc()
它会进行垃圾收集并释放一些空间。
但我怀疑 BIP 部分漏水。
Have you tried to add this at the end of your loop:
gc()
it does a garbarge collect and frees up some space.
However I suspect the bip part to be leaky.
第一行问题需要是,您是否加载了任何本地创建的插件?他们会泄漏内存吗?
自版本 5 以来,我就没有使用过 3dsmax,但我不记得有任何特定的内存泄漏问题。然而,我似乎记得(根据其他人的经验)批处理操作需要时不时地重新启动MAX才能保持理智。例如,将批处理作业分解为较小的工作集并按顺序调用它们。然而,我们在 MAX5 中所做的事情并不需要这样的拼凑。当然是YMMV。 ;)
Autodesk 还拥有 Autodesk 开发者网络;如果您的公司认真对待 3DS 的使用,那么这是一个很好的资源,而且不需要太多现金。
The first line of questioning needs to be, do you have any locally-created plugins loaded? Could they be leaking memory?
I haven't worked with 3dsmax since version 5 but I don't remember any particular memory leaks that were problematic. However, I seem to recall (from others' experiences) that batch operations needed to restart MAX from time to time just to keep things sane. E.g. break up your batch job into smaller sets of work and call them sequentially. However, the stuff we were doing in MAX5 didn't need such kludges. YMMV of course. ;)
Autodesk has the Autodesk Developer Network, also; that's a great resource and not too much cash if your company is serious about its use of 3DS.