All pastes #25875 Raw Edit

Stuff

public text v1 · immutable
#25875 ·published 2005-10-18 19:49 UTC
rendered paste body
<materialstate diffuse="0.9 0.8 0.7 1.0" ambient="0.9 0.8 0.7 1.0" emissive="0.0 0.0 0.0 1.0" specular="1.0 0.8 0.8 1.0" shiny="1.2" alpha="1.0" >
                </materialstate>
                <texturestate >
                        <texture file="Oldmetal.jpg" texnum="0" wrap="4" >
                        </texture>
                </texturestate>

lights:
	protected void initLights() {
		lightState = display.getRenderer().createLightState();
		lightState.setEnabled(true);
		
		light1 = new DirectionalLight();
		light1.setAmbient(new ColorRGBA(Config.SUNAMBIENT, Config.SUNAMBIENT, Config.SUNAMBIENT, 1.0f));
		light1.setDiffuse(new ColorRGBA(Config.SUNDIFFUSE, Config.SUNDIFFUSE, Config.SUNDIFFUSE, 1.0f));
		light1.setDirection(world.sunlightVector);
		light1.setEnabled(true);
		lightState.attach(light1);
		lightState.setGlobalAmbient(new ColorRGBA(Config.AMBIENT, Config.AMBIENT, Config.AMBIENT, 1.0f));

		rootNode.setRenderState(lightState);
	}
Where Config values are:
SunAmbient=0.5
SunDiffuse=1.0
Ambient=0.6