Volumetric lighting and realistic water in fully 2D game

Discussion in 'Game Development (Technical)' started by Janusz, Dec 20, 2016.

  1. Janusz

    Expand Collapse
    New Member

    Nov 1, 2016
    Likes Received:
    This is a short article without details that can help to create realistic phisical effect in 2d game. I use Java, so I'm writing about it, but I belive that in other language/libs it may be useful.

    Concerning water reflection
    The effect of wavy reflection is result of a few non-afine transformation, let call two first of them T1, T2. Then
    stand1.png --(T1)--> F1.gif and stand1.png --(T2)--> F2.gif ,
    finally composition of T1 and T2 and inverting with some gradient alpha chanel (let them call T):
    stand1.png --(T1)--> F1.gif --(T2)--> F1_2.gif --(T)-> result-water reflection

    All transrormation were made with affine transforms of Java SE.

    Concerning volumetric lights
    The game engine naw can produce the volumetric light whit is very tricky and still fully 2D effect. It's result of drowing a lots of character copies one next to another along light rays with AlphaComposite.DEST_OUTrule of drowing which is actually slightly erasing the image of light rays. See the effect on two videos below:

    #1 Janusz, Dec 20, 2016
    Last edited: Dec 20, 2016

Share This Page