Solar Power isn't Feasible!

Solar Power isn't Feasible!
This cartoon was on the cover of the book "SolarGas" by David Hoye. It echoes the Sharp Solar slogan "Last time I checked nobody owned the sun!"

Tuesday, March 18, 2008

1st Machinima Tests using Oblivion for Darb Al Ahmar

Machinima Test 1: Al Azhar Park to Darb Shoughlan



Machinima Test 2: Solar CITIES office to Darb Aslan mosque and back




These are Solar CITIES first attempts at importing the AKTC architectural models of the Darb Shughlan Complex and neighborhood at Al Azhar Park into the Oblivion Game Engine using the Elder Scrolls Construction Set along with Blender.

This Machinima Test was created not only to demonstrate the possibilities of using blog technology to offer mimesis, and extend the non- diegetic potential of the web to go beyond text and static imagery to convey information, but to communicate spatial information to visitors to our Solar CITIES projects.

Though this initial attempt to bring the AKTC architectural models into the Oblivion Game Engine -- and create a simulated fly-through (walk-through/ride-through) from Al Azhar park to our first solar installation on the roof of building 72 and back -- is far from complete or accurate, it could be used to successfully navigate your way from the park to the site if coupled with Google Earth Maps, as hinted at in the second machinima video above.

The first video shows the approach to the old Ayyubid Wall of Medieval Cairo from the park, takes you through the Darb Shughlan Complex where the Aga Khan architects work, and on into the Darb Al Ahmar community to our first solar roof on Building 72 where RSD technologies donated a Sunshore evacuated tube solar hot water system to the project.

The second video shows our Solar Cities office/apartment near the Darb Aslan mosque on Abu Hureyba street with its home built solar hot water panels. It also demonstrates how you can give visitors a sense of the real-time travel time needed to get from the mosque to the office by following the avatar, and how you can change daylighting regimes.

In particular, since Oblivion lets you set the time of day or night, one can place solar hot water or photovoltaic systems on various simulated roofs and see whether or not shadows or shading would be a problem before committing to experiments in the field. This is a tremendous asset for planners that should be open to poor communities as well.


The videos show the potential for using game engines to communicate ideas in third world development projects . This work was inspired by the work of Dr. Andrew Hudson-Smith at the Centre for Advanced Spatial Analysis (CASA) at University College London. His phenomenal work using game engines for serious urban planning can be read about in The Escapist Magazine: London in Oblivion.


How to make your own?

Step one is to read the brilliant tutorials over at Dr. Andrew Hudson-Smith's Digital Urban site. This guy has become my urban planning hero!

Part 1, which shows how to set up your landscape in Oblivion, is here:
http://digitalurban.blogspot.com/2007/05/tutorial-1-importing-sketchup3d-max.html
Part 2, which details how to import sketchup and 3d files into Oblivion is here:
http://digitalurban.blogspot.com/2007/06/tutorial-importing-sketchup3d-max-into.html

Since I can't afford Studio 3D Max and hate 8 hour or 30 day trials gumming up my system, I used Blender -- but be warned, Blender is a very complicated program. It's great advantage is that it is Open Source and Free.

Here's what I did:

AKTC architect Mahmoud Qotb was kind enough to give me two .pla files (Archicad Plan Archive) of the models their team (
Nivine Akl, Mohamed Ebaid, Heba Foda, Kareem Ibrahim, Mahmoud Qotb, Mohamed Said, Nadine Samir, Roberto Simeone, and Ibrahim Zakareya) had created. One was a detailed file with lots of textures of the Darb Shughlan school complex, the other was a general model of the entire project area, including the topography of Al Azhar park.

Because these files were so huge I had to work in sections. I took the Darb Shughlan complex and selected it in the 3D view and exported the model as a Wavefront .Obj file. Then I went into the general model space and found that the best way to work was to open another instance of Archicad. In the first instance I painstakingly selected each building or group of buildings that I wanted and copied them and then pasted them in place in the second instance. Memory issues are of vital concern so it takes trial and error to figure out how many models you can work with at a time. For example I did the group of buildings across the street from the Darb Shughlan complex as one .obj, the complex itself as another, the section of the Ayyubid wall as another and the topography of Al-Azhar park as another. When I tried larger groupings either Archicad would choke on export or Blender would freeze on import, or, if I could get them into Blender, it would behave sluggishly and crash (I'm running Windows XP in bootcamp on a MacBook Pro with 2 GB or Ram). Better to isolate sections and put everything together in TES CS.

When I had a group of models pasted into the second instance of archicad I exported them as a group as a .obj file (I tried .3Ds files but found that they didn't import properly into Blender -- they would come in looking like they had gone through Brendel-Fly's matter transporter. Ugly.)

I then closed Archicad and opened Blender.

Importing into Blender was fairly simple (I toggled autosmoothing without really understanding why), but sometimes the center of the models was horribly displaced. To get it back one must click on the center of the model and click "center cursor". Then came the difficult task of aligning the models, rotating them and sizing them. I found that by scaling 100 times the Archicad models became proportional to the NPCs in Oblivion.

In Blender it was necessary to remove ALL textures that the Archicad export contained in order to re-export for Oblivion. Since I don't know how to see a list of all textures, this meant clicking on each and every mesh object and manually removing the textures. If I missed one, and tried to export as an .nif mesh for Oblivion, I got error messages. Since each error message only appears after a long processing wait, you can waste hours trying to get a successful export and end up with nothing.

Word to other newbies like me -- be very thorough in removing any textures if you haven't any experience with UV mapping and such. What I did was get rid of all textures and then create new materials for each surface and color them. I experimented with texture mapping but didn't get very far, so for now all the surfaces are textureless.

Once each surface had material properties set I went into the Logic Mode (F4 -- the picture of the pacman face on the panel) selected Bounds and Added Collision properties for some of the objects, following these tutorials:

http://wiki.blender.org/index.php/Manual/Rigid_Bodies

http://niftools.sourceforge.net/wiki/Blender/Collision

While I experimented a lot with NIFSkope, which appears to be a very powerful and useful tool, and while I read through this tutorial,
http://cs.elderscrolls.com/constwiki/index.php/Adding_Collision_Model_-_Step_by_Step_Guide
I felt overwhelmed and abandoned trying to use this tool at this stage of my education. For this reason my .esp plug-in has limited physics -- you can walk all over the topography of the park and on the staircases, but most of my buildings you can walk right through. I learned that you have to set the Bounds properties as "Static TriangleMesh" to get arbitrary surfaces (like the Al Azhar Park) to work, but I still have problems with other objects. One of the worst problems is that my models would appear fine in The Elder Scrolls Construction Set, but when I went into Oblivion to interact with them they would be totally invisible! One Google Search suggested that my normals weren't set up correctly but I couldn't figure the nuances of remapping normals out. My work around was to import two NIF's -- one with collision properties set, the other without, so one would be an interactive surface and the other would be the visual model. Seemed to work at times, though there are still invisible objects in my .esp and I still don't know how to easily construct staircases inside the buildings that my character can climb.

One issue that constantly plagued me was having meshes with two many vertices. I never got the hang of "decimating" the mesh so it would export to a proper .Nif so I went with the idea of separating complex geometries onto several different layers in Blender and exporting one layer at a time.

(I should say however that I always tend to bite off more than I can chew because of my impatience -- rather than working through tutorials and learning the basics I just kind of jumped in and started working with these complex AKTC architectural models because I was in a rush to explore the possibilities. Now it is time to go back and learn the subtleties of these complex but fascinating programs and tools.)

For the solar panels on the roof of Building 72 I used Google Sketchup 6. I built the table and the cold water storage tank in Sketchup and imported a Silicon Solar Inc. standard evacuated tube solar hot water system from Google 3D Warehouse. Then I cut off the extra vacuum tubes and sized it to be the same as the Chinese Sunshore unit on our project roof and made my own cylindrical hot water tank for the remaining tubes. I made them all one group and then downloaded a trial version Sketchup Pro so that I could export the model as an .obj file to Blender.

I also experimented with importing the .obj files from Archicad into Sketchup and placing them on the proper Google Earth image to get the right relations between buildings. Then, when I exported them into Blender (as new .obj files) they were properly aligned. I also found I could size the buildings better in Sketchup than in Blender. Sketchup Pro is a must for this kind of work if you want to get things done quickly. Unfortunately even the Pro version of Sketchup won't export to .nif meshes (which are necessary for Oblivion) so Blender is essential for those of us who can't afford the expensive programs (don't forget to download the .nif export plug-in for Blender!)

The beauty of working with Sketchup is that Google 3D Warehouse has all sorts of "green cities" objects you can download and use: solar hot water systems of various types, photovoltaic panels, windmill generators, composting toilets, PV polycrystalline surface textures, heat pumps, Energy Star refrigerators and other white goods appliances -- so while I spent hours to model my first SHW systems by myself in Blender and Sketchup, you can now get them ready made. I can now start populating my virtual Darb El Ahmar with the consumer goods that I feel would make for healthy sustainable development (imagine, I can put a virtual Envirolet composting toilet in my Solar CITIES apartment in Darb Al Ahmar and invite virtual visitors to come in and try it!) .


Since there are sheep and camels living in the street where we live and have our Solar CITIES office, I also want to model them and put them into our virtual simulacrum. The problem with using the excellent models available in Google 3D Warehouse is that they lack animation properties and behaviors, so they won't be useful for creating a lifelike ambience for the neighborhood. The best alternative I can find is to mod the horses already found in Oblivion. The tutorial I'll be working from is here:
http://cs.elderscrolls.com/constwiki/index.php/Blender:_Creature_Meshes_101

So the basic workflow is as follows -- take 3D models from Archicad or Sketchup and export as .obj files. Import the .objs into Blender. Eliminate textures and recolor using your own materials (unless you understand texturing -- you have to save textures out as .dds files for Oblivion, and I haven't gotten that far yet. I'm experimenting with it using the GIMP though...).
Export as .Nif file (mesh file for Blender). Open The Elder Scrolls Construction Set (TES CS). Now follow the Digital Urban Tutorials linked to above.

To get the images into Youtube, I used FRAPS to capture the gaming screen. Unfortunately FRAPS only outputs .avi files which are useless in Final Cut Pro.

DivXDoctor II was supposed to work on my Mac for converting AVI's to MOV's but failed miserably, so I went but to the Windows side and tried a great program called Super@ found at http://erightsoft.com/superdc.html.
Super@ is freeware, from an idealistic group of programmers who care about the rest of us and is excellent but even though I installed it on my external hard drive it demands 20 GB free space on the internal hard drive to work properly (god knows why!) and my entire internal bootcamp partition is only 20 GB with only 2GB free space. So that option failed me!

After clogging my hard drive with innumerable trial versions of AVI to MOV converters that either didn't work or only exported 50% of the file (unless you buy), I finally decided that the best way to do it was to use the excellent AVI2VCD and convert my .avi's to .mpg files and store them on an external hard-drive that was FAT32 formatted (so that it can be read by both Mac OS and Windows XP; my other drive is NTFS formatted so it only shows up in Windows -- the advantage of NTFS is that it can take files larger than 2 GB so I can use it for Ubuntu and other Linux based Open Source Programs).

I then booted up my Mac partition and used QuickTime Pro (worth the $25) to convert the mpeg files to PAL .mov files.

It would be nice, however, if Quicktime Pro, charging that money, could read and convert .avi files without having the hassling of converting to mpegs first. Arggh. It means double the conversion time. Oh well....

Then and only then was I able to import the MOV files into Final Cut Pro without rendering and cut them together into the film above. (Note to others wandering down this tortuous path -- some people advise using Compressor, which comes with FCP, to do the conversion, using "Advanced Conversion, PAL" or "Advanced Conversion NTSC", depending on your format. For me Compressor failed utterly to convert AVI files and it said it wouldn't convert mpegs because it couldn't output the audio (there wasn't any). Finally I learned that I could convert the mpegs to m2V and then convert THAT to a .mov, but it was a hassle considering I could use Quicktime Pro to simply convert the mpeg to .mov. So no compressor use for me!)

I created the music in Soundtrack Pro, which came with the Final Cut Pro Student Edition. The narration was done using FCP's "voiceover" feature -- very handy -- and the internal mic that comes with the MacBook Pro (for better quality I sometimes use a professional microphone plugged into the M-Audio Firewire Solo, but for youtube stuff the internal mic is just fine!) Experimenting with various music streams I learned that .mp3s don't work in FCP without being rendered - you need to convert to WAV or to AIFF.

Now that I have the beginnings of a virtual Darb El Ahmar I can wander through and explore and interact with, I want to be able to quickly screen capture my journeys in this development simulacrum and post them on YouTube. For example, we have guests coming from National Public Radio (NPR) in two weeks, and I would like to show them how to get to our Solar CITIES office once I import those models. Since I want to be able to quickly create the simulation as a video, I don't want to have to keep switching from PC to Mac to PC (I use Bootcamp because it is free, and I can't afford Parallels, so I have to literally shut down the machine and reboot each time). Thus I need to find a way to avoid having to use Final Cut
Pro.

Windows Media Maker is an AWFUL program, so I won't touch it.

One thing I can do is use WINFF to batch convert my .avi files from FRAPS to .MP4 files, ready for youtube. And I found that I can cut out the parts of the AVI files I don't like (bad camera angles and such) using a brilliant little freware program called AVITrimmer. It is great for prepping your avi files before converting for editing, and if you don't want to do a full edit job and rearrange footage but just want to snip out all the bad frames or sections from your screen capture, you can use AVI trimmer to make your little movie and then convert it for youtube using WinFF.
Later this week I will install and try out AVIEdit which is supposed to let you do a bit more than AVITrimmer (including import mp3s for soundtracks) and will report back to you.


I've read that with a certain plug-in The Gimp can do some avi editing, but I haven't tried it yet:

http://www.gimptalk.com/forum/topic.php?t=22&start=1


I have also tried using a couple of Open Source Editing programs on the Windows Side of my PC, but haven't got them working yet. Jahshaka was the easiest to install, but froze each time I tried to use it with multiple files , and it didn't support the avis. I will try it again later and see if I can get something working in it. I am going to try a LiveCD install of Cinelerra, the Linux video editing program, which looks terrific, but I haven't put Ubuntu on my computer yet and haven't learned how to compile the source code, so we'll have to wait awhile for that.
There is a linux program called AddLinux that is supposed to let you run Linux from Windows without rebooting but I haven't installed it yet either.

I think what plagues most of us who do this stuff is deciding whether the cost-benefit ratio is favorable. Do I really want to spend all this time configuring my computer with all these systems and programs and learning how to do it all? The learning curve is STEEP, and many hours are lost dealing with bugs, crashes, misintallations, uninstallations, reinstallations, file shifting, defragging etc, to say nothing about learning to navigate all these different gui's and command line syntaxes. Uggh.

But the dream is alive: Won't it be nice when we can make it easy for non-Geeks without formal education, living in undeserved poverty on our Planet of Slums, to be able to, as William Burroughs put it, "Storm the Reality Studio and Retake the Universe"? Won't it be nice when we can learn to see the world "through different eyes, alien eyes; not with the eyes, from the perspective, the subject position, of the dominant discursive formation." (Anne Cranny-Francis, "Feminist Futures: A Generic Study" in Alien Zone, p. 223)

To do this we have to make modeling the world "in your image" and getting your simulacra on youtube as efficient and easy as possible. Google Earth and Google Sketchup were a good start (but COME ON Google -- stop charging people for the use of the export function! Or make free versions of Pro available to NGOs and educational institutions and poor communities!!), and once Blender's generous developer community gets around to simplifying the program for third world people it will be a great tool. Game engines could get easier than Elder Scrolls Construction set (which is very hard to navigate in) and I'm sure the mod community would welcome a simple way to get things in and out of the physics engines. And given the number of kids who spend hours crowding the few internet cafes in the slums of Cairo to play MMORPGs, the idea of participating in a game in which you can create your own eutopian vision of your own community's future is far more thrilling than some fantasy world that will always remain a "never-never land".

If my experience working with Solar South Central in Los Angeles with a few former gang kids who spent hours playing Grand Theft Auto: San Andreas (preferring it to all other games because it faithfully modeled Watts and the surrounding community) and then went on to start creating their own video games, is any yardstick, we can be sure that the power to share simulacra that can be HYPOSTATIZED through their manifest connection to reality , guided toward a tangible positive vision of that reality, will be emancipating in Cairo and everywhere else.

In the meantime, I encourage you to download our evolving SolarCities.esp, open your Oblivion game -- load the plug-in -- and start exploring -- and modding -- Darb Al Ahmar!

No comments: