You definitely have a problem with your texture-colordepth. In my opinion
thats not a problem of J3D but of your graphics card settings.
On Tue, 17 Feb 2004 13:18:51 +0100, Chris Ender <[EMAIL PROTECTED]>
wrote:
Hi everyone!
Thanks for the help! I tried everything you wrote, but it does not help.
Sorry that i am bothering with the same problem again.
I did a screenshot and put it with the texure on my website
http://www-public.tu-bs.de:8080/~y0002384/data/
Ok, then I ran the example program "TextureTest.java" coming with the
distribution
with Java3D and simply changed the filename to load to my own
"texture.jpg".
Unfortunately the rendering has the same bad texture quality.
But why? I need to finish my thesis in 2 weeks and it would be
nice to have nicer screenshots : )
Bye Chris
----- Original Message -----
From: "pumpkin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 15, 2004 6:05 PM
Subject: Re: [JAVA3D] Texture bad quality
Hello
On Saturday 14 February 2004 22:02, you wrote:
> I applied a grayscale image with 24bit as a texture to a simple quad.
What fileformat are you using ? jpeg ? BMP ?
> it
> works perfect but looks bad. the image seems to be color reduced. it
is
not
> dithered or have compression artefacts but have blocklike structures.
Is the image scaled up or down ? Scaling down a non-mipmaped,
non-NICEST-MagFilter texture produces ugly blocks.
> it might have 256 colors?
depends on the fileformat.
> //load an image
> tk = java.awt.Toolkit.getDefaultToolkit()
> tk.getImage(filename)
(No MediaTracker to load it fully ?)
Let's test if the file is loaded properly. Have you tried appling the
image to
a JButton ?
ImageIcon II = new ImageIcon(tk.getImage(filename));
JButton JB = new JButton (II);
(... show the JButton .... )
How does it look ?
> //create the texture
(...)
the important lines are missing: how do you create the
ImageComponent2D/Texture ?
Try this:
import com.sun.j3d.utils.image.*
...
URL location = (... filename to URL (File.toURL() ?)....);
TextureLoader TexLoader = new TextureLoader(location,
TextureLoader.GENERATE_MIPMAP, new JButton());
Texture T = TexLoader.getTexture();
T.setMinFilter (T.NICEST); //*
T.setMagFilter (T.NICEST); //*
... insert the other lines you have posted to create the app ...
app.setTexture (T);
if you don't want to use the TextureLoader, at least try the two lines
with *
on the texture. It really improves the look.
cu
Gilson Laurent
===========================================================================
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".
===========================================================================
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".
===========================================================================
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".