Jump to content
Sign in to follow this  
Guest

Panel bitmap

Recommended Posts

Guest jlwoodward

I want to try to draw a panel texture to apply to the vc shown below and would like some advice on how to get started. The only ways I can think of is (1) draw each gauge on a background, or (2) find other panels and copy and paste the gauges to the background. Is there a better way?Thanks,John Woodward

Share this post


Link to post
Share on other sites
Guest

>I want to try to draw a panel texture to apply to the vc >shown below and would like some advice on how to get >started. The only ways I can think of is (1) draw each gauge >on a background, or (2) find other panels and copy and paste >the gauges to the background. Is there a better way? John,I'm confused! Why would you want to put a static picture of a gauge on the VC?Sure enough, texture the panel! But put the same gauges you've used on the 2d panel on the VC panel...

Share this post


Link to post
Share on other sites
Guest jlwoodward

Hi Bill,Only because I am completely ignorant about how to do it. I would much prefer to make it functional. Any tutorials? Using FSDS.John

Share this post


Link to post
Share on other sites
Guest

>Hi Bill, >>Only because I am completely ignorant about how to do it. I >would much prefer to make it functional. Any tutorials? >Using FSDS. Well, not really... there is only one that I'm aware of, and it is based on 'early guesswork' from when VC's were very, very new, and no SDK's existed for FS2k2. As a result, although following the steps outline will get anyone started, there's a lot that is incomplete or misleading.So, I'm determined to write one as soon as the current project is released, using my experiences with that model, as well as the model itself as a sort of "talking board."I've actually outlined the process more than once in this forum, but rather than make you search the last seven months or so of messages, I'll attempt outlining enough to get you 'kick started.' :)Then, as you go along, feel free to ask questions at any point and one of us who've 'been there, done that' can help... Fair enough?OK then, let's cover some of the basics...I) Definitions & Rules1) FS2k2 'projects' images of gauges that're defined in the panel.cfg onto a transparent 'screen' that you provide in the model. All we are able at this time to use are 'regular gauges.' A certain payware company has developed the tools that will allow 'vector graphic drawn gauges' (such as the gps or Eric Marciano's F16 Radar Gauge) in a Virtual Cockpit, but thus far it is not available for the general public (us!) to use...2) The program you use to create the FS2k2 model is irrelevant; either GMax or FSDS is quite capable of making a fine VC, as the 'magic' is actually done by FS2k2... :)3) Basically, you need to create a planar surface (i.e., 'flat sheet') on which to apply a dummy texture. It is the name we give the texture that is important, not the texture itself! All dummy textures are named with the prefix $, so a primary panel's texture might be called something like $primary_panel.bmp4) The most important thing to remember is that all of the dummy textures used to create a VC panel must be square, and must be of a size that is a "power of 2." In simple terms, the .bmp files must be 256x256, 512,512, or 1024,1024...5) There is no rule that the planar surface has to be any particular shape or size, only the texture applied to it! (more on this later.)II) Basic Steps to Create a Simple VC Panel1) Start a new project in FSDS (or GMax) to experiment with.2) Create a simple planar surface of about 16"x8" (there is a reason for this particular size, as we're going to use it to illustrate a major point in VC design later)3) In your favorite paint program, create a totally black (0,0,0) image of 512x512 pixels, and name it $my_first_vc4) Go back to FSDS or GMax, and apply the texture $my_first_vc to the planar object you created in step 2. You do not need to copy the texture anywhere, as it is only a "dummy" used to assign a name to the map in the .mdl file that will be generated by FSDS or GMax. FS2k2 will auto-generate the texture needed at run time. Make sure that when you position the texture, you align the top half of the texture with the top of the rectangular surface you created. FS2k2 uses the pixel coordinates of the texture for gauge placement, not the object!5) Export your work to a .mdl file...6) Now the fun begins! The way gauges are placed on the little panel you've just created is via the panel.cfg file. Here is a snippet from the C172's panel.cfg for one part of a VC. (I've replaced the square bracket with a { because of being posted here... square brackets are used instead of > and < for HTML code!).{VCockpit01}size_mm=512,512pixel_size=512,512texture=$C172s_1background_color=0,0,0visible=0gauge00=Bendix_King_Radio!Bendix-King Radio Nav-Comm 1, 0, 0, 205, 77gauge01=Bendix_King_Radio!Bendix-King Radio Nav-Comm 2, 206, 0, 205, 77gauge02=Cessna172!Clock, 413, 1, 93, 93gauge03=Bendix_King_Radio!Bendix-King Radio DME, 0, 86, 198, 51gauge04=Bendix_King_Radio!Bendix-King Radio Audio, 201, 85, 198, 34gauge05=Cessna!Annunciator, 403, 96, 109, 30gauge06=Bendix_King_Radio!Bendix-King Radio AP, 0, 136, 198, 59gauge07=Bendix_King_Radio!Bendix-King Radio Xpndr, 0, 196, 198, 61gauge08=Cessna182s!VOR2, 257, 129, 126, 126gauge09=Cessna!ADF, 385, 130, 126, 126gauge10=Cessna!VOR1, 1, 258, 126, 126gauge11=Cessna!Vertical_Speed, 129, 256, 126, 126gauge12=Cessna172!Airspeed, 256, 256, 128, 128gauge13=Cessna!Turn_Indicator, 384, 256, 128, 128gauge14=Cessna!Altimeter, 1, 383, 126, 126gauge15=Cessna172!Tachometer, 128, 383, 128, 128gauge16=Cessna!Heading_Indicator, 256, 384, 128, 128gauge17=Cessna!Attitude, 383, 384, 128, 1287) Take careful note of how this part of the panel.cfg is different from the 2d sections. a) size_pixel and size_mm are both 512,512 (sound familiar?) :( the name of the texture file is $C172s_1 (hmmm strike a chord here?) c) background_color is set to 0,0,0 (transparent!)8) The reason I picked this particular file was because it will allow you to rather quickly see the fruits of your work so far... a) make a copy of the C172's panel.cfg file for later use. :( edit the texture line in the section quoted above to be:texture=$my_first_vc c) rename the C172's cessna172sp.mdl file to cessna172sp.mdl.bak for safekeeping. d) move the .mdl file you just created to the C172's model folder, rename it cessna172sp.mdl and start FS2k2. Choose the C172 a/c and let it load. e) when you switch to the virtual cockpit, assuming you followed all the steps carefully, you should see a little 16"x8" panel "floating" in front of your face, with all the gauges applied...9) Notice that even though you created a rectangular panel, and a square bitmap, only the solid surface upon which the texture was applied will be visible! Because the image is transparent, where there is no 'surface,' there is nothing at all!When you get this far, please let me know and we can continue from there!Have Fun!Oh yes! Be sure to remove your changed files and rename the default Cessna's files! :)Bill

Share this post


Link to post
Share on other sites
Guest jlwoodward

Thanks Bill. More than fair enough.I printed out your directions and will probably start next week. As you can see from my other posts, I am having a difficult time with animation so maybe I will take a break and start now instead.You are pretty well on the way to a tutorial as is.Thanks,John

Share this post


Link to post
Share on other sites

John, go to http://www.abacuspub.com/fsds2/tips.htm There is a nice quickie VC tutorial by Bill Lyons.. I actualy was able to figure out and now I have a working VC on my RV-6A (too be released shortly) also go to www.freeflightdesign.com and look in the tutorials section for a FSDS VC cockpit tutorial. by using both of them you should get it working fine. Also if you need any animation help let me know.Brian

Share this post


Link to post
Share on other sites
Guest

>John, go to http://www.abacuspub.com/fsds2/tips.htm There is >a nice quickie VC tutorial by Bill Lyons.. I actualy was >able to figure out and now I have a working VC on my RV-6A >(too be released shortlyUnfortunately, Bill makes the same error that many others make...It is not necessary (or even necessarily desireable!) to use a "square" surface for the $pan1.bmp You can use a small circle, rectangle, trapezoid, parallelogram, triangle...IOW, whatever shape fits the available cockpit space!Now why is something like this important to know?Because if you use a 24x24 square to fit a 24x12 space, you'll have a big, ugly honking black slab spoiling your nice cockpit should you decide to try your hand at backlighting the gauges! :() also go to >www.freeflightdesign.com and look in the tutorials section >for a FSDS VC cockpit tutorial. by using both of them you >should get it working fine. Also if you need any animation >help let me know. Also, Chris's otherwise excellent tutorial (which helped me get started) leaves out a few bits of vital information, that caused me several days of anguish and frustration.The most important thing is that the textures must be 8 bit indexed .bmp files, not 16 or 24 bit RGB... :(

Share this post


Link to post
Share on other sites
Guest jlwoodward

Hi Bill,Here it is so far. I copy and pasted the two panels and applied a separate dummy texture to each. For some reason I had to invert the textures. Must be a difference in FSDS on how the coordinates are used. Otherwise the gauges were upside down.This cockpit has 5 panels. I think most of the gauges would not be functional, just pictures. Next I want to look for some better gauges and work on the placement. Filling in all the blank areas with switches, levers, knobs, and all kinds of other stuff I am not sure about yet, but I think I may copy and paste from other panel bitmaps.Thanks so much for helping me get started.John

Share this post


Link to post
Share on other sites
Guest

>Hi Bill, >>Here it is so far. I copy and pasted the two panels and >applied a separate dummy texture to each. For some reason I >had to invert the textures. Must be a difference in FSDS on >how the coordinates are used. Otherwise the gauges were >upside down. >>This cockpit has 5 panels. I think most of the gauges would >not be functional, just pictures. Next I want to look for >some better gauges and work on the placement. Filling in all >the blank areas with switches, levers, knobs, and all kinds >of other stuff I am not sure about yet, but I think I may >copy and paste from other panel bitmaps. Hey! That's beginning to look very, very good!It's certainly better than my stumbling beginings... :)Holler away if you need more help!

Share this post


Link to post
Share on other sites
Guest jlwoodward

Hi Bill,Here is the procedure that I have used for FSDS2:1. Make 3 copies of the panel and give each a different name such as panel_main, panel_vc, and panel_gauges.2. Put panel_main into the main model. This panel gets the bitmap containing gauges so that they will be seen in the spot view.3. Put panel_vc into the VC model. Apply a plain background texture to it (no gauges). I looked through existing panel bitmaps, cut out a section, and pasted it into a 256x256 texture.4. Also put panel_gauges into the VC model. I found it was necessary to space this one slightly off the surface of panel_vc for the textures to show correctly. This panel gets the square transparent texture that you described. The only thing in FSDS2 is that you have to check Invert Y or else the gauges come in upside down.I am still working on textures. For the main panel (in spot view) I went into FS2002 and made a screen shot of the VC view, then cut and pasted the gauges onto a background. I still need lots of little switches and non-functional gauges, etc.John Woodward

Share this post


Link to post
Share on other sites
Guest

>3. Put panel_vc into the VC model. Apply a plain background >texture to it (no gauges). I looked through existing panel >bitmaps, cut out a section, and pasted it into a 256x256 >texture. >>4. Also put panel_gauges into the VC model. I found it was >necessary to space this one slightly off the surface of >panel_vc for the textures to show correctly. This panel gets >the square transparent texture that you described. The only >thing in FSDS2 is that you have to check Invert Y or else >the gauges come in upside down. >>I am still working on textures. For the main panel (in spot >view) I went into FS2002 and made a screen shot of the VC >view, then cut and pasted the gauges onto a background. I >still need lots of little switches and non-functional >gauges, etc. That is a good, safe and easy method, although I opted to use the 'real live gauges' throughout, so that you can 'ride the wing' and still see the gauges working... :)Another method of doing textures on the VC is to use only one surface, and apply both the $dummytexture.bmp and the actual panel textures on it. This is done in the panel.cfg file like this:[Vcockpit01]file=panel_P1_background.bmp Background_color=0,0,0 size_mm=512,512visible=0pixel_size=512,512texture=$P1Notice that the panel's texture is applied in the file= entry, and the $dummybitmap texture is applied in the texture= entry.Now the 'crowning touch' will occur when you specify to use a specular highlight file named the same as the $dummybitmap.bmp without the $ prefix. This file is applied in GMax as a 'self-illuminating' mask. I do not know if FSDS2 supports this feature.The 'mask' acts in a similar fashion as a reflective alpha mask, but instead identifies the areas of the panel that should be 'illuminated,' hence the cool backlighted gauges! :)

Share this post


Link to post
Share on other sites
Guest

My gauges are appearing on the vc panel stretched horizontally. I know you said that the dimensions of the geometric plane does not matter, that it can be a circle if you want, but when I resize my panel (rectangular plane) it _appears_ that this affects the asepct ratio of the gauges. I am seeing things?My vc texture is 512 x 512.Steve

Share this post


Link to post
Share on other sites
Guest jlwoodward

I also had distorted gauges. I thought it was just from the viewing position since ones closer to the eyepoint were round. I played around with the size dimensions (default 128 x 128) until they looked right.John Woodward

Share this post


Link to post
Share on other sites
Guest

Here is what I'm talking about.The second photo shows the panel with the original width. The panel is a geometric plane. It has not been converted to any of the 'mesh' forms, so the size can be adjusted without scaling.The first photo shows the panel size increased from 33cm wide to 60 cm wide.Steve

Share this post


Link to post
Share on other sites
Guest

Oops, got the photos reversed order. First is normal, second is wide.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...