Page 1 of 1

Cessna Gauges

Posted: 06 May 2014, 21:20
by sfernandez
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 ;)

Re: Cessna Gauges

Posted: 20 Jul 2014, 04:33
by elecman
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?

Re: Cessna Gauges

Posted: 22 Jul 2014, 10:36
by sfernandez
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.

Re: Cessna Gauges

Posted: 24 Jul 2014, 06:28
by elecman
Thanks for the info. That definitely helps :-)