How to create a vertical counter like a hobbs counter

Help and techniques for creating Air Manager Instrument Graphics

Moderators: Ralph, russ

Post Reply
Message
Author
P51Eagle
Posts: 18
Joined: Sun Jan 06, 2019 9:32 pm

How to create a vertical counter like a hobbs counter

#1 Post by P51Eagle » Mon Jul 13, 2020 10:21 pm

Hi All,

So I just jumped into creating a gauge with skinman and very cool. But I was wondering how one could make a counter object like a hobbs counter. I'm pretty sure I've got the scripting part, but not sure how to tie in the graphics part.

What would the best practice from a graphics perspective be?

I've included an example of my gauge so you can see the counters. The vertical numbers are the counters that need to move and are numbers from 0-9, will also be separate objects.

Thanks in advance.

Kevin
altimeter.jpg
Sincerely,

Kevin
First time build C172

User avatar
Sling
Posts: 4433
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: How to create a vertical counter like a hobbs counter

#2 Post by Sling » Tue Jul 14, 2020 3:09 am

Looks good. There are a number of ways to do that depending on the gauge and your preference.

1 - Custom barrel image that has all the numbers on it in a vertical strip. You move it up and down in code for the correct display. You often need to use a viewport with this method.

2- The API functions for running text.

3 - Using the canvas drawing API.

My YouTube channel has examples of the canvas method in operation and one of the API tutorial videos shows how to implement the running text.

JackZ
Posts: 1851
Joined: Mon Feb 22, 2016 1:02 pm

Re: How to create a vertical counter like a hobbs counter

#3 Post by JackZ » Tue Jul 14, 2020 12:13 pm

Look good so far.
The “running_text()“ functions are cool but it can be difficult to achieve what you want.
I rather have vertical image strips from 0 to 9 for each digit and move the corresponding strip up/down accordingly, with some tricks to fallback to the next digit when reaching 9+.
Of course, it is mandatory to add a viewport() rectangle to show only parts of the strips.
To add the sense of depth and to look like a drum roll, a graded black shadow png with alpha channel image, starting 60% black at the top and bottom and 0% at the center, and added on top of the Hobbs window, is the way to go IMHO.

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Ralph
Posts: 5079
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: How to create a vertical counter like a hobbs counter

#4 Post by Ralph » Tue Jul 14, 2020 12:26 pm

There's a hobbs counter in the Cessna 172 RPM indicator. You can copy and paste the code, and then modify it a bit to your likings.

P51Eagle
Posts: 18
Joined: Sun Jan 06, 2019 9:32 pm

Re: How to create a vertical counter like a hobbs counter

#5 Post by P51Eagle » Wed Jul 15, 2020 2:41 am

Thanks Guys,

Yes I figure on the strip of numbers but wasn't sure how to implement. That's actually how I created the gauge but sent strips to the back of the gauge face so you can see them.

Jacques, good point on the graded shading to give it more depth.

Sling I'll checkout your YouTube channel and let you know how it works out.

Kevin
Sincerely,

Kevin
First time build C172

JackZ
Posts: 1851
Joined: Mon Feb 22, 2016 1:02 pm

Re: How to create a vertical counter like a hobbs counter

#6 Post by JackZ » Wed Jul 15, 2020 8:07 am

I don’t know which instrument type you are trying to mimic, but let me give you this advice: (as ever) Devil is in the details.

- Don’t forget to add a shadow to the needle so it seems to be hovering over the bezel (I usually use 60% shadow and offset ranging from 4 to 8 pixels, direction is -45 degrees)
- For the rectangular windows the bezel itself should have an inner shadow
- For the shadows to show up, do not use pitch black color for the bezel background. Start from black, then in Skinman raise the vertical color slider to « lighten » a little bit the color to a very dark gray instead of full black.
-The needle seems strange dimensionwise: the tip of the needle itself seems oversized when compared to the slimest part of it.
The tip of the needle is probably too long and points BEYON the markings...Strange.
As a result the needle seems fragile, and unrealistic. Do you use real pictures of the original?
- The font you are using seems weird. Most of the instruments are using a military spec one MILSPEC 33558
https://www.wfonts.com/font/ms-33558

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

P51Eagle
Posts: 18
Joined: Sun Jan 06, 2019 9:32 pm

Re: How to create a vertical counter like a hobbs counter

#7 Post by P51Eagle » Thu Jul 16, 2020 6:27 pm

Hi Jacques,

Thanks for the input.

Yes, the gauge does look strange, but that's because it's from an F-14B. It's not complete, actually this is an earlier version. I just wanted to show an example for my main question regarding vertically scrolling numbers.



Sincerely,

Kevin
Sincerely,

Kevin
First time build C172

JackZ
Posts: 1851
Joined: Mon Feb 22, 2016 1:02 pm

Re: How to create a vertical counter like a hobbs counter

#8 Post by JackZ » Thu Jul 16, 2020 7:58 pm

Sure.
I checked the Altimeter of the F14B Tomcat (love this plane) and can confirm that it uses the MIL SPEC font I was talking about.
And the needle is like you drew it, just slightly less long.
https://www.pinterest.fr/pin/457889487090211163/

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest