Modelisation d'une voiture mais probleme de texture

Signaler
Messages postés
16
Date d'inscription
mercredi 29 janvier 2003
Statut
Membre
Dernière intervention
27 septembre 2004
-
Messages postés
16
Date d'inscription
mercredi 29 janvier 2003
Statut
Membre
Dernière intervention
27 septembre 2004
-
Bonjour à tous

Je me suis mis au java3d et je me suis modeleise une voiture
avec cette methode
int tab[]=new int[1];
tab[0]=26;
TriangleStripArray dessus=new TriangleStripArray
(26
,TriangleStripArray.COORDINATES|TriangleStripArray.COLOR_3
,tab);
//devant par-choc
dessus.setCoordinate(0,new Point3f(0.0f*z,0.0f*z,0.07f*z));
dessus.setCoordinate(1,new Point3f(0.0f*z,0.0f*z,0.01f*z));
dessus.setCoordinate(2,new Point3f(-0.002f*z,0.001f*z,0.07f*z));
dessus.setCoordinate(3,new Point3f(-0.002f*z,0.001f*z,0.01f*z));
dessus.setCoordinate(4,new Point3f(-0.002f*z,0.002f*z,0.07f*z));
dessus.setCoordinate(5,new Point3f(-0.002f*z,0.002f*z,0.01f*z));
dessus.setCoordinate(6,new Point3f(0.0f*z,0.003f*z,0.07f*z));
dessus.setCoordinate(7,new Point3f(0.0f*z,0.003f*z,0.01f*z));
dessus.setCoordinate(8,new Point3f(0.0f*z,0.02f*z,0.07f*z));
dessus.setCoordinate(9,new Point3f(0.0f*z,0.02f*z,0.01f*z));
//calandre
dessus.setCoordinate(10,new Point3f(0.0012f*z,0.025f*z,0.07f*z));
dessus.setCoordinate(11,new Point3f(0.0012f*z,0.025f*z,0.01f*z));
dessus.setCoordinate(12,new Point3f(0.005f*z,0.0288f*z,0.07f*z));
dessus.setCoordinate(13,new Point3f(0.005f*z,0.0288f*z,0.01f*z));
dessus.setCoordinate(14,new Point3f(0.01f*z,0.03f*z,0.07f*z));
dessus.setCoordinate(15,new Point3f(0.01f*z,0.03f*z,0.01f*z));
//capot
dessus.setCoordinate(16,new Point3f(0.07f*z,0.03f*z,0.07f*z));
dessus.setCoordinate(17,new Point3f(0.07f*z,0.03f*z,0.01f*z));
// par brise
dessus.setCoordinate(18,new Point3f(0.09f*z,0.05f*z,0.06f*z));
dessus.setCoordinate(19,new Point3f(0.09f*z,0.05f*z,0.02f*z));
//toit
dessus.setCoordinate(20,new Point3f(0.13f*z,0.05f*z,0.06f*z));
dessus.setCoordinate(21,new Point3f(0.13f*z,0.05f*z,0.02f*z));
//vitre arriere
dessus.setCoordinate(22,new Point3f(0.14f*z,0.03f*z,0.07f*z));
dessus.setCoordinate(23,new Point3f(0.14f*z,0.03f*z,0.01f*z));
//coffre
dessus.setCoordinate(24,new Point3f(0.16f*z,0.03f*z,0.07f*z));
dessus.setCoordinate(25,new Point3f(0.16f*z,0.03f*z,0.01f*z));
for(int i=0;i<26;i++) dessus.setColor(i,new Color3f(1f,0f,0f));
et un Shape3d

En filaire je vois bien ma voiture mais je n'arrive pas mettre une texture
comment faut il faire pour mettre une texture ainsi que pour faire un eclairage pour la mettre en valeur?
merci d'avance

2 réponses

Messages postés
2835
Date d'inscription
lundi 11 août 2003
Statut
Modérateur
Dernière intervention
16 décembre 2006
10
:big) Neodante :big)

Je te dirais de regarder le tutorial de SUN ou sur www.eteks.com ...
@+

[Responsable www.neogamedev.com]
Messages postés
16
Date d'inscription
mercredi 29 janvier 2003
Statut
Membre
Dernière intervention
27 septembre 2004

Merci mais j'ai deja regardé alors je n'ai pas du tout comprendre

pouvez vous m'expliqué à votre maniere?

je retourne voir les tutos merci encore