However, it keeps crashing the game with a “out of memory java heap space” error, even though less than 1GB of RAM is used, and my system has over 8GB of RAM remaining to be used.
Removing the loading of the FBX model solves the crash, but I would like to load the FBX without the crash.
Theres a difference between java heap which is used while loading models and direct memory which is used for textures and models when they are loaded (and uploaded to the GPU).
Blender won’t import it either. Perhaps the model is corrupt.
Also, here is the error:
java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:152)
at com.jme3.scene.plugins.fbx.file.FbxElement.<init>(FbxElement.java:61)
at com.jme3.scene.plugins.fbx.file.FbxReader.readFBXElement(FbxReader.java:86)
at com.jme3.scene.plugins.fbx.file.FbxReader.readFBXElement(FbxReader.java:96)
at com.jme3.scene.plugins.fbx.file.FbxReader.readFBX(FbxReader.java:71)
at com.jme3.scene.plugins.fbx.SceneLoader.loadScene(SceneLoader.java:168)
at com.jme3.scene.plugins.fbx.SceneLoader.load(SceneLoader.java:149)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:262)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:376)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:419)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:423)
at mygame.Bird.<init>(Bird.java:25)
at mygame.Chunk.<init>(Chunk.java:87)
at mygame.Chunk.loadChunk(Chunk.java:133)
at mygame.Main.simpleUpdate(Main.java:638)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:246)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:152)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:192)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:233)
at java.lang.Thread.run(Thread.java:745)
As I see (in your previous post) you are using some product of auto desk for modeling.
I have some little experience with 3ds max .
and while exporting to FBX in 3ds max there are lots of options you can change .
one of them is type of fbx. I also do not know what are differences just know that blender can import FBX with binary format.
The other very important thing is material type.
in 3ds max you can use Standard Mat or Vray Mat or …
if it is non Standard then blender simply can not import that model.(At least I am sure about Vray Mat)
Edit : also there is this good tutorial . hope it helps :