Thursday, 9 May 2013

Height Map Displacement Shading






The textured forest looks pretty bad when it does not have shading-  It is pretty much impossible to distinguish different trees other than on horizons-



Textured Forest, no shading



Luckily implementing dynamic shading is not too difficult, and a variety of shading techniques can be combined to create a convincing effect.

Terrain Shading





Terrain Shading – trees will be shaded in shadow of terrain contours
lighting factor writen to Forest Map – passed through Displacement Filter


Height Shading



Height Shading – Assuming trees are shaded more on the bottom -
                                    Forest Height is determined by texture height * forest Value in terrain Vertices
                                    Forest Value passed through Forest Map –
                        bottomShading = finalHeight/ForestValue  (Relative Max Height)



Emboss Bump Map Shading



Embos Bump Mapping – Technique used to approximate bump mapping – may still show up in terrain shadows-




Combined Shading




Combined Shading – Shading methods multiplied together- some artifacts from embos bump map.. 


 



These shading methods require 2 more channels to be passed through the initial mapping process- Relative height for height shading and a light factor calculated for the emboss and terrain shading


2 comments:

  1. Hi,
    Good to see this work.
    May i know the what are the tools you have used ?

    I am an Ecological researcher!

    ReplyDelete
    Replies
    1. Hi Pandi, sorry it took me so long to see this post!

      This is actually a development blog for a set of tools for forest rendering, but more for general representation than exact detail.

      Right now all of this is hard coded using Microsoft's XNA game creation library, so its not at all user friendly.

      Good to know this might be useful though! I am a student in Environmental Studies and Computer Science, so hopefully I can keep working on this kind of thing in the future.

      Delete