-
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)
Material material = new Material();
material.setColor(Color.RED);
// or
material.setColor(0xffff0000);
Material material = new Material();
material.setColor(Color.RED);
material.enableLighting(true);
material.setLights(lights);
material.setDiffuseMethod(new DiffuseMethod.Lambert());
Material material = new Material();
material.setColor(Color.RED);
material.enableLighting(true);
material.setLights(lights);
material.setDiffuseMethod(new DiffuseMethod.Lambert());
material.setSpecularMethod(new SpecularMethod.Phong());
Material material = new Material();
// -- The first parameter is compulsory and needs to be unique and
// has the same restrictions as any Java variable.
material.addTexture(new Texture("earth", R.drawable.earth_diffuse));
Material material = new Material();
material.addTexture(new Texture("earth", R.drawable.earth_diffuse));
material.setColor(Color.RED);
// -- Use 50% red
material.setColorInfluence(.5f);
Texture texture = new Texture("earth", R.drawable.earth_diffuse);
// -- Use 50% of the texture
texture.setInfluence(.5f);
material.addTexture(texture);
// 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);