• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 TORQUE NEEDLE problem

Okay. I expect you all were happy that my last needle started to work and I will stop posting my novices questions... FALSE :D

My needles work, as shown here. But I need to "hide" parts of needles which are "under" the actual needle "window"... better than 100 words will be this picture
eicasneedles.jpg


I read at www.fs2x.com tutorial (part 1 I think) that I shall use maskimage. I tried it on first left needle - TQ1. I drew a mask (which will be the same for all 8 needles) as shown here (colours are WIP, later on I changed them, read bellow)
eicasmask.jpg


So the small arch are pure black (pure black colour in Photoshop), the rest I did by the 1/1/1 colour - is this configuration of 1/1/1 clr correct?
eicassettings.jpg


Then I saved it as BMP16 bit (by the way, by eye look it looks like only black square, no difference, so I can not say if my colours were not lost during saving :D).

I tried to give it into my code:

Code:
<Gauge Name="EV-55 EICAS upper" Version="1.0">
<Image Name="background_upper.bmp"/>

<!-- grafika --><Element>
		<Position X="13" Y="12"/>
		<Image Name="background_upper_grafika.bmp"/>
	</Element>

<!-- rucicka TQ1 --><Element>

		[B]<MaskImage Name="mask.bmp">
			<Axis X="574"> Y="450"/>
		</MaskImage>[/B]


		<Position X="281" Y="371"/>
		<Image Name="rucicka1.bmp" PointsTo="North">
			<Axis X="12" Y="240"/>
		</Image>
		
		<Rotate>
			<Value Minimum="0" Maximum="1600">(A:Eng1 torque,ft-lbs)</Value>
			<Nonlinearity>
				<Item Value=   "0" X= "75" Y="252" />
				<Item Value= "200" X="113" Y="202" />
				<Item Value= "400" X="162" Y="165" />
				<Item Value= "600" X="221" Y="141" />
				<Item Value= "800" X="284" Y="134" />
				<Item Value="1000" X="343" Y="142" />
				<Item Value="1200" X="403" Y="166" />
				<Item Value="1400" X="451" Y="203" />
				<Item Value="1600" X="490" Y="252" />
			</Nonlinearity>
		<Delay DegreesPerSecond="9"/>
		</Rotate>
	</Element>
/////here are my rest 7 needles, I deleted it for this forum to make it shorter///////¨
</Gauge>
(rmk: my background_upped is 1149*899px, the mask image the same)

and voila... it doesnt work - gauge doesnt appear in FS.

So I tried to make the mask image ca. 5 pixel on each side smalled (to avoid overlaping the mask from the background (because 899/2 is not 450, but 449,5), but no change. I think I am doing some thing terribly bad, but what? Image format? Coding? Colours in the mask bmp?

Thanx for advice

PB
 
Last edited:
You don't need this >

<MaskImage Name="mask.bmp">
<Axis X="574"> Y="450"/>
</MaskImage>
Ted.
 
...also, your "colors" are backwards...

The areas where the needles should appear are made 1,1,1.

The areas where they should be invisible are transparent 0,0,0.

Also, save as either 24bit .bmp or 8bit .bmp. 16bit is unsupported.
 
Wow, almost two weeks I didnt touch my project, terrible :eek:

Sirs, thank you for your replies, I am slowly getting it. Now the maskimage works (colors corrected, syntax fixed), but I am still missing the right meaning of AXIS. From tutorial on FS2X.com I expected, that AXIS should be at the middle of my maskimage. I have following situation:
eicasneedles.jpg

and
maskd.jpg


Code:
<Gauge Name="EV-55 EICAS upper" Version="1.0">
<Image Name="background_upper.bmp"/>

<!-- grafika --><Element>
		<Position X="13" Y="12"/>
		<Image Name="background_upper_grafika.bmp"/>
	</Element>

<!-- rucicka TQ1 --><Element>

		<MaskImage Name="mask.bmp">
			[B][U]<Axis X="574" Y="449"/>[/U][/B]
		</MaskImage>


		<Position X="281" Y="371"/>
		<Image Name="rucicka1.bmp" PointsTo="North">
			<Axis X="12" Y="240"/>
		</Image>
		
		<Rotate>
			<Value Minimum="0" Maximum="1600">(A:Eng1 torque,ft-lbs)</Value>
			<Nonlinearity>
				<Item Value=   "0" X= "75" Y="252" />
				<Item Value= "200" X="113" Y="202" />
				<Item Value= "400" X="162" Y="165" />
				<Item Value= "600" X="221" Y="141" />
				<Item Value= "800" X="284" Y="134" />
				<Item Value="1000" X="343" Y="142" />
				<Item Value="1200" X="403" Y="166" />
				<Item Value="1400" X="451" Y="203" />
				<Item Value="1600" X="490" Y="252" />
			</Nonlinearity>
		<Delay DegreesPerSecond="9"/>
		</Rotate>
	</Element>
and so far...

As I understood from FS2X tutorial, I should center the axis to the mask image, so I have made it in this way... but, it is quite different :D

needle.jpg


I chedked FS9 SDK, but nothing useful, they are only describing it on examples with compass, which is "homocentrical", so they have very easy to calculate position of their maskimage :/

Thank everyone for opinion about this,

Pavel
 
Don't overthink this...

For the needle's axis, stick a virtual pin in the needle where it needs to rotate.

For the mask image's axis, stick a virtual pin in the mask where the needle's axle (axis) should be.
 

Attachments

  • MaskImage.jpg
    MaskImage.jpg
    78.3 KB · Views: 1,046
After some time I am back with this problem. Thank you Bill for trying to help, I really was not born to be a programmer :-(

Situation:
backwanted.jpg

size 1149x1149, needle size 34x241, needle axis 12/240 (marked by green dot).

maskwanted.jpg

size 576x372, axe of needle marked by yellow dot

Code:
<Element>

		<MaskImage Name="mask.bmp">
			<Axis X="281" Y="371"/>
		</MaskImage>


		<Position X="281" Y="371"/>
		<Image Name="rucicka1.bmp" PointsTo="North">
			<Axis X="12" Y="240"/>
		</Image>
		
		<Rotate>
			<Value Minimum="0" Maximum="1600">(A:Eng1 torque,ft-lbs)</Value>
			<Nonlinearity>
				<Item Value=   "0" X= "75" Y="252" />
				<Item Value= "200" X="113" Y="202" />
				<Item Value= "400" X="162" Y="165" />
				<Item Value= "600" X="221" Y="141" />
				<Item Value= "800" X="284" Y="134" />
				<Item Value="1000" X="343" Y="142" />
				<Item Value="1200" X="403" Y="166" />
				<Item Value="1400" X="451" Y="203" />
				<Item Value="1600" X="490" Y="252" />
			</Nonlinearity>
		<Delay DegreesPerSecond="9"/>
		</Rotate>
	</Element>

Result? Needle is moving somewhere between Np/RPM (third line). It seems to be correctly half-hidden, but what about the position?

What am I doing badly?

Thanks for helping, I am really getting tired, coz I spent about one and half hour by this right now and no progress. :(

Pavel
 
If I can find some time, I'll see what I can do to figure out what your problem is...
 
Maybe this is a silly question, but...

Did you make the red area (1,1,1) and the cyan area (0,0,0) for your actual in the sim bitmap? :confused:

The only reason I used red and cyan in my example was so you could SEE the two areas. Using "pure black" and "near black" would not do that... :)
 
Back
Top