LightsAndColor: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Kiheru →Blend layers =: typo in header |
imported>Kiheru →Available blends: Started writing blend descriptions |
||
| Line 27: | Line 27: | ||
TODO |
TODO |
||
== |
== Blend modes == |
||
Coloring in Stendhal is based on [http://en.wikipedia.org/wiki/Blend_modes blend modes]. Some of the modes provided by the Stendhal client are similar to those in image manipulation programs, but some are specifically developed for the purposes of the game. |
|||
TODO |
|||
Currently the client provides the following modes: |
|||
=== Bleach === |
|||
This Stendhal specific mode is used for lighting. The effect is cancelling the effect of '''multiply''' based on the lightness of the blending layer image. Also the restored light is tinted based on the color of blend layer image, so it is possible to have colored lights. |
|||
Bleach is named "bleach" in the xml, and is technically available only for zones where the general mode is '''multiply''' or '''time'''. However if the general mode is something else "bleach" will fall back to '''generic_light''', so specifying bleach mode when you want to use the blend layers for lighting is safe. |
|||
=== Generic light === |
|||
Also a mode that is used for lights. Unlike '''bleach''', generic light can not create colored lights, but on the other hand it works on all zones regardless of the general lighting mode, including those that have no general mode specified at all. |
|||
Generic light is turned on with "generic_light", and it also serves as a fall back mode for '''bleach''' as noted above. |
|||
=== Multiply === |
|||
Multiply is similar to a mode provided by many graphics programs. In Stendhal it is used to simulate colored lighting, that is, the normal colors on the maps correspond to white light, and multiply is used to cut out some of light, with the color components of the zone color corresponding to the amount of remaining light. |
|||
Multiply can be turned on with "multiply" in the xml. This is also the method used by the '''time''' pseudo mode. |
|||
The exact formulas for the blend modes used by Stendhal can be found in the source file [http://arianne.cvs.sourceforge.net/viewvc/arianne/stendhal/src/games/stendhal/client/gui/j2d/Blend.java?view=markup src/games/stendhal/client/gui/j2d/Blend.java]. |
|||