i require the rest of the object to be transparent . your suggestion is a good
one . it seems to be a common solution to many problems . to me though,
the 'pixel stretch' to cover the object just looks wrong . if you clamp,
you clamp .
if you wrap you wrap .

see the attached sample . the lower left corner of the texture is in the upper
right corner of the picture . the left and lower edges of the texture wrap
the rest
of the sphere

At 09:14 AM 11/4/01 -0500, you wrote:
>I don't quite understand the problem.  What do you want to show up on the
>"non-decal" portion of the object?  When you texture an object, all
>triangles are going to be  covered with the texture according to the texture
>coordinates assigned those vertices.  You cannot "selectively" pick a
>portion of the geometry to receive the decal while leaving the rest alone.
>
>If you have a sphere that is already textured and you want to overlay a
>decal on just a portion then you can do this in multiple passes.  The second
>pass you can use a texture which is transparent on the portion which you do
>not want to see the decal.  Because you will have coplanar z-buffer
>collisions you would have to use the polygon offset to solve the problem.
>In this technique you can re-render the entire sphere, or you can replicate
>the part of the sphere which is going to have the decal.
>
>The easiest thing is just to compute one texture for the sphere and to
>pre-merge your decal onto the texture before applying it.
>
>David Yazel
>htpp://www.cosm-game.com/
>
>
>----- Original Message -----
>From: Michael Knezevic <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Saturday, November 03, 2001 4:39 PM
>Subject: Re: [JAVA3D] Texture.CLAMP
>
>
>hi,
>i got the same problem and would be happy if somebody
>would help us here. pleeeaaaassseeee!
>
>cu
>
>mk
>
>  --- Mr Snow <[EMAIL PROTECTED]> schrieb: >
>ok, i give up . i've even seen this problem
> > in tutorials , but it can't be
> > right.
> >
> > what i am trying to do is position an image ,
> > 'decal' like on the surface
> > of a sphere,
> > *not* covering it tip to tail . so i thought, clamp
> > & scale .
> >
> > what happens thought, is that each edge pixel of the
> > image stretches to
> > fill the sphere
> >   up to the poles and  around to greenwich .
> >
> >         it must be something simple, i've chased all
> > through the archives and can't
> >         a solution . any ideas ?
> >
> >           texture.setBoundaryModeS(Texture.CLAMP);
> >
> > texture.setBoundaryModeT(Texture.CLAMP);
> >              TextureAttributes textAttr = new
> > TextureAttributes();
> >
> > textAttr.setTextureMode(TextureAttributes.DECAL);
> >
> >              double tx = 4.0d;
> >              double ty = 3.0d;
> >              double tz = 4.0d;
> >              float x = -1.5f;
> >              float y = -1.0f;
> >              float z = 0.0f;
> >
> >              Transform3D textTrans = new
> > Transform3D();
> >              textTrans.setScale(new
> > Vector3d(4f,3f,4f));
> >              textTrans.setTranslation(new
> > Vector3f(x,y,z));
> >
> > textAttr.setTextureTransform(textTrans);
> >
> >
>===========================================================================
> > 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".
>
>__________________________________________________________________
>
>Gesendet von Yahoo! Mail
>http://mail.yahoo.de
>
>===========================================================================
>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".

<<attachment: sample.jpg>>

Reply via email to