
_______________________________________________________________________________
               
			THIS IS A (minimal) HowTo FOR REALLIGHTS
			   
	author: fruktor
					visit: www.eifok-team.de 
				for more information and support
			   
_______________________________________________________________________________			   


GENERAL AND VERY IMPORTANT INFORMATION:

	You need to insert the RealLights.zip into your modfolder,
	because the RealLights work as a 'global specialization'.
	( This is very handy as you don't need to insert the specialization
	  into every vehicle individually. )
	
	


_______________________________________________________________________________			   
I.) this folder contains two subfolders:

sampleLights/
and within this folder another subfolder:
sampleLights/std/

The folder "sampleLights/" contains the 'new' lights.
The folder "sampleLights/std/" contains the traditional lights.

Copy the folder 'sampleLights' recursivly (everything what is inside) 
into your mod's folder and you might import the lights correctly.

_______________________________________________________________________________			   
II.) How to insert the RealLights into a vehicle?

II.1) First you have to import the corresponding .i3d-file, namely:

sampleLights/lights.i3d

then place some lights 'in the vehicle' ... 
probably you want to add several of each ...

Note: using TGs (transform groups) to seperate different types of light 
simplifies the job


II.2) Second you have to create entries of the following form in your vehicle.xml:

	<realLights>
		<blinkLeft index1="0>37|0" index2="0>37|1" />
		<blinkRight index1="0>38|0" index2="0>38|1" />
		<reverse index1="0>39|0" index2="0>39|1" />
		<brake index1="0>27|0" index2="0>27|1" />
	</realLights>	

	
Note: You can use as much entries for any type of light ... 
e.g.
<blinkLeft index1="..." index2="..." index3="..." index4="..." index5="..." />


_______________________________________________________________________________			   
III.) Further adjustments

If you want to use the RealLights as a beacon light you can adjust the 
'blinking rate' by creating another material ...


Note: make a copy of the existing lights.i3d and edit this copy.
By doing so you secure the original values! ;) 


This is the default value:

    <Material name="beaconLight:warnLight_mat" materialId="9" ambientColor="1 1 1" alphaBlending="true" customShaderId="5">
      <Emissivemap fileId="4"/>
      <CustomParameter name="offsetFreqMinMax" value="0 1 0 1"/>
    </Material>
	
Changing the "CustoomParameter" to:
	
    <Material name="beaconLight:warnLight_mat" materialId="9999" ambientColor="1 1 1" alphaBlending="true" customShaderId="5">
      <Emissivemap fileId="4"/>
      <CustomParameter name="offsetFreqMinMax" value="0 2 0 1"/>
    </Material>
	
gives you a light, which blinks two times faster then before.
Now, you only need to replace the corresponding "materialIds" of your shape ...

from:
<Shape name="orange" translation="0.91515 0 -1.78406" rotation="0 180 0" scale="0.5 0.5 0.5" nodeId="20" materialIds="9" shapeId="3"/>
to:
<Shape name="orange" translation="0.91515 0 -1.78406" rotation="0 180 0" scale="0.5 0.5 0.5" nodeId="20" materialIds="9999" shapeId="3"/>

and finally you can import this modified lights into your model

----------
Note: You can try different values easier if you make use of the GE's built in command line window.
(But the value is only valid until you reload the file, that's why you have to edit the file directly)

Try to use the follwoing command:
	setShaderParameter( id, "offsetFreqMinMax", 0, 2, 0, 1 );
but replace the 'id' with the id-value of the corresponding object.
e.g.:
	setShaderParameter( 20, "offsetFreqMinMax", 0, 2, 0, 1 );

Note: To execute a command hit 'Shift+Enter'
	


