I am searching for a way to implement a water effect for in WPF like the one demonstrated on Lee Whitney's blog. This is for a full screen application so it should rely on shaders in order to utilize the GPU.
So far I have found the following methods & code examples:
WPF: This example does not live up to the requirements of
simulating drops of water, as it renders one single water ripple.
However it performs lightning fast as it uses shaders. I tried to add
several layers of ripples on top of each other but that did not look
right either.
Silverlight: This implementation offers the right features in
terms of simulating drops and their interaction as opposed to
rendering one ripple. However it does not perform well at all. I
suspect the example may not use the GPU at all but calculates every
pixel of the bitmap in software. I may have misunderstood the code
though as I am not strong in silverlight
[C++]: This example is similar to the silverlight example. It
performs a lot faster, but when scaled to a full HD size it gets too
slow. As with silverlight it appears to me that the example is
relying heavily on software calculations.
Windows Surface appear to have a similar effect implement in their
pond application. God knows how they did it.
Any ideas?
Take a look at this amazing lib. http://perspectivefx.codeplex.com/
Not really an answer, but look at this WPF Shaders
I'm learning too, and found this resource, hope this helps you.
Related
I'm trying to use FluidMoveBehaviour from the Dynamic Layout and Styles presentation at MIX 2010 in combination with MVVM (Caliburn.Micro).
The Master/Detail behavior is what I'm after. It isn't working and I would like to find out what's happening behind the curtains to see why Silverlight is not picking it up.
How can I debug the FluidMoveBehaviour?
Because the FluidMoveBehavior is so encapsulated and because the source code is not available, the only recourse when it is not working as expected is trial and error. Even worse, the feature is conceptually very opaque and the implications of what will happen if you change the settings are not at all clear initially.
Your best hope of getting the master/detail scenario to work (the most complicated one) is to create a very small example, get it working, and gradually reintroduce your code until it is fully integrated.
There are other working examples besides the MIX10 demo. I recommend reading and re-reading Mike Taulty's explanation until the feature is less opaque:
Blend Bits 14: Fluid Movement
Notice how he approaches the problem gradually and with little test programs. That is how to avoid wasting time trying to use a "black box" feature.
Anyway, the promise of "effortless interactivity" might ring rather hollow right about now. It is perhaps a lesson for other behavior developers: how will the clients debug it when it isn't working? The answer: give them the tools, like configurable logging. When it's not working, the silence is unbearable.
I want to utilise the 3dwall feature of cooliris, the physics effects of the icons in bumtop to design an application for making the image viewing more intuitive and interactive. I dont want to use flash as it would slow down the speed for interaction on desktop. PLease could someone tell me about
choice of
1.) physics engine - physx or ODE for the physics effects like bumtop
2.) opengl or direct 3d
3.) WPF(windows presentation Format) - what is its use
Flash with Actionscript 3 is the best for such things. Checkout http://www.flashloaded.com/flashcomponents/3dwall/ for an illustration of CoolIris type application in Flash.
WPF is great for building application like this. VS2008 doesn't provide solution for good visualization,
but you can always call for help Blend included in MS Expression. There you can select silverlight project for building fancy web applications (silverlight.net/showcase). At start, combining different controls and trigger events to start simulations is entirely included. Yes, inside Blend you can set frame keys like in flash.
It's certainly a lots of effort, but it don't need to be. Recently new set of WIN RadControls for WinForms and Silverlight are issued and they look, believe me, excellent. You can look for Run Demo program which shows example of using these controls. Under section Integration, Carousel and others you will see what you looking for and beyound.
I am playing with DxScene and VxScene:
http://www.ksdev.com/dxscene/index.html
It looks very nice and powerful: 3d accelerated vector graphics, cross plaform, nice effects, many 2d GUI controls (vector based), good scaling, transparency, rotating (x, y, z), 3d models, etc. Even with many effects, the CPU stays very low (0%)!
http://www.ksdev.com/dxscene/snapshot/screen0.jpeg
But can it be seen as a good WPF alternative for Delphi?
And does anyone use it instead of normal Delphi VCL?
Yes, I am using it now in a new project and intend to use it for all future projects.
It's indeed extremely powerful and versatile. It does consume SVG and even XAML, among many other formats, so you could consider it as a Win32 API WPF alternative. Believe me, I've been looking for one for ages, and this is it for me.
Current drawback: lack of documentation. You have to learn it all from the examples and by asking questions in their forum. Not ideal, but it can only get better!
All it needs is more users, and it'll grow into something wonderful.
I'm not sure, but it looks like it's the GUI base for FlStudio
It looks very promising, the effects are very good, in the past years I have seen it's being enhanced constantly. I have check it the second time today (only the compiled demo), it seems that many new controls are added, I like the "expander" expandable panel.
It's very promising, I'm consider using it in the future, I'm not sure if the new version has fix or not, but when the first time I checked the trial version, it lacks of documentation...
Very good effect and promising though!
You might find this article interesting, it explains how to use the DirectWrite and Direct2D features in Delphi 2010, it seems to be rather simple, and is well explained here: Delphi 2010 DirectWrite "Hello World" Example [1].
Screenshot from the article showing the result.
[1] http://blogs.embarcadero.com/pawelglowacki/2009/12/14/38872
I’m working on creating a full-screen 3-D app (based on Johnny Lee's Wii head tracking app) with some augmented reality features, and it seems that WPF is too slow to render even the simple models I’m using at a reasonable frame rate. I think the problem is that I need to change both the view and projection of the camera on just about every frame, because of the nature of the app (it uses a web cam to track your face, and uses that data to move the camera around and change its perspective).
I've spent a lot of time trying to narrow down the problem, and it's definitely related to the graphics, and not the speed of the head-tracking API that I'm using. Also, I recreated the app in XNA, and it seems to work fine there (28 FPS versus 9 in WPF). Finally, when I remove the "walls" or make the window much smaller (say, 800 x 600), WPF's performance greatly improves, which makes me think that the bottleneck is the graphics calculations.
As a result, I need to either find a new graphics back-end to work with, or find a way to make WPF much faster for this app. I’m mostly looking at DirectX and XNA, and possibly OpenGL. Any recommendations on which of these APIs would be best to use for this app in .NET? Or alternatively, any idea what I'm doing wrong in WPF that's slowing things down?
I've not done enough with 3D in WPF to be able to say what could be causing the slowness, but I did notice that it's model datastructure isn't very efficient. While this might not be the cause it could be symptomatic of general slowness to the whole pipeline.
One thing that does spring to mind is that WPF is rendering the scene in software rather than using the hardware acceleration on the graphics card. The fact that you get better performance (though you don't say how much better) with a smaller window.
If you remove any textures from your model do you get better performance too?
I don't think it really matters whether you go for Direct3D or OpenGL - virtually all modern cards support them equally well. XNA is the obvious choice if you're sticking with .NET as it's integrated into Visual Studio - even the Express edition.
I would check out SlimDX, a much thinner DirectX wrapper than XNA or WPF
The problem with changing the projection on every frame is that API's like XNA/WPF werent designed with this in mind, so were optimized to have projection set once in the initialization phase, then not again.
I would suggest a hybrid choice here: use WPF for what its good at (Windows UI, composition, etc) and use XNA to render the 3D. There are samples out there that demonstrates combining XNA with WinForms. It should be possible to do the same "trick" to render XNA onto surfaces in WPF.
Update: there are supposedly issues with using XNA directly with WPF. This thread indicates that using XNA with WinForms and then hosting the WinForms control in WPF is a workaround to these issues. I've not tested this myself though (yet).
My company is just starting to look at using WPF for migrating all of our 10 year old business applications. These applications will most of the time be running on computers that have limited/old hardware. We are now a little worried that the hardware might be too limited for using WPF.
We have installed Family.Show (http://www.vertigo.com/familyshow.aspx) on an basic older computer and that seems to run ok. But we would like know what your experiences with WPF on older hardware is? Anyone out there willing to share some experiences with us?
I would add several things:
The first is, as Stu said, it really depends on what you are doing. In particular, we have found a noticeable difference between WPF 2D and WPF 3D. If you are doing any WPF 3D stuff at all, your performance is highly dependent on the quality of the video card (see the Graphic Rendering Tiers link already mentioned). In particular, we released a WPF 3D feature in April of this year, and it really only worked smoothly on Tier 2 hardware.
Second, I would point you to Jossef Goldberg's blog. It has a wealth of information on WPF performance related items.
Third, I would grab and utilize the WPFPerf tools. They were recently updated actually. Jossef's blog post will point you in the right direction there as well.
Fourth, take advantage of virtualization wherever you can.
Finally, I would recommend monitoring performance all the way through the development life cycle. I think the story goes that originally the Blend team did not evaluate performance (for their first release) till closer to the end, and it made solving the problem much more difficult.
Update: There is another StackOverflow post on this subject. Just wanted to point others to it.
WPF apps will generally run no slower than their equivalents using other technologies. In other words, performance depends on what you're doing. If you have a basic app with some simple data entry controls and a grid or two then it'll be a lot less demanding than an app that has animated custom controls with overlaid video, etc.
You should also bear in mind that you must have at least XP SP2 to install WPF, which sets a reasonable hardware baseline anyway.
In summary you should have no problems running a WPF app on older hardware as long as you are sensible with the frills. Given WPF's templated controls it's also fairly trivial to test for a basic level of client performance at runtime (see Graphics Rendering Tiers) and only enable more advanced features on suitable hardware.