Paula,
I took a quick look at your code. A couple of ideas for you:
1) Why not use Point3f instead of Point3d? (that might cut the memory
usage in half for your points)
2) I'm not sure what you are doing with your texture loading. Why do
you use:
TextureLoader loader = new TextureLoader(filename, this);
ImageComponent2D image = loader.getScaledImage(1024, 1024);
Texture2D texture = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA,
image.getWidth(),image.getHeight());
texture.setImage(0, image);
texture.setEnable(true);
textureAppearance.setTexture(texture);
why not use:
TextureLoader loader = new TextureLoader(filename, this);
textureAppearance.setTexture(loader.getTexture());
Aren't you forcing each texture to be 1024x1024 (HUGE!!!)?
- John Wright
Starfire Research
Paula Keohan wrote:
>
> Could somebody please help me?
>
> I've been working on a project. The aim of this project is to build a
> 3D model of an object using images of slices of the object so that all the
> internal detail is captured. I've used an orange as the object. I've done
> the image processing part so now I have coordinates saved in files. I'm
> treating the different parts of the orange as different shapes. For example,
> a seed is one shape, the outer peel another, etc.
>
> I read in these coordinates from the files and create Shape3D objects
> with them. Trouble is, the way I have implemented the Java3d part takes
> loads of memory and I get out of memory exceptions. Would someone please
> have a look at my code and see how I can optimize it? Just to warn you, I
> only started learning Java about 3 months ago & Java3D about 1 1/2 months
> ago, so the code is probably really bad. Also, there's a method in there for
> rotating the points from consecutive images incase the slices moved a bit
> when the images were being taken. This method isn't working properly so you
> can ignore it.
>
> This is my final year project and is due in on Friday, so I would be
> really grateful for any help.
> Thanks,
> Paula.
>
> ------------------------------------------------------------------------
> Name: ThreeDFrame.java
> ThreeDFrame.java Type: JAVA File (application/x-unknown-content-type-javaFile)
> Encoding: quoted-printable
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".