Welcome to another installment about the development of 3D onto Bing Maps Silverlight control (University of Otago - Interactive Campus Map, iMap)
Recently the performance of iMap has become rather slow, which an increase in displayed elements.
I have started to improve performance of loading/usability by removing objects (buildings) from the visual tree if they do not fit in the current viewable area, then adding them back in when they are within the viewable area.
One performance downside of this is that the adding and removing of a large number of UIElements form the visual tree such as when going from viewing the whole of the Dunedin campus to viewing the Invercargill campus is slow and the application freezes and the view does not transition to the new location it just jumps.
There may be some background way to remove these items without the performance loss, which is something I will look into.
Thank you for the positive comments we have received for the application and please if you have any please use the "iMap Feedback" button at the bottom left of the application to send us any feedback.
Duncan
Monday, 9 August 2010
Tuesday, 19 January 2010
Bing Maps with 3D Buildings: Some Detail
Hello to all whom are interested.
I was asked if I could expalin how I setup the binding of psudo 3D (3D transofrmed to 2D) buildings to the Bing Maps Silverlight control.
Here is a basic overview, I will do into more detail later.
On the map I have a Canvas bound to a LocationRect which is at the Longitude/Latitude bounds of each building.
To handle scaling I have setup handling of the LayoutUpdated event on the Canvas, passing in the Canvas as a paramater, using an EventHandler Delegate, since the LayoutUpdated event does not pass in a sender object.
In this handler I get the Transform from the canvas to the Map control so I can transform the position of the Canavs to the position on the screen, this is where I set the Canvas.Left and Canvas.Top onf the Model Canvas to the same screen position.
Then I also get the ActualWidth and ActualHeight of the Canvas on the Map control and use a ScaleTransform to scale up the Models Canvas.
Then Model Canvas is added to a Canvas that sits over the Map control (in the same clip region as the map so the models disapear is their base is not visible on the Map.
The model canvas contains the psudo 3D object to display on it.
In the next post I will provide more detail on how to convert 3D into 2D space, and also how to speed up transofrmation calcullations by only rendering updating visible objects.
I was asked if I could expalin how I setup the binding of psudo 3D (3D transofrmed to 2D) buildings to the Bing Maps Silverlight control.
Here is a basic overview, I will do into more detail later.
On the map I have a Canvas bound to a LocationRect which is at the Longitude/Latitude bounds of each building.
To handle scaling I have setup handling of the LayoutUpdated event on the Canvas, passing in the Canvas as a paramater, using an EventHandler Delegate, since the LayoutUpdated event does not pass in a sender object.
In this handler I get the Transform from the canvas to the Map control so I can transform the position of the Canavs to the position on the screen, this is where I set the Canvas.Left and Canvas.Top onf the Model Canvas to the same screen position.
Then I also get the ActualWidth and ActualHeight of the Canvas on the Map control and use a ScaleTransform to scale up the Models Canvas.
Then Model Canvas is added to a Canvas that sits over the Map control (in the same clip region as the map so the models disapear is their base is not visible on the Map.
The model canvas contains the psudo 3D object to display on it.
In the next post I will provide more detail on how to convert 3D into 2D space, and also how to speed up transofrmation calcullations by only rendering updating visible objects.
Labels:
3D,
Bing Maps,
imap,
SiIverlight,
Tutorial
Bing Maps Silverlight with 3D Buildings
I have been working on how to get 3D Buildings only the Bing Maps Silverlight control.
Many people believe this to be impossible (or at least not possible for many years)
I have now worked out how this can be achieved. Have a look at the image below.
This is from the University of Otago iMap Campus map http://www.propserv.otago.ac.nz/iMap/
To access this view leave the "Bing Maps View" radio button selected and ckick on "Dunedin" in the menu
There is also a pitch control up the top right
When you mouse over the centre you will get up and down arrows
Click these to adjust the pitch.
Please let me know what you think
Monday, 23 November 2009
Silverlight in General & Silverlight 4 Beta
I was both surprised and impressed to see Silverlight 4 Beta released at PDC09.
I have been highly impressed with the development speed and features of Silverlight.
As you will see from my other posts I have been developing with Silverlight since Silverlight 1 where we just have JavaScript as a client programming language.
We currently run all of our web facing applications with Silverlight 3.
As we are serving external users we are still maintaining a "static" (as in not evolving) ASP.NET version of some of our applications such as the Web Cameras so that users don't miss out because they don't want to, or, due to IT policies, they cannot install Silverlight.
I am impressed with users visiting from countries other than New Zealand, and major corporations, as they, in most cases, have Silverlight already installed and can enjoy the latest fully functional version of our web applications.
There are many people whom refuse to install Silverlight purely because it is a Microsoft product, we have to respect this decision, just like people still wanting to use IE 6 :-)
Looking at the capabilities of Silverlight 4 Beta I look forward to upgrading our applications to take advantage of the new capabilities.
Congrats Microsoft Silverlight Team
I have been highly impressed with the development speed and features of Silverlight.
As you will see from my other posts I have been developing with Silverlight since Silverlight 1 where we just have JavaScript as a client programming language.
We currently run all of our web facing applications with Silverlight 3.
As we are serving external users we are still maintaining a "static" (as in not evolving) ASP.NET version of some of our applications such as the Web Cameras so that users don't miss out because they don't want to, or, due to IT policies, they cannot install Silverlight.
I am impressed with users visiting from countries other than New Zealand, and major corporations, as they, in most cases, have Silverlight already installed and can enjoy the latest fully functional version of our web applications.
There are many people whom refuse to install Silverlight purely because it is a Microsoft product, we have to respect this decision, just like people still wanting to use IE 6 :-)
Looking at the capabilities of Silverlight 4 Beta I look forward to upgrading our applications to take advantage of the new capabilities.
Congrats Microsoft Silverlight Team
Thursday, 22 January 2009
iMap going Live
The 3D campus map Silverlight website I have been working on is going live tomorrow with a story in the staff buletin.
The website has been named "iMap" meaning interactive map.
I have moved to writing my own 3D engine as it allowed access to all the objects I require and I can quickly and easily change the colour of models as compared to Kit 3D which can take a while to change.
If you have the appropriate access rights the building floor plans can be viewed in full 3D you can rotate it and view the building as a full stacked building.
If you would like to view the iMap then goto http://www.propserv.otago.ac.nz/web/iMap
Let me know what you think by using the iMap feedback link at the bottom left of the website.
The website has been named "iMap" meaning interactive map.
I have moved to writing my own 3D engine as it allowed access to all the objects I require and I can quickly and easily change the colour of models as compared to Kit 3D which can take a while to change.
If you have the appropriate access rights the building floor plans can be viewed in full 3D you can rotate it and view the building as a full stacked building.
If you would like to view the iMap then goto http://www.propserv.otago.ac.nz/web/iMap
Let me know what you think by using the iMap feedback link at the bottom left of the website.
Friday, 8 August 2008
Silverlight 3D using Kit3D
I have been continuing my work on our campus plans website (Silverlight application)
For the display of the campus I have decides to move from the pseudo 3D version to an actual 3D plan.
I have chosen Kit3D by Mark Dawson http://www.markdawson.org/Kit3D
Here is the current result:

I have keys setup to navigate the 3D model, e.g. left arrow to rotate left
One issue this I am facing with Kit3D is that when I move the camera in closer to the "ground" some triangles/faces appear in front of the camera so you cannot see the models that should be in front of you.
An advantage of having the campus in 3d is the future ability to send the camera through the campus, between the buildings, to perhaps show how to get from one building to another, or just to show a virtual tour of the campus.
There are plenty of possibilities which is very exciting, and I'm really enjoying the task.
For the display of the campus I have decides to move from the pseudo 3D version to an actual 3D plan.
I have chosen Kit3D by Mark Dawson http://www.markdawson.org/Kit3D
Here is the current result:

I have keys setup to navigate the 3D model, e.g. left arrow to rotate left
One issue this I am facing with Kit3D is that when I move the camera in closer to the "ground" some triangles/faces appear in front of the camera so you cannot see the models that should be in front of you.
An advantage of having the campus in 3d is the future ability to send the camera through the campus, between the buildings, to perhaps show how to get from one building to another, or just to show a virtual tour of the campus.
There are plenty of possibilities which is very exciting, and I'm really enjoying the task.
Friday, 13 June 2008
Silverlight 2 Beta 2 Experiences
I have been working on converting the website I mentioned with regard to Silverlight 1.0 over to Silverlight 2 Beta 2.
This task took some time as I had to convert Javacript to VB.net.
Another difficult element was getting webservies to work, and then get them to work once published and ensure that it is all still working.
I have also now got zooming on the center of the view working correctly, by scaling on the thumbnail and projecting the view to the main view.
I am using animations to make any movement smooth and see where you are moving from/to, such as you can click on the thumbnail and the view will move to be centered on the point you clicked, the main veiw and thumbnail move at the same relaitve rate, I think this looks quite cool.
After seeing Nigel Parker's Unplugged Mix recap in Dunedin a few weeks ago I became quite interested in where silverlight was going and made this move to upgrade the website.
One thing that i have found great with Silverlight 2 is the incusion of textboxes and buttons, this has meant that I nolonger need to overlay HTML controls. I had to create my own menu control wich was actually quite easy, just using nested canvas.
I have also been creating "Dialog boxes" borders with controls in them in the center of the Silverlight plugin with a background that covers everything but is not fully opaque which looks quite snazzy, this is similar to Scott Guthrie's Digg example of the item view.
Another cool animation part is the ability to search for a building or department and have the view center on the building or center of the buildings that the department are in then zoom in or out so the bounds fill the view as best as possible.
I am also setting up user management to control what particular users/computer can see if they are viewing as public ore are logged in.
Overall i am quite impressed with Silverlight 2 Beta 2, and look foward to the final release later this year which should coinside with the final relase of the website, we are looking at getting public access running in the next few weeks for receiving feedback on what people would like to see and do with the website.
This task took some time as I had to convert Javacript to VB.net.
Another difficult element was getting webservies to work, and then get them to work once published and ensure that it is all still working.
I have also now got zooming on the center of the view working correctly, by scaling on the thumbnail and projecting the view to the main view.
I am using animations to make any movement smooth and see where you are moving from/to, such as you can click on the thumbnail and the view will move to be centered on the point you clicked, the main veiw and thumbnail move at the same relaitve rate, I think this looks quite cool.
After seeing Nigel Parker's Unplugged Mix recap in Dunedin a few weeks ago I became quite interested in where silverlight was going and made this move to upgrade the website.
One thing that i have found great with Silverlight 2 is the incusion of textboxes and buttons, this has meant that I nolonger need to overlay HTML controls. I had to create my own menu control wich was actually quite easy, just using nested canvas.
I have also been creating "Dialog boxes" borders with controls in them in the center of the Silverlight plugin with a background that covers everything but is not fully opaque which looks quite snazzy, this is similar to Scott Guthrie's Digg example of the item view.
Another cool animation part is the ability to search for a building or department and have the view center on the building or center of the buildings that the department are in then zoom in or out so the bounds fill the view as best as possible.
I am also setting up user management to control what particular users/computer can see if they are viewing as public ore are logged in.
Overall i am quite impressed with Silverlight 2 Beta 2, and look foward to the final release later this year which should coinside with the final relase of the website, we are looking at getting public access running in the next few weeks for receiving feedback on what people would like to see and do with the website.
Subscribe to:
Posts (Atom)