![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
| | #4 (permalink) |
| | 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 Specs![]() |
| 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 | |||