Advanced billboarding for built in terrain trees

Hi there,

while i am just finishing the work on the latest version of the advanced foliage shaders i would like to give you a sneak preview on one of its upcoming features which is “advanced billboarding” on trees placed within the terrain engine.
This means better fading between mesh tree and billboard containing:

  • faded wind animation
  • faded real time shadows on leafs and bark
  • faded point and spot lights
    giving you the smoothest transition between mesh tree and billboard you have probably seen in unity so far :wink:

It also comes with a technique i call “real time shaded billboards” which i have developed together with tomaszek and becoming while working on the Relief Terrain Pack 3.0 demo. This technique will make your billboarded tree receive some kind of “real time shadows” from the terrain or any other given geometry.

Just have a look at the picture attached so see how it looks or test the webplayer:
http://dl.dropboxusercontent.com/u/2322017/afs_v2/afs_v2_touchbending/afs_v2_treeShader/afs_v2_treeShader.html

Please note: When rotating the sun you may have to update the billboard textures manually (hit “4”) in case the camera has not rotated all at – as this is the “trigger” to make unity recalculate the billboard textures according to the given lighting situation. But you may also just check “Update billboard textures automatically”.

lars

And here is a video showing the advanced billboard fading:

lars

hi there,

i have pushed the shaders a little bit further and now i have a billboard shader that does not simply render those annoying always upright orientated billboards but billboards which respond to the camera’s perpective!

give it a try: http://dl.dropboxusercontent.com/u/2322017/afs_v2/afs_v2_touchbending/afs_v2_treeShader02/afs_v2_treeShader02.html

lars

This is really cool!
The transitions are really, really smooth.

Any chance we can see a billboard shader like this that works for general GameObjects?

thanks!

sorry, but this is not my cup of tee… but what would you need this for?

lars

and what do you mean by “regular” game object?

This shader was only for “terrain trees” right?
How hard would it be to make this work with a tree placed as a separate object?

Oh lars, I love you :slight_smile:

The current billboards were so bad, that I had to use a 2nd terrain with different blending settings, to make a proper blending between mesh to billboard settings. They always popped up very visibly, no matter what I tried. Your solution seems to have solved that problems. I also hated these always upright orientated billboards, looking at the edges of the screen, you could always see that there was something wrong with them.

Thanks for this! I am looking forward to the release.

well – you would have to write your own billboard system, which is out od boundaries right now… :wink:

hi olafson,
thanks!

lars

Dude…really…why the heck unity not hire you already? we need an updated terrain engine, and you did all of it :
Superb work dude…

Exactly, big fan of larsbertrams work and i always thought that a lot of it should make it into the engine : )

thanks to you both!
in fact i would not mind if the improved billboarding or anything else from the advanced foliage shader package got integrated into unity.
may be the day will come…

lars

Hi Lars, thanks for your hard work, it’s very appreciated here.

KirbyRawr

you are welcome!

hi there,

i just assembled a quick and dirty test scene which shows how a “fly” scene might look like (although i have written the shader to mainly support the first person perspective):

http://dl.dropboxusercontent.com/u/2322017/afs_v2/afs_v2_touchbending/afs_v2_treeShader03_fly/afs_v2_treeShader03_fly.html

  • use “wasd” and your mouse to navigate.
  • use “3” to roate the sun and see how the “shaded” billboards might look (do not forget to rotate a littel bit around to force unity to update the billboard textures).
  • use “4” to toggle between perspectively aligned and simply upright billboards. (the billboard shader will always perform advanced shadow and bending fading though, as it is not the built in one.)

Please note: it is absolutely ok if you get some kind of “extra punch” during the transition between billboard to mesh tree: that is the wind “fading in” which is set to “4”…

terrain settings:
– billboard start: 50
– fade length: 15
– max mesh trees: 75

lars

Advanced foliage shaders + rtp 3.0 + this new billboard system + TC = All I need for my next terrain.
Thanks to bring unity engine to higher level with your great improvements!

hi botumys,
i am pretty curious to see what you will do do with it!

lars

With the new billboard perspective, I can imagine big cliff with deep forest up and below and a nice shadow covering one part of this forest.
I’ll test this weekend !

hi there,

i have just updated the simple “fly” demo.
new in this version are:

  • fading billboards: they just fade out before they get culled (in order to make this visible i have set the “Tree Distance” to “380”.
  • dissolving tree shadows: in order to make the shadows casted by mesh trees not to just pop in (as the real time shadow distance is much higher than the billboards distance we won’t get fading in shadows casted by trees) i have implemented some kind of “growing shadows”. when used in conjunction with rather high camera movement speeds and soft shadows those might look quite ok (but can be simply disabled if you wish… ).

what do you think?

http://dl.dropboxusercontent.com/u/2322017/afs_v2/afs_v2_touchbending/afs_v2_treeShader03_fly/afs_v2_treeShader03_fly.html

lars