Sign in to follow this  
Guest Milton

Virtual Cockpit

Recommended Posts

Hello all. I am trying to build a virtual cockpit for a project I am working on with FSDS2. I can't seem to get any virtual gauges to appear. I have had a look at the tutorial posted over at abacuspub.com. I even used the guys $pan1 altered .bmp and everything. I inverted the y like he said to in the texture properties. Nothing seems to work. The polygon that i added for my virtual gauges to be projected on is showing up fine but without any gauges. In a vc the polygon is supposed to be invisible but mine seems to like to show up. Does anyone have any ideas as to what I am doing wrong here? Please help me. I am so close to finally being done with this aircraft it is driving me insane. Thanks in advance.

Share this post


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

The polygon will disapear once you put in the proper entries in the panel cfg. Make sure the texture assigned to the panel is the $pan1.Here's the cfg line from my Cessna 140 to help you get started(Vcockpit01) -- Need's square bracketsBackground_color=0,0,0 size_mm=500,500visible=0pixel_size=512,512texture=$vc_PanNow enter your gauges hereBrian

Share this post


Link to post
Share on other sites

Tom,You can also apply the texture in the panel.cfg like this:{Vcockpit01}file=vc520main.bmp <<<---------------Background_color=0,0,0 size_mm=512,512visible=0pixel_size=512,512texture=$vcpanelAlso make sure that the textuures are 8 bit.Milton

Share this post


Link to post
Share on other sites

Hi y'all,I am having similar (well just the same) probs. Went thru Chris's DVC tut, but please anyone tell me exactly the following:- where to put the dummy.bmp (does the filename have to be $dummy.bmp?)- what to fill into the file=xxx.bmp and texture=$whatever (does the 'texture' thing represent an *existing* file or is it the name for the file FS will automatically generate?)- is it correct that I put the ($)dummy.bmp into the diffuse channel of the material of that VC 'plane'Thanks in advance :-)Etienne :-wave

Share this post


Link to post
Share on other sites

Etienne,1. In the VC, the panel background (planar) can be any shape or size.2. Applying a dummy texture ($dummy.bmp) is only used to set the coordinates so FS knows where to place the gauges later. Yes, apply it in the diffuse channel of the material editor.3. Put the $dummy texture anywhere you normally put you gmax applied textures as it is not used by FS. Only the $name and coordinates are used. (You can use any name preceeded with a $ and put any words or colors on the texture. The texture itself is ignored by FS.)4. If you apply the background texture in the panel.cfg, it will look like this:{Vcockpit01} <<--- square bracketsfile=vc520main.bmp <<--- your background bmp in the panel folderBackground_color=0,0,0 size_mm=512,512 <<--- must equal pixel size belowvisible=0pixel_size=512,512texture=$vcpanel <<-- names the dummy texture for coordinatesgauge00=ST_500!ST_520_Airspeed, 343,296,103,100etc.......NOTE: If you prefer to apply the background texture in gmax, remove the file= parameter in the panel.cfg, and move the texture to the texture folder. Remember ... 8 bit.Bill wrote an excellent description of the process which I have copy/pasted below.Hope this helps.MiltonThe most important thing is that the textures must be 8 bit indexed .bmp files, not 16 or 24 bit RGB... 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.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: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! There are five sets of dimensions that come into play here:1) size/shape of the planar surface (projection surface), can be anything you want that fits the available shape/space/special needs.2) the UVW map for the projection screen must be square, but the physical size is not critical, so long as the entire projection surface is covered.3) the $dummytexture.bmp must be square, and a power of 2; i.e., 256.256; 512,512; 1024,1024.4) the defined size of the background "image" (pixel_size=) used in the vcockpit section of the panel.cfg must be square, and match the dimensions of the $dummytexture.bmp declared in item #3.5) the size parameter in mm must be the same as item #4, or else size_ratio must be used to define the relationship.For example, in one of the sub-panels of the TB20GT you will note the following entry:{Vcockpit04}file=panel_P4_background.BMP Background_color=0,0,0 size_mm=256,256visible=0pixel_size=256,256texture=$bdvc_04gauge00=TB20GT!Gear Lever, 206,9,37,23gauge01=TB20GT!Gyro Suction, 82,4,35,331) In the .mdl, the planar surface is a small rectangle about 18"x5.2" that is sized to fit the space on the panel for the two gauges I need to display.2) The UVW map is therefore 18"x18" square3) The $bdvc_04.bmp file is 256x256 pixels4) The pixel_size=256,2565) The size_mm=256,256This last entry ensures that there is an exact 1:1 relationship between pixels and mm. This is critical, because the display engine in FS2k2 uses mm in it's calculations for gauge drawing!Note also, that in this particular case, I've chosen to apply the panel's texture using the file=panel_P4_background.BMP option in the panel.cfg, instead of applying it in GMax... either way will work, but I just happened to find this more convenient for this part of the panel... I hope these notes will help! I suspect that you don't have a size_mm= parameter defined in your vcockpit section, or possibly it is incorrect. That is the usual cause of 'pixel stretching.'Bill

Share this post


Link to post
Share on other sites

Hey, thanks a lot for the detailed explanation!! :-) Even works now, hehe :-hahBut don't really understand the 'self-illuminating' map thingy in Bill's guide. So it seems it is for gauge lighting. But do I need to make a b/w picture so FS knows where to light up the panel??Well but the basix do work now, thanx again!! :DEtienne :-wave

Share this post


Link to post
Share on other sites

>Hey, thanks a lot for the detailed explanation!! :-) Even >works now, hehe :-hah >>But don't really understand the 'self-illuminating' map >thingy in Bill's guide. So it seems it is for gauge >lighting. But do I need to make a b/w picture so FS knows >where to light up the panel?? >>Well but the basix do work now, thanx again!! :D They say a picture is worth a thousand words, so here is a 'picture' of one of the 'self-illumination masks' I use on the Socata. Note that since GMax doesn't have an "Invert Y" option (that I'm aware of!), I designed the mask and then flipped it upside down and backwards in Photoshop before saving.Take careful note on the filenames!$P1.bmp <=== $dummytexture.bmpP1_L.bmp <=== Self-Illumination Mask - Same name, but drop the $ and add the _L suffix!I created the mask by simply taking a 'picture' of the VC during the daytime, cropping and sizing the image to the exact dimensions of the $dummybitmap.bmp, and then highlighting the areas where I wanted "gauge lighting" to occur in a new layer. I then saved that mask layer as a new .bmp file, and applied it to the VC panel part in GMax's Material Editor.

Share this post


Link to post
Share on other sites

Sounds clear, thank you. Gotta try that out later today or maybe tomorrow. The VC is faaar from being finished and untextured yet, so... ;-)Etienne :-wave

Share this post


Link to post
Share on other sites

>Sounds clear, thank you. Gotta try that out later today or >maybe tomorrow. The VC is faaar from being finished and >untextured yet, so... ;-) One more thought occurred to me... In order to save filesize, your 'self-illumination mask' can be any size you want it to be, provided that it remains square and a power of 2...Since there is no 'detail' needed in the 'self-illumination mask,' I would suggest that it be no larger than 256,256...For example, the $P1.bmp file used above is 1024,1024 for maximum resolution in the VC and the projected gauges. After designing the P1_L.bmp at 1024,1024 and testing it for precise 'lighting effect locations,' I then scaled the whole thing down to a 256,256 bitmap to save filesize! :)

Share this post


Link to post
Share on other sites

How the heck you always answering so fast?!? :-)Okie Dokie - gotta try that - NOW!!! :-hahEtienne :-wave

Share this post


Link to post
Share on other sites

Just as with any instruction, it can be mis-read or misunderstood. lolIt appears that you apply the _L as self-illumination with the $dummy texture to the planar?What do you mean upside down and backwards? and why? Is it applied differently?Is there an alpha involved with the _L texture? or Is it 24 bit? as applied in gmax, then what format in FS?Does the _L go into the panel folder or texture folder?I have tried many different combo's without success. lolMilton

Share this post


Link to post
Share on other sites

>Just as with any instruction, it can be mis-read or >misunderstood. lol >>It appears that you apply the _L as self-illumination with >the $dummy texture to the planar? If you look at the screen shot of the GMax Material Editor, you will see just that: the $dummy texture is applied as a diffuse texture, and the _L texture is applied to the same planar object in the Self Illumination slot.>What do you mean upside down and backwards? and why? Is it >applied differently? For some strange reason, you need to flip the _L bitmap horizontally and vertically. It's an FS2k2 thing... :)>Is there an alpha involved with the _L texture? or Is it 24 >bit? as applied in gmax, then what format in FS? Only use 8-bit textures in the VC, period! Nothing else will work!>Does the _L go into the panel folder or texture folder? The _L goes in the panel folder.

Share this post


Link to post
Share on other sites

Bill,Thank you for the quick response. If I can get this working soon, it will be included in my Friday release of the Aero Commander 520. Otherwise, I will hold it off for the next model next month. :-)http://www.flightsimonline.com/ac520/I appreciate all your efforts here.Milton

Share this post


Link to post
Share on other sites

>Bill, >>Thank you for the quick response. If I can get this working >soon, it will be included in my Friday release of the Aero >Commander 520. Otherwise, I will hold it off for the next >model next month. :-) >>http://www.flightsimonline.com/ac520/ That's a mighty handsome model, Milton!BTW, I forgot to answer one of your questions about the Alpha channel...Actually I did mention it in another reply (above), but according to the SDK, we should be able to use the Alpha channel on a $dummy.bmp file to control which electrical buss the gauge illumination in the VC will use: black for NAV light buss and white for Landing Lights buss.However, I've never managed to get this to work properly, so I'm stuck with the LL buss... :(

Share this post


Link to post
Share on other sites

Bill,This is a strange "being". :-)Tried the upside down and backwards orientation in gmax. I actually got it to appear on the panel 2 times but backwards. Last 4 attempts at straightening it out, nothing shows.So, some questions here:1. The 8-bit texture (vcpanel_L) is applied in gmax as self illumination map with the ($vcpanel) texture obviously works, or did twice though the illuminated spots were backwards (but not upside down) to the panel gauges. lol Does the orientation of the 8 bit vcpanel_L in the panel.cfg have to match the upside down and backwards self illumination map, or should its orientation be correct with the visual panel background?I see no difference changing it at all. Then again, I see nothing at all right now. lol2. Is there an alpha associated in any way with this vcpanel_L? or is it simply an 8 bit texture?Life should not be this complicated ... :-)Milton

Share this post


Link to post
Share on other sites

>1. The 8-bit texture (vcpanel_L) is applied in gmax as self >illumination map with the ($vcpanel) texture obviously >works, or did twice though the illuminated spots were >backwards (but not upside down) to the panel gauges. lol I must have misremembered this, as it turn out you need only flip the mask vertically (i.e., upside down).>Does the orientation of the 8 bit vcpanel_L in the panel.cfg >have to match the upside down and backwards self >illumination map, or should its orientation be correct with >the visual panel background? There is no way to affect the orientation in the panel.cfg, so the question is essentially meaningless... :)>2. Is there an alpha associated in any way with this >vcpanel_L? or is it simply an 8 bit texture? There is no need for an alpha channel, unless you want to try moving the electrical buss for gauge illumination from the landing lights buss to the navigation lights buss. I've never managed to get that working properly... :(Obviously, the cannot be an alpha channel for the $dummy texture, since it doesn't really exist anyway until FS2k2 generates it at run time... :)There are two critical things to remember when working with VC bitmaps:1) they MUST be square.2) they MUST be powers of 2 (256,256; 512,512; 1024,1024, etc.)I once lost three days chasing down why a particular panel would NOT illuminate, only to discover that my _L bitmap was 256,255 pixels... :)I agree, it should be so darn complicated!

Share this post


Link to post
Share on other sites

Arghh... Maybe I am just too stupid, but it seems totally illogical to me either ways: panel illumination tied to nav or landing lights??? Sorry MS, but ahhh...Just my

Share this post


Link to post
Share on other sites

>Arghh... Maybe I am just too stupid, but it seems totally >illogical to me either ways: panel >illumination tied to nav or landing lights??? >Sorry MS, but ahhh... God forbid they should have tied the VC panel/gauge lights to the (gasp!) panel/instrument lights switch!!! :)

Share this post


Link to post
Share on other sites

I think a reason for this may stem back to the bad ol' days when FS was so resource hungry that any optimisation was welcome.The NAV light bus works on the premise that there is no requirement to have your NAV lights lit until evening civil twilight (in theory).Some boffin obviously decided that this would the time that natural light would be insufficient to illuminate the panel hence the link.I think they call this backward compatibility though it can be interpreted a number of waysIt would be nice to see them look at these optimisations again given that processors are a lot more powerful.It would make some logic of the design process.

Share this post


Link to post
Share on other sites

>Bill, >>Thank you for the quick response. If I can get this working >soon, it will be included in my Friday release of the Aero >Commander 520. Otherwise, I will hold it off for the next >model next month. :-) >>http://www.flightsimonline.com/ac520/ Milton,I sure wish that you'd put your Commander 520 on a server that can handle the load! I've been trying since - well forever! - to get the this link to give it a whirl... :(

Share this post


Link to post
Share on other sites

Bill, I did, AVSIM, FSV, Flightsim, and FSNordic.The Download is not on my server. That was an error of AVSIM's announcement. :-)Milton

Share this post


Link to post
Share on other sites

Bill,Another thing since you obviously have the Aero Commander 520 downloaded by now.... After 20 change/compile/test cycles and 15 hours of work, I could never get the backlighting to work.I am happy to report however that I've never seen a 1952 AC520 with backlit gauges. So, it still feels authentic. :-)Milton

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