Where can I find information about creating 3D controls in WPF? - wpf

I am about to start to make the interface for a game in WPF / Silverlight. I'd like it to have a nice look all in 3 dimensions. Can you point me to some good resources, tutorials, books... on how to develop real 3D controls, like Buttons and such?

Charles Petzold's Book on WPF 3D Applications
WPF3D Team Blog
Codegod tutorial on WPF 3D
12 part series on Eric Sink's Blog
A couple of interesting resources linked here
More specific to controls:
Channel9 video on the topic of WPF 3D View Controls.
2D Controls on 3D Objects.
Thriple, a library of 3D controls and panels, for use in WPF applications.
Perspective library use case.

Related

Porting Solar Wind XNA example to Helix 3d WPF

I am looking to port the Silverlight 5 / XNA example Solar Wind to WPF using the Helix3d toolkit.
The Solar Wind example is here:
http://code.msdn.microsoft.com/Solar-Wind-3D-Sample-4cb56170
I watched the video demonstrating the example and one of the great features is that the 3d geometry is expressed as XML and can be changed at runtime. This makes it possible for example to change terrain height or color at runtime based on sets of data.
I have been looking at the Helix 3d toolkit which looks amazing.
It can be found at:
http://helixtoolkit.codeplex.com/
I am aware that 3d geometry can be expressed as XAML in the Helix 3d toolkit. Is it possible to change the Geometry dynamically at runtime to support similar behaviour as the Solar Wind example does in XNA?
#user1306322 that just looks like a plug for Unity3d. Unity is a great engine, but I was suggested Helix 3d because it is built to integrate with WPF applications.
A beter suggestion in terms of porting the Solar Winds example would actually be Monogame, because it fully (well almost) supports the XNA framework, but supports DirectX 11 and multi platforms.

How to Export Viewport3D to a 2d Image file?

I'm using 3d in WPF and want to save it to a 2d image file, kind of screen shot.
What's the best way to do that ?
In his 12 days of WPF 3D series, Eric Sink has a nice post about Rendering a WPF 3D scene to a Bitmap. Also of interest might be the post on Printing support.
And for any WPF 3D user, I highly recommend the (open-source) Helix 3D Toolkit, which has several importers and exporters to different formats, and is an essential WPF 3D companion library.

Is silverlight better or wpf for graphics, 3d?

I learning wpf/silverlight currently. I want to ask which one of them is better for graphics, 3d, ... ?
People say "Silverlight is a subset of WPF" -- what they mean is that the programming model is the same (code + XAML), but Silverlight generally has a smaller API / less features than WPF.
I think a good example would be creating a reflection. In WPF you could use a VisualBrush, but Silverlight doesn't support it. Still you can create the same effect by creating a 2nd transformed element. You can pretty much acomplish the same task in both, although for Silverlight you may have to do some processing tasks on the server.
The choice of platform depends more on whether you want to target web deployment or not and possibly performance.
3D isn't implemented in Silverlight 4 (though there are 3D libraries out there). 3D will be part of Silverlight 5. (Beta coming soon, probably at MIX, and to be released this year.)
i would sugest wpf in WPF you have all the Viewport sutff where you can do real 3d, In Silverlight you have PlaneTransformation but it is not close to real 3d
WPF 3d tutorial
The deal is more deeper as I understand.
We will speak about WPF and Silverlight 5. There are two mechanisms of 3D Graphics. Before WPF it was a single one - so named pipeline graphics. It includes DirectX, OpenGL and multiple derivative and independent realizations (XNA from DirectX, for example). Although WPF is based internally on DirectX it realizes absolutely different conception of smart graphics. What is the difference for a pipeline and smart mechanism? The pipeline mechanism consists of infinity loop of drawing objects - typically primitives like vertex, triangles. It works by initialization of so named infinity loop by calling something like OnDraw/ReDraw method.
WPF does not use ReDraw and does not draw anything until we directly detect it. It is single correct way to use it. Therefore WPF allows to draw UI Elements with internal support of hundreds events, methods and full freedom of management (like usual WPF control - textbox, for example). (Helix 3D is good library for easy way to WPF 3D) And vice versa, Silverlight 5 has some API of XNA graphics - pipeline way without UIElement support for 3D objects.
There is Kit3D library http://kit3d.codeplex.com/ as very good idea for smart graphic realization for Silverlight and there are many other realizations (Balder, Babylon) on pipeline mechanism. If you are interesting to code an application like web 3D Game - choose pipeline Silverlight 3D graphics, if you are interesting about smart 3D applications - choose WPF 3D.
Author of WPF 3D CAE system TIMO Structural.

WPF/silverlight - Is there any simple 2D Game/Physics engine recommend?

I would start to write WPF and Silverlight 2D game, i would to find some game engine library,the only one i found on google is FarseerPhysics ( http://www.codeplex.com/FarseerPhysics) and seem quite good. But is there any other recommend for starter?
And one more question is is it any alternate software of expression blend for create Silverlight UI?
See also the Physics Helper for Silverlight, WPF, Blend, and Farseer.
Kaxaml is a lightweight XAML editor with split view.

Silverlight - Perspective 3D

I am considering using Silverlight for a project I am working on. This project will need to show a 3-Dimensional cube. Is this possible in Silverlight?
I see a lot of examples that a basically 2-sides of one item. Kind of like a sheet of paper. Is this what "perspective" 3D is? How is perspective 3D different than normal 3D?
Thank you!
You should look at Kit3D for Silverlight. Someone also created a silverlight3d.com site, but it current just has three reference articles and a link to Kit3D.
It is also possible to emulate 3D as demonstrated by this MSDN article.
The feature that was added in Silverlight 3 is referred to as "perspective 3D" to avoid confusion that might arise with someone expecting it be some kind of full scale 3d rendering API (like DirectX or OpenGl etc.) or something like WPFs UIElement3D.
The "perspective 3D" feature in Silverlight allows you to take any regular 2D UIElement and rotate it in 3D dimensions; you can think of it like a more powerful RenderTransform. There are two ways of setting a "Projection" on a UIElement, with a PlaneProjection (simple) or with a Matrix3DProjection (more complex).
You could certainly use this feature to create a 3D cube, where each face of the cube is a UIElement with a Projection applied to it. However you would not use this feature to create something that required complex 3d models such as a 3D game.

Resources