Category Archives: Science

GDC12 – Wednesday

It’s Swag Day!! The Expo Hall opened today along with the starting of the main part of the conference. Although the Math and Physics for Game Programmers tutorial of Monday and Tuesday were over, the math and physics discussions were just getting started!

Normally, the first event of the day on Wednesday is a keynote address from someone who had a significant influence on the industry such as Shigiru Miyamoto or Hideo Kojima. This year, they decided to instead have 100 of the presenters over three days of the conference pitch their talks in 45 seconds or less. This “Flash Forward” concept was interesting, entertaining, and it influenced my session choices, but I still miss hearing a talk from a legend in game development. I’m hoping they go back to the traditional format for next year.

My first session of the morning set a theme for the entire day looking at fluid modelling. Carlos Gonzalez-Ochoa gave a brilliant talk, Water Technology of Uncharted, discussing the various techniques used to generate realistic looking water elements in the Uncharted series of games. This was a surface-mesh modeling technique, not a fluid simulation, but a vector field representing the bulk flow of the water was used to modulate textures and the wave directions. Rather than building a spectrum of wave frequencies and modelling that multi-harmonic wave motion, they instead created a random collection of “wave particles”, pulses that could be tweaked to be as round-topped or as peaky as desired by the artist by adjusting a single parameter. Rather than generating a spectrum of these wavicles, a single set of them is generated and then scaled down and replicated to model the higher frequency components of the total wave motion. Although these wavicles have their own random local velocity, the ensemble is modulated by the bulk flow vector field to generate a more realistic-appearing surface. The final piece of the modelling is to include larger amplitude long-wavelength modes to simulate swells, rollers, and retromotive waves in rivers or channels. Combining all of these together creates some absolutely stunning looking water with very believable dynamics and behaviour.

My next session was actually a talk on a topic that got me first excited about the technical sessions at the GDC when I first attended back in 2007. In my first trip to the GDC, I was blown away by the intense mathematics involved in many aspects of intensity-mapping and lighting. The talk was on the advantages of using radial basis functions as an alternative to spherical harmonics. This year, it was the radial basis functions that were under attack. Spherical harmonics still suck, but the presenters, Robin Green and Manny Ko, argued for the advantages of spherical needlets as an alternative to either spherical harmonics or radial basis functions. The talk itself began with a crash course in Hilbert spaces, overcomplete basis sets, and how to create good basis functions. That was all well and good, and interesting, but I would have preferred that they spent more time on the exact specifics of needlets, their advantages and disadvantages, and a demonstration of their usage. Unfortunately, there was not enough time in their talk for this.

There were a few other talks I attended today, which meant minimal swag-gathering in the Expo Hall. Tomorrow’s schedule of interesting talks looks to be more sparse, so I’ll be in full swag accumulation mode and will have pics then.

GDC12 – Tuesday

Day Two of the 2012 Game Developers Conference was all about the physics for me. Today, there was an all day Physics for Game Programmers tutorial, and like with the previous day’s math tutorial, some of the talks were hits and some were misses. The day began with a great discussion of collision detection and a conceptually complex method utilizing something called a configuration space object. Details about the process of creating a utility object by sweeping one of the game objects with another. The properties of the object generated by this sweep, the configuration space object, allows for quick collision detection by determining if the coordinate system origin in configuration space lies within the CSO. Not only does this procedure allow for the detection of the collision, but it also allows for the rapid determination of the collision point, and the collision normal, both of which are critical for resolving the velocities after the collision. You can learn more about this procedure and download the code at http://www.dtecta.com/.

The second talk of the day was a party of tensors and Newton’s 2nd Law. I loved it! Solving Rigid Body Contacts by Richard Tonge of nVidia focused on collision resolution. Once you know that a collision has occurred, you then need to figure out how to handle that collision. One thing that I found interesting is that was that game devs use the term impulse to refer to a \Delta \vec{v} as opposed to the physical definition of \Delta \vec{p} . After listening for a while, it was completely understandable why. Collision resolution happens instantaneously, and the change in the objects motion is achieved by applying the simple statement, \vec{v_{new}} = \vec{v_{old}} + \Delta \vec{v}. Getting this \Delta \vec{v} physically right, doesn’t always result in physical behaviour from the simulation. Tweaking of collision-induced impulse is needed to produce more realistic appearing motion and reactions.

The afternoon sessions were all about ragdoll physics, which would have been very interesting if there was any depth to the talks, but they were all very high-level and filled with pretty video sims and devoid of any serious discussion of the physics modeling. Unfortunate, that. The salvation of the afternoon was a talk by the tutorial’s facilitator and organizer, Jim Van Verth. Jim talked about the basics of fluid simulation including introductions to the Navier-Stokes equation and methods for modeling and solving it.

The most straightforward way to model fluids is by gridding your space and evaluating the continuity and momentum equations discretely at the center of each grid element. This is robust, but expensive. It also only operates in the space in which you’ve established your grid. You won’t want to use it world-wide because of the computational costs, but it is useful for very localized fluid effects such as puffs of smoke during destruction events and the like. This method also doesn’t model splashes well. The fluid remains intact, rather than separating into droplets as a real fluid will.

A method that is more globally applicable and that does a good job of modeling splashes is Smooth Particle Hydrodynamics (SPH). SPH uses kinetic modeling of small particles with an attractor force, simulating a surface tension, to loosely bind the particle together. The ensemble of particles is then skinned to produce a realistic looking fluid surface. Splashes are well modeled by this technique, and since its a kinetic system, not a cell-based system, its globally applicable. You don’t need to grid out your space, and the fluid is free to flow wherever physics takes it in the world.

The last method demonstrated was a method of simply modeling the surface of a fluid, such as an ocean surface. Ocean waves are not of a simple single frequency, but are complex structures comprised by a multitude of wave modes. To generate realistic looking waves, a Fourier sum is used to add multiple wave modes to the entire surface and the wave speed is properly calculated via a frequency-dependent dispersion relationship. Building these modes in frequency-space and then using a FFT to transform back to time-space results in extremely realistic fluid surfaces. This is the method used to generate the ocean surface in the movie Titanic. Cool!

Last event of the day was the IGDA party. Its something that we attend every year, at least for a half-hour or so. Typically there have been munchies and various innovated board games scattered around. This year, there were vendor tables, no munchies, minimal board games, and a TON of people! Its probably a good thing the fire inspector didn’t stop by. They’d have shut the place down. Oh, yeah, and there were ribbon dancers. :S Just what kind of party is this? It wasn’t your typical professional organization party.

Wednesday, the main part of the conference begins and the expo hall opens! Yay swag! I’ll have pics of swag after my first swing through the expo hall. If you see something you like, be sure to leave a comment for me.

GDC 2012 – Monday

The 2012 Game Developers’ Conference officially got started this morning. For me, it seemed like a late start with the first sessions beginning at 10am. For someone who’s up at 5am on a regular basis, that’s a lot of morning time to kill before getting started! Fortunately, my camera is with me everywhere and I had lots of time to explore before hitting Mel’s Drive-In Diner for breakfast.

The “discovering new experiences” part of the day started VERY early as I experienced my first earthquake. A 4.0 magnitude quake struck the Bay Area at 5:30 this morning. While it wasn’t that strong of a quake, it was still disconcerting while occupying a room on the 8th floor of an old, sketchy hotel! At least now I can scratch “survive an earthquake” off of my bucket list.

Sessions for the day were part of the Math for Game Programmers tutorial. In the past, this has been a weak tutorial, but I was pleasantly surprised by its evolution. While the oratory skills of the organizer had still not improved one bit, nor had his specific talk, the quality of the other presenters and presentations improved quite a bit. First out of the gate was a talk on Bezier curves and splines. Might have to see about working curves and splines into the MATH/PHYS 191 course. It would be a natural succession to introduce them after we discuss parametric equations.

There was also a good talk on collision detection methods which reaffirmed that the work we’re doing in the MATH/PHYS 191 course is in line with what’s being done in the field. All very interesting, and I’ll have links to the slides in time. The last talk of the day was about data as paramount when thinking about how to construct code. The speaker’s motto was “understand the data, and you understand the problem”. As a computational physicist, my reaction was, “Duh!” Preaching to the choir, there.

One of the great things about coming to San Francisco is having the opportunity to meet up with some of my friends and fellow IndyCar fans from Twitter. Tonight, I was introduced to a new place, Pesce, which specialized in tapas-style seafood dishes. It was fabulous! I would include a pic of the lobster ravioli and the pan-seared scallops, but they didn’t stick around long enough. Delicious!

So the first day was successful. At least more than it had been in past years. Tuesday, the second day of the tutorial, is all about Physics for Game Programmers. It will be interesting to see what new things they bring to the sessions this year. Also, the IGDA party is Tuesday night! It’s never been a real blow-out type of party, but at least there’s free food.

Imaging the Night Sky in Motion

So I’ve been meaning to try something new for a while now and I just got it worked out (sorta) this past week. I’ve always enjoyed photographing the night sky, but I really wanted to work on taking images that showed the sky in motion. It’s so easy to go outside, glance up at the sky, and think of it as static and unchanging, but if you look carefully enough, you’ll see that it’s in constant motion. I did a lot of work last year imaging the sky in a static way, either by shooting through a telescope with a clock drive, or by stacking a succession of individual images. While I really enjoyed some of the images that I captured through those methods, they didn’t really portray how rapidly things move around in our night sky.

In thinking of ways to demonstrate this motion, the first obvious choice was to do a typical “star trails” image. I’ve attempted these type of images before, but this past week, I tried to up my game a bit. My trails images before were only about 10 to 15 minutes in length, but the one I took last Thursday was approximately an hour-long exposure. The resulting image turned out pretty good, all things considered. I have a dusk-to-dawn light (that I need to put on a switch!) that’s great for security, but not so great for viewing the night sky. To combat its effects, I set my camera up on its tripod on the far side of my barn so that the barn blocked most of the light. The trees and surrounding ground, as you can see in the image, were still fully illuminated. My light and others around the area also light up the sky, so rather than a deep, dark background sky, I got a kinda pink-ish background. The star trails themselves, came out great.

Here’s the EXIF data for the image.

Camera Nikon D7000
Exposure 3099
Aperture f/5.0
Focal Length 18 mm
ISO Speed 200
Exposure Bias 0 EV

Even if you don’t have a tripod, you can still try this type of shot for yourself. You will need something to keep the camera steady. A beanbag or a bag of rice will work just fine. You will also need a remote shutter release. Find either a bright star or planet and manually focus on it, then set your camera to manual mode and set the shutter speed to “bulb”, and your aperture to your lens’ sweet spot. For the lens I was using, that happens to be about f/5.0. Even though it’s night, don’t use a high ISO. The length of the exposure will gather all the light you need. Once it’s ready, lock the shutter button down and go back inside where it’s warm and wait. 🙂

Practice, practice, practice, and share your star trails pics, tips, and suggestions in the comments section below.

The Radio Beacon That Started the Space Age

On October 4th, 1957, the Soviet Union became the first nation to successfully place an object into orbit around the Earth. That object was Sputnik-1 and it scared the crap out of us. At the time, most people felt very secure in the technological superiority of our country, a belief that still persists with many, but hearing that the Soviets had beat us to orbit, and then SEEING the small little basketball-sized satellite as it passed overhead stripped away the arrogant confidence that many had that we would prevail against our Cold War enemy in every single endeavor, including being the first to Space. This spawned a movement within the Western World, including the US, to “step up to the plate” and push science and engineering hard in the classroom. Teachers, students, and industry were strongly motivated to bring young, bright minds into the Science, Technology, Engineering, and Mathematics (STEM) fields. Seeing where STEM enrollment and participation is today, perhaps we need another Sputnik. While I wouldn’t normally suggest a fictional movie as a reference, especially one from Hollywood, the movie, October Sky does an excellent job of capturing the attitudes and emotions of the time.

Related to all this is story that was relayed to be my by long-time mentor, Dr. Thomas Armstrong, a space science researcher and educator who has been involved in the space science business since it was a business, and studied at the University of Iowa under the great James Van Allen. Sputnik’s successful orbits, and the Soviets’ great achievement, wasn’t really the wasn’t the signal of our technological inferiority as many had feared. President Eisenhower had played a very shrewd and clever game. We had a launch vehicle and a payload quite capable of reaching low-Earth orbit before the Soviets. The Vanguard project was an effort designed to launch a civilian satellite into orbit, which it eventually succeeded in doing, but there was a military effort in place before Vanguard. That effort quite possibly could have succeeded, but the political costs of that success would far outweight any strategic or propaganda-based benefit. Eisenhower had ordered that the test launch absolutely, under no circumstances, be allowed to achieve orbit. In response to that order, the third-stage fuel tank was drained, and the planned flight to orbit failed as planned.

The reaction by the American public to Sputnik, driving students and industry to STEM education, lead to a flood of young, bright, eager, and highly motivated scientists, technicians, and engineers, and America surged forward. Not even a year after the launch of Sputnik, Eisenhower formed the National Aeronautics and Space Administration (NASA). From that moment forward, NASA was the unrivaled leader of space exploration and rocket engineering. In a very real way, not launching a satellite when we could have and allowing the Soviets to be the first into space, allowed for an environment that would see the US surge forward by leaps and bounds with scientists and engineers being seen as rock stars! We can have those days back again, all we need is to value science, technology, engineering and mathematics in the same way now as we did in the 50s and 60s.