-
Notifications
You must be signed in to change notification settings - Fork 0
Materials
(Just dumping information here at the moment, this will be more coherent)
java Material material = new Material(); material.setColor(Color.RED);
// color influence is only used when textures are used
// in this case it specifies that 20% of the color should
// be used in the final color
material.setColorInfluence(.2f);
material.enableLighting(true);
material.setLights(lights);
material.setDiffuseMethod(new DiffuseMethod.Lambert());
material.setSpecularMethod(new SpecularMethod.Phong());
Texture tex1 = new Texture("earth", R.drawable.earth_diffuse); // this texture's color influence (40%) tex1.setInfluence(.4f); Texture tex2 = new Texture("camden", R.drawable.camden_town_alpha); // this texture's color influence (40%) tex2.setInfluence(.4f);
// you can add as many diffuse textures as you'd like material.addTexture(tex1); material.addTexture(tex2);
sphere.setMaterial(material);