Saturday, June 9, 2007

The Conclusion and future ideas




So at this point we have a working Flex application which does exactly what we wanted it to do. In other words it makes possible to view 3D in Flash Player and attach real world data to it, even using 3D models instead of primitives and all that within the browser without downloading any plug-in (assuming of course that Flash Player is present). Also as we speculated in the very early phase of this document, it turned out that the simplicity and ease of use can be preserved while upgrading this solution for a more specific goal. As it comes to a practical usage of that kind of solution, it cannot be confirmed at the moment. But if you look at it closely and then look at the abilities that the technologies that were used here give, you might get a bunch of ideas where to use that kind of solution after doing some tweaking. The solution itself as I see it now, is an outline of the application, a basis that can have its functionality enhanced in many ways to create desired, more specific application. However like the example from Anjali Bhardwaj in one of the first chapters, the solution shows that that kind of connection is fully applicable and one can create a new way of representing data in the browser using latest technologies like Flex merged with those from the niche like PaperVision3D.

During the development of that project I’ve seen many new solutions that popped up to more less satisfy users with more immersive way of viewing data. Google, which is as I said before a really fast growing company tries to get some new functionalities to Google Maps, whenever it is possible. It’s a really good thing to try, much better than being idle. It is just a matter of time when they hit the jackpot with a really usable and practical way of data viewing, to provide people with better world understanding and make them a bit addicted to that kind of solutions. On the PaperVision3D mailing list few weeks ago I’ve heard about the idea of using Flash inside Google Maps. It is a really nice thing that they did, here is the link http://maps.google.com/help/maps/streetview/index.html . It is a 3D environment based on the sequence of photographs taken from the Google truck (most probably), merged to create 360 degree really nice looking panoramas. Sure, it is a really fascinating solution but it is still a fake 3D, and as far as we can recall the history the next step would be real 3D solution. The thing here that I find the most interesting is that Google used Flash Player for it. Which is surely a good sign for our project, it means that we kind of predicted the Flash Player usage in this field although they tried Flux player in the beginning as you might remember. Maybe they realized how the barrier of the new plug-in is hard to jump over. What people look for in that kind of solutions, that is a question, do they really need the real 3D immersion? The solution that Google just had shown is based on photography, hence much more realistic. It is fast, intuitive and really educating for society. It has all the ingredients that are needed to make people speak about it. I don’t know the details how the solution was achieved but if the data gathering is reasonably easy, it would last for a long time till, the real 3D in a browser evolves to such a level that it can be put instead. The point that I’m making here is that it is the next step, and for me a kind of obvious thing is that real 3D solutions must overtake sooner or later the existing way of world representation in the browser. I have no doubt about it. It is also possible to merge realism of Google Street view with 3D freedom that is given by 3D engines, why not. The solutions that are appearing now are just to fill the time gap till the real 3D worlds arrive, that is how I feel about it.

So if I say that real 3D will be a big boom in browsers, the next question that I should ask myself is about Papervision3D and its future. Is it capable of taking all the desires that people want? With my three months spent on its mailing list, and looking at the events around this open source engine I must say I’m impressed. However the way to achieve the leading role in 3D worlds in internet is still far away. The strong point that Papervision3D has is surely a very strong core team and vivid community. Just to show you that I’m not a person that lets emotions speak my mind, I will tell you three facts which I find very convincing. The first one is that I get average of five mails daily (each consisting of several threads) from the PaperVision3D mailing list, covering many issues. The second one is that the core team just merged with a strong Away3D team, and still some new designers are joining. The third one is the international arena which will be Flash 3D presentations and case studies made by PV3D core team which create awareness among society about this 3D solution and finally the award that was PV3D given few weeks ago in two categories: “People Choice” and “Experimental” at the FITC 2007 Awards. So if Papervision3D is doing so good I think when more and more people start hearing about it, and what will be better – using it, some big companies might get involved, and that is exactly the way which is PV3D going now. So in my humble opinion it is quite possible that in the near future PV3D engine will be used in Google Maps for instance, or with ESRI ArcWeb Explorer which has the whole structure based on Flex and Flash Player and probably would have better integration ability.

So where is the solution that we’ve just created going to? Well I think it had opened many doors to follow. Especially when you look at the functionality that Flex environment gives. As I said consider it as a basis which however can be used in its present form if primitives and models are enough for whatever you are building. For instance it can be used to place a 3D environment of the University Campus into swf file which then can be hosted inside the HTML University web site as a playable swf movie to show the campus surroundings. Another option is your city and city web page, whatever is possible to draw in Google Earth you can put inside the flash movie. I will now give you some of my thoughts about the future features of this solution and try to point out some problems.

First task that would be most preferable I think is to make the whole appearance more vivid. And by that I mean giving the 3D objects textures so that they appear more as a real world. As planned before you have Mesh3D objects placed separately in the MESH_ARRAY inside our KML class. You can attach material to them later or while creating the object in the constructor (first parameter is MaterialObject3D). For that however you will need to plan images that you would like to use and plan UV mapping for each object. If you are planning the representation of a 3D campus for instance it would be a good idea take a walk through your campus with digital camera to give it a real world texture. However simple building textures from game industry should do the job as well so that the view would be more fascinating. The good news is also that if you have 3D Collada models you have also support for their materials from Papervision3D engine, so it’s also possible and you can make it in a much more professional manner inside the DCC tools rather than by attaching them manually to objects. Google Earth and kml files of course make it possible to view and store models with materials as well.

So if we can make world more vivid why not to go further and add true ground images. Now how to do that? I mentioned before about a dynamic solution for providing data, and that would be WebServices. Some of the web services or even Google Maps requests give you ability to acquire the satellite picture of the area which you specify by latitude and longitude boundaries. Sounds familiar? So if we have Web Service with such ability (and I know that they exist), nothing easier I say. You take the WORLD_PIVOT object then you add and subtract specific values to get the local bounding box, you send them as parameters to the Web Service and you get as a response a satellite image (jpg for instance) for that area. Then you put a plane object (descendant of Mesh3D class) on the scene and attach received image as a material. You should get an image with enough quality to see the houses. That effect should look really nice and work for any area that you specify. If you find a Web Service with a weather conditions based on the same rules you can put another plane for the sky and create true weather images, sounds inspiring.

Now let’s open the pot with Flex abilities. First of all because I also see a future for gaming industry in GIS market (I’ll speak about it later) I would give an idea of connecting several people inside one virtual city created of course in Flex + Papervision3D technology so that they can see each other as bitmap avatars let’s say. Now, that option I believe can be done by using the Adobe Flex messaging system which is created for multi-navigational systems (see Flex technology chapter). If we go further with that idea we can put a chatting area for people to write messages to each other. Why not to go further? What about video streaming and video chats, Flex also supports that. I know it can be slow because of the bandwidth but for instance imagine a University Campus local network which uses that kind of solutions to go around the virtual campus. Video would be also a good idea for making advertisements inside the virtual city. I already have seen an example of Papervision3D plane with an avi clip on it. Try to imagine a virtual city where people go around like in reality, companies would surely pay money for this infinite space for billboards. But what would be worth this city if the interaction with the environment wouldn’t be possible. To fix that we could give a mouse interaction with 3D objects. You think that would be not practical? During the development one of the community members had shown an example of 3D interaction which I was truly amazed with. You can find it here: http://www.lepers.info/test/pv3d/DrawBall.html . Now making a mouse click on a specific object would not be a problem and then you could open the shops web site, or display shop information in the little box attached, or a movie clip about this building. The other type of interaction would be for instance while going through the city and entering the area next to the monument or some important thing (or simple shop) and it would display detailed information about it in the specific panel. That can be done be hit test methods and intersection checking inside the DisplayObject3D class. There is even an example FlexFocus that comes with PaperVision3D source which shows how it works. Let’s go further and imagine for instance that you got really close to the entrance to the 3D model of a building, and if the plane area on the ground spotted that you are there (by checking the intersection with objects mentioned before) it could load another swf which would be responsible for insides of the building, now that sounds like fun.

I really believe that Web Services are the future for exchanging the data between applications. And in no time they are going to be very common and offer much more sophisticated data, these days they are still considered as a new thing. ESRI as far as I know has a Web Service that offers a swf file that shows the area for specific latitude and longitude values, we could use that dynamically received file to make a 2D navigational map of the area. I can still remember from my childhood how useful a small outline map in a corner while playing strategy games was. Same can be used here as a helper in the 3D navigational system. Web Services can also provide us with the information about the area, like a text about the specific building or an image, so we don’t have to host the data in our server and that is what really counts in that case. You create just the outline of the environment (polygons and models) and rest data is delivered automatically by Web Services to the view (terrain, building information, etc.), the idea of distributed objects is really inspiring. I mentioned before about the idea of gaming industry merging with the GIS market, well it will happen in near future I guarantee. For games like Sims and SimCity it will happen very soon, people just like to watch the life on the screen too much. But the real challenge will be for instance true 3D car simulators where you can go all around the globe like in reality using GIS systems, believe it will happen. I think that in the end the solution I presented can be really a basis for the bunch of ideas that popped up while doing this research and also gave you an outline how the whole 3D situation looks like if it comes to the browser. By showing this maybe we can push this world a bit forward. I know that probably there are much more fields that this solution can be used for. At the moment I’m just limited to what I was using it for in my way of thinking. So, if you find this project interesting for your purposes well, I will quote one of the Papervision3D members: “If my bullet fits your gun… shoot it!”.


By Marcin Czech