Sign in to follow this  
Guest CaptainJ

Needle help needed

Recommended Posts

Hello peopleCan somebody explain how to make needles and how to import them into the data files? I have created some needles in a pbg format but when you read the data files the needle refer to a .ndl file which I can't find into my art directory maybe there are some developers willing to help me out?Take care :-wave

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Jarno,If you open up a needle file in a text editor, the format is fairly simple, here it is:

<bgno> ==== BEGIN BITMAP NEEDLE ====	<offx> ---- offset X ----	53	<offy> ---- offset Y ----	53	<base> ---- base bitmap name ----	VMONeedle<endo> ==== END BITMAP NEEDLE ====

The offsets specify your needle centre on a frame of the pbg file, the tag is simply the name of the pbg file without the extension. Create a file for the needle as above, and then save it with a needle extension e.g. NeedleName.ndl Put this needle file in the DATA folder and the pbg and act file in the ART folder.When you specify the needle for the gauge you usually specify the name of the needle file.Hope this helps,Matthew.

Share this post


Link to post
Share on other sites

Hi Matthew,Well there's a problem with showing up now! after some search I found out that the pbg was saved into 32 bit colours instead of 256. That is strange because pbg can handle only in 256 or not? I opened the files and decreased the colours to 256 but now your needle creator gives an error any sugestions?Thanks Matthew for helping me out! :-wave

Share this post


Link to post
Share on other sites

Hi Jarno,The needle maker takes 24bit colour individual bitmaps (however, because I haven't implemented a colour reducing alogrithm the combined images should really not have more than 256 colours in them - this is not normally a problem for needles as they only usually have a few colours in them). The PBG is 256 colours and has a palette in the form of the act file. Where you looking at the joined bitmap, as this will still be 24 bit colour depth? (You can delete this as it's an intermediate file).Hope this helps,Matthew.

Share this post


Link to post
Share on other sites

MatthewThe joined bitmap file is still in 24 bit colour depth I have reduced the colour dept to 256 colours but now when I look at the pbg file it looks like thiswhat causes this?

Share this post


Link to post
Share on other sites

Hi Jarno,That looks strange!! When you output the animation from what ever program you are using, make sure that the frames are output as individual bitmaps and are in 24 bit colour. The joined bitmap will always be 24 bit colour, it's then converted to 8 bit colour by Needle Maker when it actually makes the pbg.Hope this helps.Matthew.p.s. What program do you use to produce the bitmap frames (Flash, or 3D Studuio or something else?)

Share this post


Link to post
Share on other sites

Hi Matthew I use 3d studio for animation then I render the scene and press printscreen I open the saved image in Jasc's Paintshop Pro! So I have to make individual bitmaps from every frame into 24 bit and then import it into the needlemaker? thanks!EDITI have created the needle but now the first frame apears to be complete black! I have saved the individual bitmaps into 24 bit the first bitmap is flap001 and the last one is flap007 start frame is 1 and the total number of bitmaps is 7

Share this post


Link to post
Share on other sites

Hi Jarno,Please could you post a screen shot of the first bitmap, and also a screen shot of the needle maker dialog once you have entered all the parameters.Cheers,Matthew.

Share this post


Link to post
Share on other sites

Hi Jarno,This is strange!! Please can you e-mail the frames (preferably zipped!! :-)).Cheers,Matthew.

Share this post


Link to post
Share on other sites

Hi Jarno,I've just had quick experiment, and I can confirm that there's a bug in needle maker. The problem seems to occur when the first fame isn't numbered zero i.e. Name000 or Name0000 are fine, but Name001 causes the first frame to be output as blank.You can temporarily get around this by making sure the first frame starts off as zero. I'll work on a fix for it.Cheers,Matthew.

Share this post


Link to post
Share on other sites

Glad to hear it's a bug. And thanks for your excellent tools they are very very usefull!! Is it possable to save the import and export directorys? every time I use your pbg maker I have to adjust the import and export directorys again! which takes a lott of time! just a question ;) Cheers!

Share this post


Link to post
Share on other sites

Hi Jarno,I've fixed the bug, and I've e-mailed you the updated version. :-)Good suggestion about about saving the default folders.... I'll see what I can do.Cheers,Matt.

Share this post


Link to post
Share on other sites

Oke Matthew it workes now but now I have to adjust the file a little bit because the needle does'nt move to the real flap angle can you give some explenation for the folowing data?Cheers! ---- min value allowed ---- 0.0 ---- max value allowed ---- 80.0 ---- bitmap needle ---- flap ==== BEGIN BITMAP NEEDLE ==== ---- needle ---- Fokker50Flap.ndl ==== END BITMAP NEEDLE ==== ---- gauge value table ---- ---- begin table ---- - x y 0.0 0.0 5.0 36.0 10.0 55.0 15.0 76.0 20.0 90.0 25.0 128.0 35.0 171.0

Share this post


Link to post
Share on other sites

Hi Jarno,Set the tag to the maximum value of the flap deflection.In the gauge table you need to map the flap deflection angle against the gauge deflection angle, so, if it's a linear relationship enter this for example.0.0 0.0170.0 45.0Here the needle would be at an angle of 170.0 degrees for a flap deflection of 45.0 degrees. You may want to add some more frames to your pbg to make the animation smoother.Hope this helps,Matthew.

Share this post


Link to post
Share on other sites

Hi Matthew I have some problems with the gauge animation when I press F for flap deployment the needle does'nt move but move by pressing the F for the second time! the needle start at 12 o clock and with flaps full down it's on 2 o clock while it shoud be around 5 o clock! where is 0.0 0.0 starting from? 12 o clock or 9 o clock?Hope you can help me out!Jarno

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this