Hi All,
I've loaded an Object file(.obj) and I now want to texture it with
a .jpg file. Can anyone help me with this?
Here's the important bit of my code for loading the file:
Scene s = null;
s = f.load(filename); //filename is the name of the file, cube.obj for ex.
objTrans.addChild(s.getSceneGroup()); //objTrans is the TransfromGroup
Here's the code for texturing..
Appearance app = new Appearance();
TextureLoader tex = new TextureLoader("Image.jpg", this);
app.setTexture(tex.getTexture());
TextureAttributes texAttr = new TextureAttributes();
texAttr.setTextureMode(TextureAttributes.MODULATE);
app.setTextureAttributes(texAttr);
app.setMaterial(new Material(white, black, white, black, 1.0f));
Both bits of code work OK independantly, I just don't know how to
combine them.
I hope someone can help me,
Thanks,
Phelim
===========================================================================
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".