Graphics Reference
In-Depth Information
The new volume value is set to the Sound actuator by using the volume property. Finally, as in all cases in
whichanactuatormustberefreshed,the activate() methodiscalledwiththePlayactuatorasitsargument:
play.volume = GL.vol
cont.activate(play)
When youpress Pand enter the game-play environment, youwill be able to control the soundofthe bubbles
by using the U and D keys. The finished example can be found in the file soundcube_volume.blend on
the website for this topic.
Visualizing Fish Population Data with the BGE
AnextraordinaryexampleofthepracticalusefulnessofPythonandtheBGEcanbeseeninthecollaborativefishpop-
ulation visualization project carried out by the University of British Columbia (UBC) Fisheries Centre and students
in the UBC Masters of Digital Media program. The ambitious project focused on taking large amounts of complex
statistical data describing projected populations of marine life and the results of fishing policies on the populations.
Although the collected data was compelling, the researchers of the Fisheries Centre needed a way to make it access-
ible to nonbiologists and nonstatisticians.
The result of the collaboration is a dynamic 3D underwater environment with animated marine life in densities re-
flecting actual projections of the data. The user can select marine species and set parameters for fishing policy in real
time, and the projected effect on the fish population will become immediately visible. The team at UBC hopes that
this unique marriage of game technology and intuitive data visualization can help to influence how fishing policy is
made in the future.
You can read more about the project at
http://www.nereusprogram.org/content/public-awareness
The UBC team's full results can be seen on their YouTube page, which includes videos of the interface such as this:
http://www.youtube.com/watch?v=fegEVyqI2p8
Further Resources
If you've followed this entire book to the end, you should now have a solid grounding in many of the most
advanced areas of Blender functionality. But even a quick glance at the Python-Blender API or the GameLogic
API is enough to know that there is a great deal out there still to learn. Blender's functionality is almost endless
andexpandingallthetime.Eventherelativelylimitedcorneroffunctionalitydiscussedinthischapterisimpos-
sible to do justice to in such a small amount of space. For this reason, you will want to turn to other resources
to deepen your knowledge.
Because the API is so new, a lot of the tutorials and resources that people have used over the years for learn-
ing the BGE have become largely obsolete. A very promising upcoming book is Mastering the Blender Game
Engine by Mike Pan and Dalai Felinto (2012, Course Technology PTR). Although the topic has not been pub-
lished at the time that I write this and I haven't seen it, I feel confident recommending it on the strength of
the authors' reputations alone. Both Mike and Dalai are known in the Blender community as some of the most
skilled and knowledgeable users of the BGE around. If you're interested in delving deeper into the BGE, I ex-
pect their book to be a must-read.
Search WWH ::




Custom Search