By single colour I actually meant using just one colour on your vertices.
Instead of attempting to get a gradient.
Also are your normals right, I mean the vector(0.0,0.7,0.7). You using
nominal viewing transform, which means +Z goes into the screen (is that
right anyone?). First off this means that your normals wouldn't point
towards the screen.
I also think you're vertices are a bit dubious. You want this background
to appear infront of you? As far as possible away? I'd go for something
like this:
private final float[] vertices =
{-0.5f, -0.5f, 0.5f,
0.5f, -0.5f, 0.5f,
0.5f, 0.5f, 0.5f,
-0.5f, 0.5f, 0.5f};
This should form a rectangle on the Z axis as far back into the screen as
possible? I suggest either not setting the normals, or setting them to to
(0.0,0.0,-1.0)
HTH,
Kev
> Single color->U mean setting a color to the background and then adding
> the background node to objRoot.Yes ,I tried that and it works .
>
> Also,about the geometry I have tried changing the coordinates of the
> QuadArray.
> Note: vertices array was changed to->
> private final float[] vertices =
> { 0.5f,0.0f,0.0f, 0.0f, 0.5f,0.0f, -0.5f, 0.0f,0.0f,
> 0.0f,-0.5f,0.0f};
> It still does not work .
> Can u suggest something,please.
> P.S:I got another reply about creating an image having color
> gradient,with Buffered Image.I have used that and it was a succesful
> process but there are some speed issues due to which I cannot use this
> method.
>
>
> ----- Original Message -----
> From: "Kevin Glass" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 12, 2003 5:43 PM
> Subject: Re: [JAVA3D] Creating a Background with a color gradient
>
>
</SNIP>
--
Jose UML - http://www.newdawnsoftware.com/jose
Pondering RPG - http://pondering.newdawnsoftware.com
===========================================================================
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".