Hi Florin,

Thanx for your answer.
Well, I didn't want to use two shape 3ds because I'm lazy :P I've already
specified the coordinates and texturecoordinates for an entire room, and I'd
like the outside walls to be different from the inside ones. But I guess
it's easier to just copy and paste the code and make a different shape 3d
like you said.

Thanx
Flavius


From: Florin Herinean <[EMAIL PROTECTED]>
Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] same shape3d, different textures
Date: Thu, 4 Mar 2004 10:30:13 +0100

In the java docs:

There is a two step action:

1. set the texture coordinates in your geometry, where you specify to which
texCoordSet you set the coordinates:

"http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_3_API/j3dapi
/javax/media/j3d/GeometryArray.html#setTextureCoordinates(int, int,
float[])"
2. set the TextureUnitState in the Appearance object, where the index
specifies to which textCoordSet will be applied the texture:

"http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_3_API/j3dapi
/javax/media/j3d/Appearance.html#setTextureUnitState(int,
javax.media.j3d.TextureUnitState)"

You may omit step 1 if you specify in the TextureUnitState a
TexCoordGeneration object, i.e. if one of the texture should represent
reflexions, refractions, spheric coordinates, etc.

Regarding your guess, that's the most complicated approach ! You should use
2 shape3d's. Multitexturing was specificaly designed for combining textures
at runtime, i.e. a basic texture with a reflected one or more elaborated
efects. I just don't understand why you don't want to use different shapes.
Can you explain the reason ?

Cheers,

Florin


-----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] Behalf Of Flavius Alecu Sent: Mittwoch, 3. März 2004 21:14 To: [EMAIL PROTECTED] Subject: Re: [JAVA3D] same shape3d, different textures


yeah, I Guess I could use sets. That seems like the most simple way to solve this problem. Is there a place somewhere where I can read about this? How do texture sets work?? thanx


>From: Florin Herinean <[EMAIL PROTECTED]> >Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: [JAVA3D] same shape3d, different textures >Date: Wed, 3 Mar 2004 10:58:28 +0100 > >You can do it if your card supports multitexturing. Just set for one wall >one texture coordinate set and for the other another texture coordinate >set. >But that's cumbersome. Much easier and intuitive is to just have two >Shape3D's, one for each wall. Another option is to have one texture, which >half is brick and half is wall, and then just play with the texture >coordinates. > >Cheers, > >Florin > >-----Original Message----- >From: Discussion list for Java 3D API >[mailto:[EMAIL PROTECTED] Behalf Of Flavius Alecu >Sent: Mittwoch, 3. März 2004 10:46 >To: [EMAIL PROTECTED] >Subject: Re: [JAVA3D] same shape3d, different textures > > >oh, well isn't that used for the same texture but to save cpu power? I've >read that and what I can remember it's used to have the same texture but in >different sizes? what I actually need is two different textures on the same >level. >Say I have two walls in the same shape3d, I want one to be a brick-wall and >the other one made of wood. > >Cheers > > > >From: Bassam <[EMAIL PROTECTED]> > >Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: Re: [JAVA3D] same shape3d, different textures > >Date: Wed, 3 Mar 2004 02:06:34 +0200 > > > >Have checked the tutorial written by Sun . Chapter 7 deals with textures >on > >multiple levels. > >I recommend that. I guess you can find it on the > >http://java.sun.com/products/java-media/3D/ however it is inaccessabile >at > >the moment. I don't know why. it seems like there is a problem. > > > >Bassam > > > >----- Original Message ----- > >From: "Flavius" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Wednesday, March 03, 2004 12:43 AM > >Subject: [JAVA3D] same shape3d, different textures > > > > > > > is it possible to haev different textures on the same shape 3d? > > > how does that work tehn?? > > > > > > thanx a lot > > > > > > > >=========================================================================== > > > 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". > >_________________________________________________________________ >Hitta rätt på nätet med MSN Sök http://search.msn.se/ > >=========================================================================== >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".

_________________________________________________________________
Hitta rätt på nätet med MSN Sök http://search.msn.se/

===========================================================================
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".

_________________________________________________________________ Hitta rätt på nätet med MSN Sök http://search.msn.se/

===========================================================================
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".

Reply via email to