Board index FlightGear Development Aircraft

Cessna 172P detailed (was "Cockpit textures for the c172p")

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby imagio » Fri Mar 27, 2015 11:27 pm

I am seeing a crash when using the c172p-detailed with the integrated qt5 launcher on OSX. When I have the aircraft installed the launcher crashes but the aircraft works great if FG is started from the terminal with ./fgfs --aircraft=c172p-detailed

Seems to be something about the c172p-detailed in particular that the new launcher does not like as other aircraft work fine.

Also, thanks to all involved with this great project! It is nice to see a high quality version of this iconic aircraft. Hopefully it can be the default for future FG versions.
imagio
 
Posts: 33
Joined: Wed Mar 19, 2014 6:31 pm
Location: Pittsburgh
OS: Win 8.1

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby ludomotico » Fri Mar 27, 2015 11:47 pm

wlbragg wrote in Fri Mar 27, 2015 10:43 pm:Unfortunate it looks like there are only two ways to do this, and neither are optimal.


Yes, I'm aware of the discussion in the development list.

Another way to do this (i have just checked it works for FGFS v3.0) is taking advantage of the limitation "objects only have one effect".

c172p-detailed-set.xml and Models/c172-detailed.xml are unchanged.

New file: c172p-detailed-compatible-set.xml Pilots using <v3.5 are expected to load this version of our aircraft.

Code: Select all
<PropertyList include="c172p-detailed-set.xml">
    <sim>
        <description>Cessna 172P Skyhawk (1981 model, detailed, compatible)</description>
        <model>
            <path archive="y">Aircraft/c172p-detailed/Models/c172p-detailed-compatible.xml</path>
        </model>
    </sim>
</PropertyList>


That is: it is the same, except it loads a different model. New file Models/c172p-detailed-compatible.xml

Code: Select all
<PropertyList include="c172p-detailed.xml">
 <effect>
   <inherits-from>Effects/model-transparent</inherits-from>
   <object-name>glas</object-name>
   <object-name>leftwindow</object-name>
   <object-name>rightwindow</object-name>
 </effect>
 
 <effect>
   <inherits-from>Effects/model-transparent</inherits-from>
   <object-name>glas_interior</object-name>
 </effect>
 
 <effect>
   <inherits-from>Effects/model-transparent</inherits-from>
   <object-name>leftwindow_interior</object-name>
   <object-name>rightwindow_interior</object-name>
   <object-name>glas_interior_sides</object-name>
 </effect>   

</PropertyList>


That is: revert the effects on these objects to Effect/model-transparent. We will have the warning "effect not found" in the console of v3.0 while fgfs includes the original Models/c172p-detailed.xml, but the effect really in use during the simulation is Effect/model-transparent.

We still have to locate an effect to substitute Aircraft/c172p-detailed/Models/Effects/interior/c172p-interior in v3.0 for the panel and the shadows. Probably, it would be enough just hiding the shadows in the "compatible" model.

This is a hack that could potentially have some unplanned side effects. And a new version of the aircraft will appear in the list of available aircrafts.

I'll be away until next Friday. If you think this approach is acceptable to have at least limited support for older versions until we figure out another solution, please, add these files to the project.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby wlbragg » Sat Mar 28, 2015 10:28 pm

FYI, anyone wanting to try this aircraft in 3.4 or less, try to grab the internal-shadow-control branch aircraft. It should be setup in such a way you can run it in 3.4. There is a menu choice to activate internal "glass" shadow and reflections if you want to us it in 3.5.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby Philosopher » Sun Mar 29, 2015 1:20 am

Would it be easy to split it up into 2 model XML files? (3.5+ and 3.4-) Maybe have 3, with one for common animations etc. If so, I believe a little bit of Nasal could be used with the "reload model" feature to revert to the older model (it would be a little strange to see a second loading screen, but it people are going to be using old versions that's that they get ;)).

If you want I could try to code it... unfortunately I do not believe OSG and SG are compiling for me as of late, so i don't exactly have 3.5...
Philosopher
 
Posts: 1593
Joined: Sun Aug 12, 2012 7:29 pm

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby wlbragg » Sun Mar 29, 2015 4:55 am

Would it be easy to split it up into 2 model XML files?

Yeah that would also work. I don't know if it would be easier to do that or ludomotico "hack".

What I really want to finish investigating is the "internal-shadow-control branch aircraft" I setup. All that is left to complete is the interior cockpit objects being duplicated in the model. Everything else "glass and windows" already is.

It will appear to be the cleanest looking as you'll only have one aircraft entry or name in fgrun and some menu choices. What I am really curious about is, what if any overhead there is in duplicating all those objects in the model?

Other than that, it is pure aesthetics from a programming perspective of resorting to that type of manipulation to get the compatibility regression. But if it doesn't negatively affect the current behavior of the aircraft, who cares?

I already committed the finalized internal cockpit object list and duplicated the objects in my local model, but I have something wrong. Bad child count or broken group. It was working with the glass and window duplicated but after I duplicated the 20+ some odd cockpit objects, I get a corrupted or missing fuselage when switching the internal shadow on. I'm pretty sure it is just a minor mistake somewhere in my duplication process of the model.

You know, there is yet another option. I don't know if I would recommend it for everyone, (I'd certainly try it if I was on 3.4). Thorsten kind of verified on the mailing list that there were no special core c++ edits to make the glass and shadow effects (internal) work in 3.5. So technically anyone using 3.4 could simply copy 3 shader files, one eff file and one xml file from 3.5 to 3.4 and should have the effects framework working.

I'm pretty sure this is all that was touched.
Shaders/glass-ALS.frag
Shaders/glass-ALS.vert
Shaders/model-interior-ALS-base.frag
Effects/glass.eff
Environment/environment.xml

I don't know about the "external" shadow-volume, if any core c++ was required or not. It would require a couple more files. But at least it is already accounted for even though it is by not using it.

WARNING:
If anyone wants to experiment with their 3.4 install to see if this works, make sure you backup any of those existing 3.4 files first and then just copy these five FG 3.5 files to FG 3.4.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby wlbragg » Sun Mar 29, 2015 7:13 am

I finished duplicating the internal shadow cockpit objects in the "internal-shadow-control" branch. So it should be full on compatible with 3.4 and still have all the 3.5 effects.
I guess we need to have users test this on 3.4 and 3.5 and see how well it works, overhead, any quirks, whatever. Then we can decide if it is worth it because we will probably have to do the duplication process in the model at least one more time after all the model work is finished.


A couple other possible issues I need to report. I didn't open them as issues yet until I verify they are indeed new issues.

1) The strobe lights start on and not blinking when booting up the sim. They don't start blinking until you start the aircraft.

2) The engine g-force stall isn't working anymore?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Sun Mar 29, 2015 3:13 pm

Guys,

Since some few commits ago I am not able to change liveries. When I click on the menu Cessna C172P and then in the item "Select livery", nothing happens except for the following error in the the FG log:

Code: Select all
Nasal runtime error: No such member: dialog
  at /sim/bindings/menu/binding[94], line 1


The same is true when I click on "Immatriculation":

Code: Select all
Nasal runtime error: No such member: dialog
  at /sim/bindings/menu/binding[95], line 1


Has anyone else experienced this lately? Should I open an issue for it?

Cheers,
Gilberto
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby wlbragg » Sun Mar 29, 2015 4:19 pm

My livery selecting works fine with the most current pull. But the Immatriculation is buggy as it looses and adds letters or numbers I didn't type.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Sun Mar 29, 2015 4:27 pm

@wlbragg ok, so it seems the problem is only on my side. Do you or anyone else have any clue what may be happening?
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby ludomotico » Sun Mar 29, 2015 4:29 pm

I will be away from my computer until Friday, so I cannot participate in the project. But I can answer questions :)

gsagostinho wrote in Sun Mar 29, 2015 3:13 pm:Since some few commits ago I am not able to change liveries.


We are experimenting a lot of regressions lately. External lights, liveries, the human model (I know you dislike this model, but it is not showing in the cockpit view since a few commit ago, and I don't know why) We should probably sit down for a while and try to fix all these regressions before proceeding with new features.

2) The engine g-force stall isn't working anymore?


Yes, I switched it off. It cuts down fuel very fast when g-force is less than 0.5 and it is so unrealistic I went mad every time the engine switched off. Currently, the function just returns the current setting for mixture. I have not fixed this because this code must be converted into a jsbsim system, as well as the carburetor heat/icing. I was struggling with jsbsim functions for weeks, but I cannot make them to work and I'm a bit frustrated at the moment :) I'll try to look into this after the holidays (I live in Spain. In Spain, as in many catholic countries, the Easter holidays last for a week and I'm currently visiting Morocco)

Philosopher wrote in Sun Mar 29, 2015 1:20 am:Would it be easy to split it up into 2 model XML files?


Yes, the split would be very easy. The management of two nearly equal .xml files, wouldn't be as easier. Keep in mind we are modifying the .xml file every day, and having another .xml file to modify and keep in sync will be a difficult task. This is why I prefer not splitting the project into two completely separated .xml files.

However, this is what I proposed in my last message :) The thing is that the second (v3.0 ready) .xml file is not a complete file, but it includes the first (v3.5-ready) .xml file and just substitutes the new effects with other effects available in v3.0
Last edited by ludomotico on Sun Mar 29, 2015 4:36 pm, edited 1 time in total.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Sun Mar 29, 2015 4:34 pm

ludomotico wrote in Sun Mar 29, 2015 4:29 pm:
gsagostinho wrote in Sun Mar 29, 2015 3:13 pm:Since some few commits ago I am not able to change liveries.

We are experimenting a lot of regressions lately. External lights, liveries, the human model (I know you dislike this model, but it is not showing in the cockpit view since a few commit ago, and I don't know why) We should probably sit down for a while and try to fix all these regressions before proceeding with new features.


Ok ludo, thanks for the answer! Currently I am not working on anything new anyway, so I will hold my horses and wait for the fixes. Let me know if I can be of any help with these issues.

Cheers!
G.
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby wlbragg » Sun Mar 29, 2015 4:55 pm

visiting Morocco

Fun, stay safe!

I switched it off

OK, no problem. I hadn't bothered to look at the code to see if it was changed.

gsagostinho, if you know how to checkout the other branches, try the one I added "internal-shadow-control" and see if the livery selection works for you in that branch.

Just don't forget to switch back when you do more work. :)
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby gsagostinho » Sun Mar 29, 2015 6:41 pm

wlbragg wrote in Sun Mar 29, 2015 4:55 pm:gsagostinho, if you know how to checkout the other branches, try the one I added "internal-shadow-control" and see if the livery selection works for you in that branch.

Just don't forget to switch back when you do more work. :)


Thanks for the suggestions! Just did that, it turns out I have the same problem with the inter-shadow-control branch. But then I tried other aircraft (I haven't flown anything else than our c172p-detailed in a looong time), and I have this problem with other planes as well! So something is wrong with my installation then, nothing to do with our project.

Cheers!
Gilberto
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 7:27 pm
Location: London, UK

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby wlbragg » Mon Mar 30, 2015 12:58 am

ludomotico wrote in Sun Mar 22, 2015 8:19 pm:- For some reason, switches are very dark when they are ON, and perfectly ok when they are OFF. This is related to the c172p-interior effect, but I can't see why. I have removed the effect from the LandingLightSwitch to check this and run tests.

Now that I have all the proper objects accounted for in the internal shadow effect, I finally got around to taking a look at this effect you noticed.
What I see happening with the group of the six lighting switches, (one of the 6 is the green beacon switch), is that using the time warp most of the time the lighting on the switch seems to behave. There is one point though that when they are ON, and the shadow is over them, they appear to be shaded correctly then all the sudden they light up for a couple of clock ticks and then go back to being shaded again. But the shadow is covering them the whole time and they shouldn't be changing at all. Then other times it doesn't do that. It's inconsistent. I don't think I noticed them ever too dark, unless they are supposed to light up when turned ON. For the most part it did seem when OFF they behaved correctly. We could remove the effect from all those switches like you did the one and it probably would never be noticed.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna 172P detailed (was "Cockpit textures for the c172

Postby wkitty42 » Mon Mar 30, 2015 1:29 am

i've been trying to follow this and understand what's happening... it almost sounds like when they are shadowed the sim is showing them as off or dim... perhaps, when the shadow is over instruments, their lightening should be increased so that the light shows up more like it would in the dark?? but i may be off in left field, too... i have a copy of this craft but haven't tried it out yet... it is a couple of days old and i guess i should update it first before trying it...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 11 guests