Home Technical Talk

blending between textures

rbong obong
polycounter lvl 8
Offline / Send Message
rbong obong polycounter lvl 8
hello

i am part of a small team making a game in unity. we have come across a problem.
in the starting sequence we want to make a house and the forest around you burn down. how do we go about doing this? ive thought about blending between 2 texture maps but how do i do this. we also want to make the leaves burn away so how would we do this.

thanks.

Replies

  • RN
    Offline / Send Message
    RN sublime tool
    The burning leaves effect can be done with a pixel shader. It requires an understanding of HLSL \ Cg programming.

    The technique involved is sampling a greyscale noise texture, then discarding the pixel if the sampled value is less than a uniform variable that you decrement at every frame.
    http://simonschreibt.de/gat/sacred-2-burning-map/

    In that burning map example there's also the use of a 1D texture. In this case the pixels are not discarded based on value, the value is just used as a U coordinate to get a burning colour.

    - - - - -

    A variation of this technique is used to fade the bodies of dead enemies away in Doom 3 and Quake 4.
    You can see it at 13:20 in this video:

    [ame]http://youtube.com/watch?v=UFgff11EunM[/ame]
Sign In or Register to comment.