www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: whis on March 01, 2007, 09:45:57 pm

Title: OutOfMemoryError
Post by: whis on March 01, 2007, 09:45:57 pm
Hello,

I have a problem when i start my app. i have the following error message:

(http://mchicault.free.fr/question.bmp)

Here, i want to load 8 textures (jpg files).
I d'ont understand the error message.

PS: for each texture
resolution: 2048x2048
weight : 1 mo

Thanks
Title: Re: OutOfMemoryError
Post by: Melssj5 on March 01, 2007, 10:06:32 pm
Java apps has by default 64 MB to run, sometimes a java app needs to store on memory more than that value. In this case you loaded toooooooooooooooooooooooooooo huge textures. The normal resolutions are 256x256 not 2048x2048, try changing the size of your textures. They shouldnt really affect the final result.

Do you really need to have a huge texture or it may be better to small one that is fit to the object face.
Title: Re: OutOfMemoryError
Post by: whis on March 01, 2007, 10:31:45 pm
Thanks for the reply

Yes, I need huge textures for my island:

my island is divide in 8 parts:

(http://mchicault.free.fr/question1.JPG)

each part is a jpg file of 2048x2048 because  i want a good level of details like in the following screen

(http://mchicault.free.fr/question2.jpg)

How can I have this level of details in JPCT without huge textures?

thanks
Title: Re: OutOfMemoryError
Post by: EgonOlsen on March 01, 2007, 11:41:19 pm
Just start the app with -Xmx256m (or whatever value you prefer) to increase the maximum heap size.
Title: Re: OutOfMemoryError
Post by: cyberkilla on March 02, 2007, 01:41:04 am
That is pretty damned good!:)