Hi Tina
I am a subscriber to the Java3D mailing list though I dont post to it directly.
Your mail got me interested.
In creating the texture object you are using the format as
Texture.RGBA. This is valid only for images with an alpha channel.
If your image doesnt contain an alpha channel you should use Texture.RGB.
Anand
==============================================================
Anand B Pillai,
Software Engineer(Core),
Delmia Solutions(Subsidiary of Dassault Systemes, Paris),
Bangalore.
--
On Thu, 3 May 2001 12:45:46
Tina Manoharan Valappil wrote:
> Hello,
>
> I am sorry to send this message again, but I really need some
> help with this......
>
> When I apply texture I dont see the texture , only a single color
> is applied to it instead. For e.g if I apply a cloud texture then
> dark blue appears or if I apply brick texture then red appears.
> Another point to mention is that, I was able to get the texture
> on an object in another program where the object was just a sphere
> created with the Java3D sphere class, but in this program the
> Shape3D is a VRMLloader loaded shape.
>
> This is the part of the code...
>
> ======================================================
> TextureLoader loader = new TextureLoader(imageURL, this);
> // where this is the applet
>
> ImageComponent2D image = loader.getImage();
>
> Texture2D texture = new Texture2D(Texture.BASE_LEVEL,
> Texture.RGBA, image.getWidth(), image.getHeight());
>
> texture.setImage(0,image);
> texture.setEnable(true);
>
> Appearance appear = new Appearance();
> appear.setTexture(texture);
>
> TexCoordGeneration tcg = new TexCoordGeneration
> (TexCoordGeneration.SPHERE_MAP, TexCoordGeneration.TEXTURE_
> COORDINATE_2);
>
> appear.setTexCoordGeneration(tcg);
>
> shape.setAppearance(appear);
> // where shape is a Shape3D from VRMLloader
> ============================================================
>
> Please help me.
>
> Thanks
> Tina
>
>===========================================================================
>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".
>
Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/
===========================================================================
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".