News for hackers. Stuff that matters.
Re:WebGL Terrain Flyover Demo by sramsay on Sunday March 10, 2013 @04:13PM (#5353263)
"When I tried to think of a project suitable for learning JavaScript, a terrain flyover demo came to mind."

Me too! But then I re-establish contact with the reality of my actual abilities and create a button which, when pressed, prints "Hello, world!" to an alert window.

Re:WebGL Terrain Flyover Demo by nestoras on Sunday March 10, 2013 @04:20PM (#5353291)
Haha thanks :) I've done these things in the past many times, only on different platforms. The real kudos go to the browser guys (especially at Mozilla and Google) for all the superb work they've done on WebGL and JavaScript in general. Learning JavaScript and some of the intricacies of developing for the web has never been more fun! :)
Re:WebGL Terrain Flyover Demo by Tloewald on Sunday March 10, 2013 @06:00PM (#5353680)
Not discussion that I can see of your rendering techniques. Are your shadows baked?
Re:WebGL Terrain Flyover Demo by nestoras on Monday March 11, 2013 @05:27AM (#5355676)
Yes, they are generated offline. It's the most time consuming step when generating the terrain.

Doing the lighting and shadow generation in real-time (during tile initialization) is a very interesting problem! The great advantage is the bandwidth reduction and the ability to move the sun of course. A Web Worker can (probably should) be used for that purpose. The problem is that in order to correctly light a tile, you need access to its adjacent tiles as well (since peaks near the border on their side may be casting shadows on our tile).

All in all, very interesting and certainly doable!

Re:WebGL Terrain Flyover Demo by SammoJ on Sunday March 10, 2013 @07:18PM (#5354016)
If you grab the resources you can see the lightmaps.