Welcome to MSDN Blogs Sign in | Join | Help

Lester's WPF blog


Simple, easy & beautiful

News

Rotating 3D earth in WPF

3D stuff in WPF is cool aint it? Last week I was playing around with some more 3D stuff and I came up with this rotating globe.

The code is attached along with the pics of earth and saturn :). It basically consists of a mesh on which the pic is used as a DiffuseMaterial brush. The rotation is performed by animating the angle on the rotationTransform. Mess around with the code and you could come up with some nice configurations :)

Posted: Monday, June 05, 2006 5:28 PM by llester
Attachment(s): rotating earth.zip

Comments

Mathias said:

How did you generate the mesh?
# June 5, 2006 3:04 PM

llester said:

Hi Mathias,

I used Zam3D.

Following is a more comprehensive ans from David.

"You best bet will probably be Electric Rain's Zam3D - a full 3D modelling application designed specifically for WPF which natively outputs xaml.  It can also convert .3ds files to xaml.

If you're only concerned with file conversion, you can check out Microsoft Expression "Sparkle Interactive Designer", which can convert .obj files to xaml.  Thomas Goddard wrote a xaml eporter for Maya.  And Daniel Lehenbauer wrote a xaml exporter for Blender."

The corresponding thread is:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=448247&SiteID=1
# June 5, 2006 4:22 PM

Christian Weyer said:

Hm, should this demo be working on June CTP?
I get this error when running in XAMLPad:

---
Cannot convert string 'C:\temp\earth.jpg' in attribute 'ImageSource' to object of type 'System.Windows.Media.ImageSource'. Mismatched versions of PresentationCore.dll, Milcore.dll, WindowsCodecs.dll, or D3d9.dll. Check that these DLLs come from the same source.  Error at object 'System.Windows.Media.ImageBrush', Line 7 Position 33.
---

Thx,
Christian
# July 16, 2006 5:01 AM

llester said:

that must be a mismatch in dlls... pls reinstall .NET 3.0

# October 30, 2006 8:04 PM
New Comments to this post are disabled
Page view tracker