> My application displays an OBJ file. It can set transparency, different
> visualisation styles, and many things else.
> But, I've got a problem : how could I set colors on my OBJ scene. When
> you load your OBJ scene, it appears white. With 3 JSlider (one for red,
> another for green and the last for blue), I tried to modify the color,
> but, nothing happend.
> Has anybody got a solution ?
How to do this on the fly, I'm not sure.  But in terms of coloring your
.obj models before hand:

If you have a .mtl (materials) file associated with the .obj (the
start of the mymodel.obj file should read like

#

mtllib mymodel.mtl
)

the model will be coloured accordingly.

The .mtl file contains descriptions of materials applied to geometry
groups in the .obj file e.g. .mtl color

newmtl aqua
Ka 0 0.2653 0.2653
Kd 0 0.5 0.5
Ks 0 0.6163 0.6163
Tf 0 0 0
Ns 60
Ni 1
illum 2
sharpness 0
d 1


can be applied to a part of mymodel.obj

g myaquagroupname
usemtl aqua
s 1
f 8096 8095 8064 8061
f 8095 691 8072 8064
f 691 8093 8074 8072
f 8093 8094 8076 8074
f 8094 750 8084 8076
...

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