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 - 3D Rotation Animation

 
 
Old 01-10-2006   #1 (permalink)
Jared Bienz


 
 

3D Rotation Animation

I've managed to create an object in 3D Studio, export it to 3DS, run it
through ZAM 3D and display it in a <Page>. But now I'm trying to do
something I think should be absolutely simple and I've wasted more hours
on it then I'm willing to admit. I simply want an animation that makes
the model continuously rotate on an axis.

I gave the Model3DGroup an x:Name="MyModel".

ZAM 3D assigned the following default transformation (based on my 3DS
scene):

<Transform3DGroup x:Key="MyObjectTransform" >
<TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
<ScaleTransform3D ScaleX="80" ScaleY="80" ScaleZ="80"/>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D Angle="52" Axis="-1 0.14 0.1"/>
</RotateTransform3D.Rotation>
</RotateTransform3D>
<TranslateTransform3D OffsetX="0.6" OffsetY="70" OffsetZ="0"/>
</Transform3DGroup>

The transform above is referenced using Transform="{DynamicResource
MyObjectTransform}"


So, I create a DoubleAnimation and trigger it on Viewport3D.Loaded.
Range is From 0 To 360. TargetName is "MyModel", but what is
TargetProperty? I would think it shoud be something like
"Transform[2].Angle" or
"(Model3DGroup.Transform).(AxisAngleRotation3D.Angle)". Of course,
neither of these work.

I really feel there is poor documentation on property paths, when
they're allowed, how they're constructed, etc. I know that part of the
problem is I'm very new to XAML, but it just seems that the spirit of
Avalon (WPF) is to make things like rotation and animation simple.
Unless I've missed something very very obvious, I think this is far from
simple.

My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
Jared Bienz


 
 

Re: 3D Rotation Animation

Another related question:

I have defined a MeshGeometry3D and Transform3DGroup as resources so
that I can spawn multiple instances of them in the scene like so:

<Model3DGroup Transform="{DynamicResource TemplateTransform}">
<GeometryModel3D Geometry="{DynamicResource TemplateGeometry}" />
</Model3DGroup>

I would like every instance of the 'TemplateGeometry' in the scene to
rotate. Can I assign the animation to the 'TemplateTransform' object and
have it applied to all instances? Or do I have to manually set an
animation on each instance?

According to viliescus last post, I think I can animate the shared
transform. But it looks like I need to place the trigger elsewhere so
that the name of the transform can be found (it is not in scope for
Viewport3D.Loaded). I'm having troubles learning about this name scope
but I'll keep searching.

Thanks
My System SpecsSystem Spec
Old 01-10-2006   #3 (permalink)
Jared Bienz


 
 

Re: 3D Rotation Animation

Any chance someone from MS can answer this? I have moved the transform
into a ResourceDictionary under Viewport3D.Resources but I am still
getting the error that the name cannot be found in the name scope of the
viewport.
My System SpecsSystem Spec
Old 01-10-2006   #4 (permalink)
Jared Bienz


 
 

Re: 3D Rotation Animation

Thank you David. It has been sent to your address. Let me know if you
don't get it.
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
rotation distortion Vista music pictures video
Automatic photo rotation? Vista music pictures video
screen rotation Vista General
Tecra M4 Screen Rotation. Vista hardware & devices


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