User avatar
sfernandez
Site Admin
Topic Author
Posts: 3008
Joined: 22 Dec 2011, 19:20

Cessna Gauges

06 May 2014, 21:20

This XAML was created for the Unity promotional video shown in our web:



All the gauges are rendered to a RenderTexture, then they are used in one of the plane cockpit mesh materials with the appropriate texture mapping. Here is a screenshot of the texture:
gauges-shot.png
Find the sources attached to this post ;)
Attachments
Gauges.zip
(53.59 KiB) Downloaded 691 times
 
elecman
Posts: 90
Joined: 20 Jul 2014, 04:28

Re: Cessna Gauges

20 Jul 2014, 04:33

Impressive!

Some questions:
-What editor did you use to create those gauges?
-How do you set the pivot point of a needle?
-Can you post the source which sets the needle positions?
 
User avatar
sfernandez
Site Admin
Topic Author
Posts: 3008
Joined: 22 Dec 2011, 19:20

Re: Cessna Gauges

22 Jul 2014, 10:36

Impressive!
Thanks :D
-What editor did you use to create those gauges?
These gauges were created by an artist using Adobe Illustrator, imported to Blend, then adjusted and optimized there so they can be animated.
-How do you set the pivot point of a needle?
Every UI element defines a RenderTransformOrigin point and a RenderTransform transformation matrix. With these 2 properties you can transform any UI element as you wish. With Blend you can adjust the RenderTransformOrigin visually to the pivot position you want.
-Can you post the source which sets the needle positions?
The xaml contains all the animations that are used to create the video. You can change the needle rotation using a similar animation:
<Storyboard x:Key="EncodingAnim" RepeatBehavior="Forever">
    <DoubleAnimationUsingKeyFrames
      Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
      Storyboard.TargetName="E_Arrow10">
        <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="135">
            <EasingDoubleKeyFrame.EasingFunction>
                <SineEase EasingMode="EaseIn"/>
            </EasingDoubleKeyFrame.EasingFunction>
        </EasingDoubleKeyFrame>
    </DoubleAnimationUsingKeyFrames>
</Storyboard>
or by setting the value in the code:
Noesis.UIElement arrow = FindName<Noesis.UIElement>("E_Arrow10");
Noesis.RotateTransform t = arrow.GetRenderTransform().As<Noesis.RotateTransform>();
t.SetAngle(135.0f);
Hope this helps.
 
elecman
Posts: 90
Joined: 20 Jul 2014, 04:28

Re: Cessna Gauges

24 Jul 2014, 06:28

Thanks for the info. That definitely helps :-)

Who is online

Users browsing this forum: No registered users and 4 guests