PDA

View Full Version : Third part Virtual Cockpits in CFS1... Why not?...


P J Dunbar
January 18th, 2006, 11:24
To Hubbabuba, Ivan, Guppanui and the others,

Having recently downloaded some of Pentti Kurkinen's BF-109Gs I just wondered if he had actually built a CFS1 version of those planes equiped with a real Virtual Panel. Joe Amodea says in his Dynamic Virtual Cockpit tutorial:



The first time I remember experiencing such a virtual cockpit - with all the needles and dials spinning around in virtual flight - was inside the cockpit of the native Combat Flight Simulator aircraft. It was then that I began to covet that kind of environment, some two years and more ago now. I saw something that I really wanted to have!
While I took up the hobby of re-painting or texture art creation, I kept waiting to see the first add-on with the DVC.

But we all waited in vain, didn’t we?

“It must take some magic not available to the average wizards in the flightsim community,” I thought. Some day perhaps, sigh!

And some day is here, thanks in good measure to Pentti Kurkinen


A bit further we read:


It was there that I almost missed it. The post by Pentti, announcing that he was finishing up a tutorial on building CFS/CFS2 aircraft using a hybrid system of constructing the individual parts with AF99®, but assembling them manually with SCASM coding and compilation techniques. Within that tutorial (available on line at the above site) you will find the essential knowledge that, one weekend in November, I applied to my FSDS project, Schuftie.


Except for CFS stock aircrafts, the only real dynamic virtual panel I've ever seen in CFS1 was in Alain Breton's Bréguet 693. When he sent me a copy of this model he explained he could get to this result by designing the aircraft with Flight Simulator Design Studio as a CFS2 model then compiling into SCASM and reworking it as a CFS1 model.

As Pentti Kurkinen's BF109G is concerned, the outside is beautiful and very detailed, but as virtual cockpit I only saw that the canopy framework was textured inside as well as a polygon with a texture of the gauges and a very basically represented gunsight. Has Pentti Kurkinen made another version I haven't seen? What I've seen can't be called a dynamic virtual cockpit as we find in CFS stock planes.

So I just wondered why amongst the number of CFS add-ons that have been made (freeware and commercial all together) only one freeware designer, Alain Breton, has until now succeeded to endow his planes with real Virtual cockpits.

Now let's pay attention to one of the stock aiplanes Panel.cfg file, the Hurricane's for instance. Here is what we find in this file, concerning the virtual panel :


[Vcockpit01]
Background_color=1,1,1
size_mm=256,256
visible=0
window_size= 0.402, 0.534
pixel_size=256,256
texture=$Hurricane_I
window_pos= 0.299, 0.466

gauge00=Hurricane_1!Turn_Indicator, 1,0,65,65
gauge01=Hurricane_1!Starter, 81,110,33,33
gauge02=Hurricane_1!Oil_Pressure, 96,3,30,58
gauge03=Hurricane_1!Heading_Indicator, 1,126,61,80
gauge04=Hurricane_1!Fuel_Warning, 7,212,21,34
gauge05=Hurricane_1!Fuel, 131,201,51,52
gauge06=Hurricane_1!Engine_Temperature, 37,202,53,54
gauge07=Hurricane_1!Boost_Pressure, 192,62,59,59
gauge08=Hurricane_1!Altimeter, 128,2,65,71
gauge09=Hurricane_1!Vertical_Speed, 188,119,65,69
gauge10=Hurricane_1!Tachometer, 3,66,60,59
gauge11=Hurricane_1!Oil_Temperature, 64,142,55,55
gauge12=Hurricane_1!Magneto, 94,200,33,56
gauge13=Hurricane_1!Fuel_Selector, 125,73,55,57
gauge14=Hurricane_1!Flaps, 68, 2 ,24,57
gauge15=Hurricane_1!Clock, 72,61,47,47
gauge16=Hurricane_1!Attitude, 121,131,65,66,FORCE_TRANS
gauge17=Hurricane_1!Airspeed, 188,189,64,65
gauge18=Hurricane_1!Gear, 196,0,55,63


Those who have experienced Flight Simulator Design Studio and perhaps already created VC panels in CFS2, FS2002 or Fs2004 will understand that the first part of the above paragraph is refering to a transparent or invisible square polygon on which the VC's gauges are located. This square part which has nothing to do with the visible background of the panel has been assigned a kind of fictious texture called $Hurricane_I and it stands a little in front of the visible panel background (from the the pilot's point of view, of course)

A square .BMP having been created and renamed as $Hurricane_I ( the .BMP extension must be deleted and the lenght of the name doesn't matter as long as it begins with $) it will be accurately assigned to the above mentioned transparent square back ground part and eventualy be deleted (that's why I would consider this texture as somewhat fictious as it only helps as a reference to position the gauges in the VC.)

In the second part of this paragraph you can see the co-ordinated positions of the different gauges in the square of which size and properties are defined in the first part of VC paragraph.


I hope all these considerations were not too toilsome to follow. I personaly haven't got any experience nor practice of AF99, but I just wondered why this method could not be applied to CFS1 aircraft design.

Greetings,

Pol.

Ivan
January 18th, 2006, 13:54
Hi PJ Dunbar,
The limitations I have run into with designing a 3D virtual cockpit are that if one is using AF99 as a design tool, the output does not hook into the correct variables to determine when the viewpoint is inside or outside the aircraft. The stock CFS aircraft hook into the correct variables though.
The easy way to check this is to switch into chase view. With stock aircraft, the views are as expected. With AF99 aircraft, you will still see parts of the cockpit that should only be visible from an interior view. I ran into this when building my P-51A way back. I don't know of an easy solution besides building with SCASM.

Another problem is that the virtual cockpit in free flight uses the airfile "Fuselage" parameters, but the quick combat version uses 0,0,0 as the viewpoint of the virtual cockpit.

Know of a solution? I don't.
- Ivan.

EMatheson
January 18th, 2006, 17:30
Important to note!, with my own expirementing, I have found that any file can be loaded as texture for the backgrounds of DVC's. I was messing around with a modified version of the default Spitfire Mk IX one day and found that by placing any BMP files into the textre folder of the default aircraft and aliasing to that file, the blank gauge slots would be filled with bits of that image. Specifically, I used SpitTex3.BMP from the main texture folder. While the gauges wouldn't load over the bitmap in that specimin, I tried it again with an unmodified version of the same aircraft to meet sucsess. textures for DVCs need not be named in such a confusing manner.

thought this might help clear up a bit of unnessesary confusion........

P J Dunbar
January 20th, 2006, 05:34
Guppanui,

Here are all the .BMPs actually contained in the CFS1 Stock Hurricane_I texture directory:


HawkTex1.BMP
HawkTex2.BMP
Hurr_1.BMP
Hurr_2.Bmp
Hurr_w.BMP


HawkTex1.BMP and HawkTex2.BMP contain all the VC's textures.

HawkTex1 also contains the Gunsight. It must be handled with care when repainting and treated with BMP2000 if you don't want to lose the gunsight's transparency.

In the Panel directory, you find the following files:


Background_1024.BMP
Background_640.BMP
Palette.BMP
Panel.cfg
Thrust_Lever_Background.BMP


Background_1024 and 640.BMPs are the 2D panel texture in two sizes. Background_640.Bmp may be considered as redundant so there won't be much problem to it.

Palette.BMP is the 2D panel background palette. You must create a new one when you repaint the panel so that you're sure to keep the right shades of colour.

The panel.cfg file contains all the informations about the panel's different windows. The $Hurricane_I file I was refering to in my previous post is very important for displaying gauges in the VC panel. Although there isn't such a file in the texture or panel directories it is mapped so in the .MDL file. Thas why I would talk of a somewhat "fictious" texture.

To convince yourself of that, you just need to alter its name in the panel.cfg file. The result will be that the gauges won't display although you may still see their location as opaque squares. Texturing won't be however affected in the other VC's areas.

So this $HurricaneI file has really nothing to do and shouldn't be confused with the VC's inside areas texturing.

Greetings,

Pol.

P J Dunbar
January 20th, 2006, 05:56
Ivan,

After recently repainting and fitting the stock Hurricane_I with a new HUD panel , I noticed that the cockpit and wing areas didn't display anymore in three of the directional views. Hubbabubba had a look at it but was as puzzled as me about the reason of such a bug. I have just designed similar panels for the stock Spitfire_I and BF109E and repainted their VC without encountering this problem.

May I send you a copy of my project so that you can give me your advice?

Thanks a lot,

Pol.

Ivan
January 20th, 2006, 09:35
Hi PJ,
You can send it if you like, but this is not a topic that I really know much about. I'll take a look at anything you send though.

- Ivan.

EMatheson
January 25th, 2006, 09:26
ummm-no actually.... those opaque squares are actually built into the file on default aircraft. The texture that texture those squares in the spitfire is SPITTEX3.bmp in the main texture directory. useing the techniques I emnumerated earlier, I am currently, and meeting sucsess, building a virtual cockpit for Alail l'hommes P-51d

EMatheson
January 25th, 2006, 23:12
to clarifiy, I meant that the squares were built into the MDL file. Sorry about the spelling in my previous post- I was in a bit of a hurry.

P J Dunbar
January 27th, 2006, 08:26
How can you build a VC cockpit in Alain L'Homme's and therefore modify its .MDL file? Have you got access to its source file?... For the CFS1 stock planes, Jerry Beckwith has made a program that allows to rename each aircraft in the .MDL file. It is thus possible to make several distinct versions or repaints of a same aircraft without having interference when loading in CFS1.

Greetings,

Pol.

EMatheson
January 27th, 2006, 18:16
It shouldn't be nesecarry to modify the MDL. The effect of the VCockpit instructions, as I understand it, is merely to use as a panel bitmap a texture that just happens to be attached to the plane. The postion instructions are, just as on panels, instructions as to where gauges go on a background file.
On panels, if the referenced backgound is not there, it simply doesn't try to load it, so a common technique is to place polygons referenced to a non-existant texture over the desired location in the VC, and then place gauges at postions on this texture. The game will not try to load a non-existant texture, but it will load gauges where-ever the model references to that texture. As far as I understand, that is why fake textures are used- so you do not end up with gauges on the wings, or in the gear, on accident.

hubbabubba
January 28th, 2006, 00:09
Hi Pol!
After recently repainting and fitting the stock Hurricane_I with a new HUD panel , I noticed that the cockpit and wing areas didn't display anymore in three of the directional views. Hubbabubba had a look at it but was as puzzled as me about the reason of such a bug.

Before my little mishap I had a chance to study the question and found at least some answers:
1- The VC view DO NOT coincide with the real pilot's POV, it is situated within the model fuselage;
2- The "birdcage" of the canopy, the front, side and rear panels are marked for interior view in the model. BTW, so are the wings! Try this little experiment: move your ailerons while looking at them from the VC, they do not move! From the exterior view, they do.

I would like to have a look at your weird Hurricane. Could you send me a copy of the model folder marked "weird_Hurry"?

Hubbabubba
P.S.- I do not need the textures, just the model please.

P J Dunbar
January 31st, 2006, 08:19
Hubba,

This morning I've only sent you the normal .mdl file when you probably wanted the whole folder containing the two .mdl (the other one being the crash .mdl) and the mdl cfg file. I must be a bit mentally strained as I haven't stopped working all last weekend on new improved panels for the stock planes ...

If you need the complete directory, I'll send it tomorrow as I've got it at home and only have internet at the office for the moment.

Concerning the VC, those I built in CFS2, FS 2002 and FS2004 were designed as a distinct model including all internal parts as well as all external areas that could be seen from the pilot's point of view. I designed this model in a five times larger scale as it was to be seen from closer and needed to be more detailed. I only brought both models back to the same scale just before merging them together. The pilot's point of view was the same.

Greetings,

Pol.

hubbabubba
January 31st, 2006, 20:21
Hi Pol!
If you need the complete directory, I'll send it tomorrow as I've got it at home and only have internet at the office for the moment.


Please, do so... and there is no hurry:cool: !

Hubbabubba
P.S.- If it is not your textures, it must be your model. I'll see...:banghead: