PDF/U3D export memory problem

jReality backends
Post Reply
STRESS
Posts: 141
Joined: Mon 19. Jan 2009, 12:10

PDF/U3D export memory problem

Post by STRESS » Thu 19. Feb 2009, 19:03

First off the PDF/U3D export is awesome. It is far better than I thought however I've got quite some issues with it when trying to export larger scenes I've got a 0.5 million polygon scene and when I try using the PDFExport I run out of memory in
de.jreality.writer.u3d.WriterU3D.writeDataBlock(WriterU3D.java:1307) even when using -Xmx1536m (1.5gig of heap). Unfortunately I can't increase the heap size too much more since I am on a 32bit machine and JVM is pretty crap it needs continous memory area which there is hardly more than 1.5-1.7GByte available.

Maybe U3D is not made to handle scene of that size but I rather doubt that's true.

So is there any easy way to decrease the memory footprint?

sechel
Posts: 69
Joined: Tue 2. Oct 2007, 09:20

Memory Usage

Post by sechel » Tue 24. Feb 2009, 15:31

Hi STRESS,
it is possible to use vertex data compression in U3D. But it is extremely tedious to implement. It is mandatory for point and line sets but not for face sets. I believe the designers did not want to scare away customers by forcing them to implement compression even for the very basic things.
sechel

STRESS
Posts: 141
Joined: Mon 19. Jan 2009, 12:10

Re: Memory Usage

Post by STRESS » Thu 26. Feb 2009, 11:14

sechel wrote:Hi STRESS,
it is possible to use vertex data compression in U3D. But it is extremely
Hi Sechel, the problem is not really in U3D (even though the PDF grows as well) it's how the U3D is generated. That part runs out of JVM memory. A small glance on the code it looks to me that every geometry node is put together into a large junk of temporary nio buffers and then written out in one final go. Correct me if I am wrong. This will obviously run into problems since depending what backend you are using you might end up having that geometry three times in memory for a short time period that's obviously too much.

sechel
Posts: 69
Joined: Tue 2. Oct 2007, 09:20

Out Of Memory

Post by sechel » Fri 27. Feb 2009, 07:18

Hi STRESS,
I have tried to improve the memory behavior of the U3D writing code. This version writes considerably slower than the old one but give it a try and let me know if it works. Then we can think of a better fix.
Sechel

STRESS
Posts: 141
Joined: Mon 19. Jan 2009, 12:10

Re: Out Of Memory

Post by STRESS » Fri 27. Feb 2009, 12:01

sechel wrote:Hi STRESS,
I have tried to improve the memory behavior of the U3D writing code. This version writes considerably slower than the old one but give it a try and let me know if it works. Then we can think of a better fix.
Sechel
Well the good news, it doesn't run out of memory anymore. 8)
The bad news the AcroRead I am runing on Windows (v 8.1.3) comes up with a 3D parse error now it used to work before. :cry:

Post Reply