Our tech artist/programmer/wunerkind Logan discusses how we went about creating the ocean feel for Giant's Deep! Since the start of the project, I knew the gas giant of Giant’s Deep would be a significant tech art challenge. Hidden under a thick layer of clouds lies an ocean planet, and I knew I wouldn’t be happy throwing some scrolling normal maps on a sphere and calling it a day. As such, I decided I wanted an ocean with real waves. The first big stumbling block to achieving this was having the polygons to turn into waves. We’d need to have it be a pretty high-resolution mesh, as you can jump down into the ocean in person, which makes the small waves just as important as the big ones. But we couldn’t have that detail everywhere, as that would choke things to a crawl pretty quickly. So we needed a giant sphere that gave us detail where we needed it, and faded it out where we didn’t. Thinking about the problem, I broke it down into an idea of having patches of different resolution stitched together into a sphere. A quad-sphere seemed the best solution, as that would be the easiest topology to work with. Using Philip Nowell’s excellent cube-to-sphere mapping equations meant that I could just treat it like a cube, and then have the GPU do the work of warping it into a nice rounded shape, like so: From there I set about writing code that would split each side of the cube into 4 smaller quads, and keep doing that until it was at a desired resolution. Although in practice this was the trickiest part (I had to keep track of neighbors, handle edge wrapping, and tackle memory pooling), after a while it was up and running! The last step was to get stitching working. Where two patches met of different resolution, there were cracks. To remedy this, I had a bunch of patch variants ready to go with added edge resolution. Since I was keeping track of patch neighbor information already, it was pretty easy to just pick the right variant based on what the adjacent edges were doing. Whew! Now that that’s working, we can actually start on the oceans! Here’s a sneak-peek of our WIP ocean planet!
Jonathan Sprague
12/1/2016 08:52:26 am
This is great work, really fantastic stuff. Can't wait for another update on y'alls progress.
Austin Drexler
4/16/2017 05:07:42 pm
Wow! I had no idea this was going on under the hood! Very impressive dude! Comments are closed.
|
Archives
June 2024
From the
Updates on our games, our process, and the joys of being Mobius Digital. Categories |