{SOLVED} Issue converting .blend to j3o

Hi all,

For my project I’ve made a map for the game in sketchup, I’ve imported it into a .dae, loaded it into blender and saved it as a .blend file for jme3 to convert into a j3o. The problem is everytime I try to convert it to a j3o it says Exception “java heap space” and takes forever to convert. I let the converting process run for about 2 hours but it still hadn’t got anywhere. I tried increasing the -Xmx a couple of times but it still didn’t work.
The blend file is 64mb.

the output of the java heap space error:
java.lang.OutOfMemoryError: Java heap space
at com.jme3.scene.plugins.blender.file.BlenderInputStream.readStreamToCache(BlenderInputStream.java:130)
at com.jme3.scene.plugins.blender.file.BlenderInputStream.decompressFile(BlenderInputStream.java:147)
at com.jme3.scene.plugins.blender.file.BlenderInputStream.(BlenderInputStream.java:110)
at com.jme3.scene.plugins.blender.BlenderLoader.setup(BlenderLoader.java:186)
at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:59)
at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:52)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:374)
at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject.java:94)
at com.jme3.gde.core.assets.actions.ConvertModel$1.run(ConvertModel.java:60)
at java.lang.Thread.run(Thread.java:744)

Hope someone knows what the problem is.

What and here did you set the new -Xmx value?
I guess what you notice as “taking forever” is that the process already quitted due to the exception.
Big Models (and 64MiB of Blender is definately huge) take a decent amount of RAM.

Take a look at the wiki and/or change the value in etc/jmonkeyplatform.conf

I’ll take a look, i had previously set the xmx value in jmonkeyengine at project properties(BasicGame)

That is wrong since that effects your game and Not the sdk itself

It still gives a java heap space error :frowning: , I’m also not able to find anything about this in the wiki

Have you tried 2g for xmx? Or what exactly did you so?

I tried 1024m, 2048m, 2g and 4g in the .conf file

FIXED IT:
after fooling around some more with the .conf file, I saw I did not save when I edited the file. 2g as xmx value worked for me. Thanks for the help!

1 Like

Btw: Searching the Wiki for Heap immediately points to the right wiki entry.
I am linking it here for others which also stumbled across that problem:

https://jmonkeyengine.github.io/wiki/sdk/increasing_heap_memory.html