Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Rendering Thread & 3d animation

 
 
Old 07-05-2006   #1 (permalink)
Lois Lacroux


 
 

Rendering Thread & 3d animation

Hello,
has anybody tried to animate objects (actually I'm trying to animate objects
in 3d viewport) WITHOUT using the WPF animation system?

I can't use the animation system because I'm trying to represents the
evolution of a dynamic simulation. In the past, with GL or DirectX I was able
to call a Render, says each hundred loops of simulation. But now I seem to be
stuck with the WPF rendering system where I can't force the render wich is,
from what I understood running in its own thread...

I've made some tries with VisualTarget.Rendering event but it's called only
when the rendering has been done and I've no way to force this rendering so
it seems to be useless in my case...

Is there any way to force the rendering based on a state inside the client
Application?

Thanks,

Lois



My System SpecsSystem Spec
Old 07-06-2006   #2 (permalink)
Florian Kruesch


 
 

Re: Rendering Thread & 3d animation

The CompositionTarget.Rendering event is probably what you're looking for...

Florian
My System SpecsSystem Spec
Old 07-06-2006   #3 (permalink)
Marcus


 
 

Re: Rendering Thread & 3d animation

Hi Lois,

I know that Kevin Moore coded a Panel that uses the Rendering event
to "animate" the position of the Panel items...

This is availlable in the "Bag'O'Tricks" he generated... You can
find it in his blog!!!

http://blogs.msdn.com/okoboji/archiv...14/631433.aspx

Hope this will help you!

Lois Lacroux wrote:
> Hello,
> has anybody tried to animate objects (actually I'm trying to animate objects
> in 3d viewport) WITHOUT using the WPF animation system?
>
> I can't use the animation system because I'm trying to represents the
> evolution of a dynamic simulation. In the past, with GL or DirectX I was able
> to call a Render, says each hundred loops of simulation. But now I seem to be
> stuck with the WPF rendering system where I can't force the render wich is,
> from what I understood running in its own thread...
>
> I've made some tries with VisualTarget.Rendering event but it's called only
> when the rendering has been done and I've no way to force this rendering so
> it seems to be useless in my case...
>
> Is there any way to force the rendering based on a state inside the client
> Application?
>
> Thanks,
>
> Lois


My System SpecsSystem Spec
Old 07-07-2006   #4 (permalink)
Ed Maia [MSFT]


 
 

Re: Rendering Thread & 3d animation

There are a couple of other options, each with its limitation:

1) Use CompositionTarget.Rendering: this gives you a callback before each
frame is rendered. The drawback is this will be called at maximum
framerate. You can choose to ignore renders if you don't need to change any
objects.

2) Use RenderTargetBitmap, and render a Visual tree to that bitmap. The
drawback is this is software only, so it may not be very performant for 3D
objects.

3) Create your own object that derives from UIElement, and call
InvalidateVisual() whenever you want a render to occur. This will
eventually call OnRender() for the appropriate elements on your Visual tree.
This would also have the benefit of only invalidating portions of the tree
that have changed.

Hope this helps.

Thanks,
Ed Maia
[WPF PM]

"Marcus" <larochem@gmail.com> wrote in message
news:1152191194.182115.72670@j8g2000cwa.googlegroups.com...
> Hi Lois,
>
> I know that Kevin Moore coded a Panel that uses the Rendering event
> to "animate" the position of the Panel items...
>
> This is availlable in the "Bag'O'Tricks" he generated... You can
> find it in his blog!!!
>
> http://blogs.msdn.com/okoboji/archiv...14/631433.aspx
>
> Hope this will help you!
>
> Lois Lacroux wrote:
>> Hello,
>> has anybody tried to animate objects (actually I'm trying to animate
>> objects
>> in 3d viewport) WITHOUT using the WPF animation system?
>>
>> I can't use the animation system because I'm trying to represents the
>> evolution of a dynamic simulation. In the past, with GL or DirectX I was
>> able
>> to call a Render, says each hundred loops of simulation. But now I seem
>> to be
>> stuck with the WPF rendering system where I can't force the render wich
>> is,
>> from what I understood running in its own thread...
>>
>> I've made some tries with VisualTarget.Rendering event but it's called
>> only
>> when the rendering has been done and I've no way to force this rendering
>> so
>> it seems to be useless in my case...
>>
>> Is there any way to force the rendering based on a state inside the
>> client
>> Application?
>>
>> Thanks,
>>
>> Lois

>



My System SpecsSystem Spec
Old 07-10-2006   #5 (permalink)
=?Utf-8?B?VGhlUkhvZ3Vl?=


 
 

RE: Rendering Thread & 3d animation

I have a sample that does 3D z-ordering using the VisualTarget.Rendering at
http://www.therhogue.com/WinFX - it's the collageview sample.

It looks like Ed, gave you some other options too.

"Lois Lacroux" wrote:

> Hello,
> has anybody tried to animate objects (actually I'm trying to animate objects
> in 3d viewport) WITHOUT using the WPF animation system?
>
> I can't use the animation system because I'm trying to represents the
> evolution of a dynamic simulation. In the past, with GL or DirectX I was able
> to call a Render, says each hundred loops of simulation. But now I seem to be
> stuck with the WPF rendering system where I can't force the render wich is,
> from what I understood running in its own thread...
>
> I've made some tries with VisualTarget.Rendering event but it's called only
> when the rendering has been done and I've no way to force this rendering so
> it seems to be useless in my case...
>
> Is there any way to force the rendering based on a state inside the client
> Application?
>
> Thanks,
>
> Lois
>
>

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
How do the current thread get thread notification of OS intruption .NET General
Start a new thread from an existing thread, which was started from atimer .NET General
consent.exe not rendering Vista security
games Rendering everywhere! Vista Games
Page Rendering Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46