[Closed] BFF out of Memory?
This is the first time I have tried to use this. A freind sucessfully exported a scene from Max 7 – I am trying to open in 6. He also had memory errors – but got it to work eventually.
BFF out of memory error?
Increase MaxScript memory to 100 mb. Doesn’t make a difference.
Different machine says “Error occurred during fileIn <File:…>”
It never prompts for reset.
?
Can you give me some stats of what is being processed?
I have tested successfully with millions of polygons per object (BFF should not care about the mesh size as it reads data sequentially from the files and does not store much data in memory).
How many scene objects are there? What kind of scene do you export? Are you trying to preserve PRS animation? (there ARE issues with animation, looking for free time to fix them, but they are not memory related).
Also, have you / your friend tried exporting single objects (EXPORT SELECTED) to see if there is a specific object that causes the problem?
Btw, you should be able to remark the fileIn entries in the – SCENE OBJECTS – section of the main BFF .ms file. Just add – in front of the line, for example
try(fileIn “Teapot10\Objects\Teapot01.ms”)catch(bff_progressLog “– Import of Object [Teapot01] FAILED! “)
make it
– try(fileIn “Teapot10\Objects\Teapot01.ms”)catch(bff_progressLog “– Import of Object [Teapot01] FAILED! “)
for all fileIn lines except for one and see if you can figure out which line is causing the problem.
Here is a rundown of how BFF is importing:
The main (root) file prepares the scene and evaluates all functions that might be necessary to build geometry and splines.
Then it evalautes all material trees which are embedded in the main file and collects them in an array.
Then it uses FileIn to load each object’s file which is stored in a subfolder with the same name as the object and another subfolder called Objects. This file contains just the object-specific data including opening the BFF file with the geometry definition and calling the function to build the geometry.
The geometry-building function reads one vertex at a time from the sequential BFF file and creates one vertex at a time in the new object, thus keeping the memory footprint at minimum. It does the same for every face. There should be no difference in MAXScript memory usage between a 10 faces object and 10 million faces object. (Of course, Max will use more memory for the final object, but that shouldn’t be the problem).
When the geometry is done, the General Object Properties and the Display Properties are assigned (this is about 50 lines of code), also the UserProps are assigned.
From your description it looks like the import is crashing while attempting to load and evaluate one of these small object files. It would be interesting to check how big the particular file is. Also, does it always crash on the same file or is it random?
ANY information you can provide would be useful.
Hi Meanadam,
You can increase the memory that MXS uses by opening the listener (F11) and the entering this:
heapsize+=1000000
This will add another 1MB to the standard (5.5mb).
J.
Hi – just noticed the replies. Thanks for the suggestions.
I figured out what was happening. There was a poorly imported site drawing from autocad in the model. If you ever saw one of those: each topo line is broken into about 300 segments. So BFF was trying to export 7500 lines.
Once I figured out how to turn that off – BFF worked great. Thanks Bobo.