Board index FlightGear Development Aircraft

Introducing the update of the Cessna 337 Skymaster

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

Re: Introducing the update of the Cessna 337 Skymaster

Postby Gijs » Sun Feb 12, 2012 4:05 pm

Ah, then it's the issue of me overwritting the old file, rather than deleting the old one first ;)
I'll push it to Git in a minute.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Introducing the update of the Cessna 337 Skymaster

Postby SpeedBird » Fri Mar 02, 2012 10:26 pm

I have a new favourite aircraft.

Thank you El Flauta!

Just one question: any chance of a paint kit for either PhotoShop or GIMP?
SpeedBird
 
Posts: 4
Joined: Mon Feb 20, 2012 12:51 am

Re: Introducing the update of the Cessna 337 Skymaster

Postby El Flauta » Sun Mar 04, 2012 2:58 pm

Fernando and I are working in a Cessna 337 update, to get FG 2.6 support. This should be ready very soon :)

SpeedBird wrote in Fri Mar 02, 2012 10:26 pm:I have a new favourite aircraft.

Thank you El Flauta!

Just one question: any chance of a paint kit for either PhotoShop or GIMP?

Thanks!

But i'm not the unique developer. Fernando deserves 50% of the credits.
The original texture design was made in Inkscape; so, it's vectorial. However, i'll consideer to include a paintkit in the next version.
Vive FlightGear! Have you a Ñ on your keyboard? Spain-LatinAmerica FlightGear community!
--
PZL M18B Dromader
CASA C-101 Aviojet
Cessna 337G Skymaster
User avatar
El Flauta
 
Posts: 426
Joined: Fri Mar 14, 2008 1:09 am
Location: SCVM, Chile
Callsign: CC-FLT
Version: 3
OS: Windows 7 SP1

Re: Introducing the update of the Cessna 337 Skymaster

Postby mr_no » Fri Mar 09, 2012 12:05 am

For me the FG 2.6 crashes when aircraft is begin loaded. I think it works in 2.4.
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: Introducing the update of the Cessna 337 Skymaster

Postby JC_SV » Fri Mar 09, 2012 1:20 am

At least I am not the only one with issues with the Cessna 337
In Ubuntu 11.10 , Flightgear 2.6 and Openscenegraph 3.0 It loads but the exterior is all black and the interior ( cockpit ) is looking good. But in OpenSuse , Flightgear 2.6 and Openscenegraph 3.1 doesn't load at all and this is what I get:
Code: Select all
-----------------------------------------------------------------
no image file, maybe the reader did not set the filename attribute, using white for type '2d' on '', in /technique[9]/pass[0]/texture-unit[0]
creating 3D noise texture... DONE
no image file, maybe the reader did not set the filename attribute, using white for type '2d' on '', in /technique[9]/pass[0]/texture-unit[0]

MODEL INFO: Cessna 337G Skymaster

Type: Two-engine aircraft (civilian version)
Powerplant: 2 Continental IO-360-C piston engines in a push-pull line configuration, 210HP each one
Capacity: 1 pilot and 5 passengers

Tipo: Avioneta bimotor (version civil)
Planta motriz: 2 motores a piston Continental IO-360-C de 210HP cada uno, de configuracion tira-empuje en linea
Capacidad: 1 piloto y 5 pasajeros

Authors/Autores: Fernando Espinosa y Pavel Cueto
February/Febrero 2012
KI266 dme indicator #0 initialized
Emergency Locator Transmitter (ELT) loaded
loading scenario 'nimitz_demo'
PNG lib warning : Malformed iTXt chunk
  Trim Results:
          Altitude AGL:      4  wdot: -7.14e-03 Tolerance: 1e-03  Failed
           Pitch Angle:   0.02  qdot:  6.52e-04 Tolerance: 1e-04  Failed

  Trim Statistics:
    Total Iterations: 61
    Sub-iterations:
    wdot: 386 average: 6.3279  successful:  0  stability: 2
    qdot: 129 average: 2.1148  successful:  61  stability: 2
    Run Count: 2018
weather util initialized ...
glLinkProgram "" FAILED
Program "" infolog:
Vertex shader(s) failed to link, fragment shader(s) failed to link.
WARNING: warning(#276) Symbol 'Normal' usage doesn't match between two stages
ERROR: error(#401) function fog_Func(vf3;i1; is not implemented.
WARNING: warning(#276) Symbol 'Normal' usage doesn't match between two stages
ERROR: error(#401) function fog_Func(vf3;i1; is not implemented.



I think you ( EL Flauta and Pavel Cueto) are already aware of this but just in case you aren't I posted it...
I hope it is updated soon ...
Thanks in advance !

EDITED: I almost forget a very important info !!! :
This only happens with my computer with an ATI 6850 ...
It loads perfectly in LinuxMint 12 and my old Pentium IV and Nvidia 6200 AGP !!! ( which I barely use because I can't have almost any beautiful efffects enabled...)
So this must be related with the fact that we are Ati videocard users ( so sad because it makes believe that we could end up not having the Cessna 337 available if El Flauta and Pavel can't test it in a pc with an ATI ( AMD ) Video Card... )
Maybe el Flauta or Pavel can tell us where (which model(s) ) the vertex shader is used to see if we can fix it
Regards JC_SV
JC_SV
 
Posts: 80
Joined: Tue Nov 29, 2011 8:06 pm

Re: Introducing the update of the Cessna 337 Skymaster

Postby El Flauta » Sat Mar 10, 2012 8:41 am

Sorry if i didn't answer before. I'm very busy, and the last week i had no time to see the forum... i'll answer now:

We don't have ATI cardds, so we can't test the plane on them. At same time, our work is basically a remake of older xml or nasal from another aircraft (we are not coders) so, technicall problems may be very hard to fix for us. I was noticed FlightGear 2.6 is available in playdeb.net; so, i will be able now to test the plane at least in Ubuntu.

We are re-starting our work. The update may be ready this weekend (is not so much job, really). The fixes will be basically two, and both only for FlightGear 2.6:
    New "aircraft shader" for 2.6
    Property fix for the EGT
---
And a a little aclaration:
    Pavel = El Flauta
    Fernando = Fernando
:lol:
Last edited by El Flauta on Sun Mar 11, 2012 3:14 am, edited 1 time in total.
Vive FlightGear! Have you a Ñ on your keyboard? Spain-LatinAmerica FlightGear community!
--
PZL M18B Dromader
CASA C-101 Aviojet
Cessna 337G Skymaster
User avatar
El Flauta
 
Posts: 426
Joined: Fri Mar 14, 2008 1:09 am
Location: SCVM, Chile
Callsign: CC-FLT
Version: 3
OS: Windows 7 SP1

Re: Introducing the update of the Cessna 337 Skymaster

Postby JC_SV » Sat Mar 10, 2012 4:19 pm

Ok. No problem. I'm sorry for confusing yor names.
Thanks Pavel and Fernando
Regards
JC_SV
 
Posts: 80
Joined: Tue Nov 29, 2011 8:06 pm

Re: Introducing the update of the Cessna 337 Skymaster

Postby JC_SV » Sun Mar 11, 2012 5:13 am

Well, after a while a found the cause of the problem.
But first this is how it looked in Ubuntu - Flightgear 2.6 and Openscenegraph 3.0.0 before :

Image

In OpenSuse it wouldn' t even load as I had said before....

But I think it is related to ATI Drivers which I haven't checked the version in Ubuntu, but in OpenSuse are: Catalyst 12.1
and OpenGL 4.2.11399

The fix was to comment this part of the code in reflect-bump-spec.eff file located in: /usr/share/flightgear/Aircraft/Cessna337/Models/Effects/

Code: Select all
   
<!-- Commented by JC_SV for ATI(AMD) Video Cards:
         <program>
            <vertex-shader>Shaders/reflect-bump-spec.vert</vertex-shader>
            <fragment-shader>Shaders/reflect-bump-spec.frag</fragment-shader>
            <attribute>
               <name>tangent</name>
               <index>6</index>
            </attribute>
            <attribute>
               <name>binormal</name>
               <index>7</index>
            </attribute>
         </program>
-->


For those lazzy boys who just want to replace the file corrected I uploaded to Mediafire : http://www.mediafire.com/?wyvudzbitha21m0 Replace the file: reflect-bump-spec.eff --> /usr/share/flightgear/Aircraft/Cessna337/Models/Effects/ reflect-bump-spec.eff ( Sorry for being a spoon-feeder ...)

And now It loads and looks like this:

Image

So you ( Fernando and Pavel) could check if you want to add the changes to your aircraft to have it working for ATI users...

Another thing: I fixed another ATI user issue with the aircraft showing in a quarter or half of the scrren ( same issue posted here : viewtopic.php?f=68&t=15194 and here : viewtopic.php?f=68&t=15380
and here is the file if you want to replace it:
http://www.mediafire.com/?j6xk8oo02t2r434 /usr/share/flightgear/Aircraft/Cessna337/Cessna337-set.xml

Let me know if it doesn' t work for you ( ATI users). I might be missing some information because I tried editing other files before getting it fixed.

Best Regards

JC_SV
JC_SV
 
Posts: 80
Joined: Tue Nov 29, 2011 8:06 pm

Re: Introducing the update of the Cessna 337 Skymaster

Postby i4dnf » Sun Mar 11, 2012 10:02 am

The first issue will be an issue on any system, with fg2.6.0 or newer, not only on those having ATI cards. That happens because the effect related shaders have changed, and so has the main effect file itself. That is why aircraft developers should NEVER copy the main effect file to their aircraft directory and edit it, but they should create an effect file that inherits form the main effect file, and that contains only those parts of the parameters section that are changed.
JC_SV if you'd check your log with the original effect file, you'll see some glsl compiler errors stating that the shaders already contain a main()

The second fix is an ugly hack, it's not the proper way to fix that issue, and aircraft developers should not have to add random instruments to their aircraft. That bug is being investigated properly on the bug-tracker
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Introducing the update of the Cessna 337 Skymaster

Postby mr_no » Sun Mar 11, 2012 6:26 pm

Thanks JC_SV. That fixed it.
I guess bump mapping shaders crash FG on ATI cards, similar to landmass crashing FG.
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: Introducing the update of the Cessna 337 Skymaster

Postby El Flauta » Sun Mar 11, 2012 9:02 pm

JC_SV wrote in Sun Mar 11, 2012 5:13 am:The fix was to comment this part of the code in reflect-bump-spec.eff file located in: /usr/share/flightgear/Aircraft/Cessna337/Models/Effects/

(...)

So you ( Fernando and Pavel) could check if you want to add the changes to your aircraft to have it working for ATI users...

Hello, JC_SV, thanks for your efforts, but... i said "We are re-starting our work. The update may be ready this weekend (...) New "aircraft shader" for 2.6" for some reason: The reflect-bump-spec.eff file will be not used anymore; it doesn't work with FG 2.6 on NVidia cards, too. I made a totaly new shader based on B1900 current shader, with new reflection texture and values, etc.


i4dnf wrote in Sun Mar 11, 2012 10:02 am:That is why aircraft developers should NEVER copy the main effect file to their aircraft directory and edit it, but they should create an effect file that inherits form the main effect file, and that contains only those parts of the parameters section that are changed.

(...)

and aircraft developers should not have to add random instruments to their aircraft

Sorry i4dnf, but i disagree about that: If I don't want to use -in my humble opinion- poorly (or plain) textured, low resolution instruments, i have the right to make my own models: it's open source, isn't? And others can use it, too :wink:

The issue about EGT happened due a JSBsim update; I bet it will affect generic isntruments, too (searching in the 3D instrument folder i found some bad-funcional, undocumented or outdated instruments, even with old .rgb textures). It's just need comunication to developers to keep them updated.

The same with shaders... what happen if the generic configurations looks bad in my model? What if i need to change the complete code? There are no much available documentation like how to modify only a part of a generic effect file? to fix it.

I have no much time to see your fixes this weekend... i'll try in night. See you, and thanks for your cares :)

---
I fly only in aircrafts with detailed and realistic cockpits. That is why i made a nice suite of Bendix King instruments for the aircraft (KX-155 radios, KI-206 VOR locators, KN-62A DME receiver, KR-87 ADF receiver, KMA-24 Audio panel, KT-76A Transponder and KI-250 Radar altimeter), wich i want to "give" to the community in a near future: i must complete the external boxes, and fix some minor adaptations used in the Cessna. I need help to adapt the nasal codes of the generic isntruments for the new ones, because some of then have different needs...
Vive FlightGear! Have you a Ñ on your keyboard? Spain-LatinAmerica FlightGear community!
--
PZL M18B Dromader
CASA C-101 Aviojet
Cessna 337G Skymaster
User avatar
El Flauta
 
Posts: 426
Joined: Fri Mar 14, 2008 1:09 am
Location: SCVM, Chile
Callsign: CC-FLT
Version: 3
OS: Windows 7 SP1

Re: Introducing the update of the Cessna 337 Skymaster

Postby jonsberndt » Sun Mar 11, 2012 9:52 pm

What a great looking 3D model!

JB
Jon S. Berndt
Development Coordinator
JSBSim Project
http://www.JSBSim.org
http://www.facebook.com/jsbsim
User avatar
jonsberndt
 
Posts: 204
Joined: Tue Aug 07, 2007 2:44 am
Location: Westminster, Colorado

Re: Introducing the update of the Cessna 337 Skymaster

Postby HHS » Sun Mar 11, 2012 10:30 pm

El Flauta wrote in Sun Mar 11, 2012 9:02 pm:The same with shaders... what happen if the generic configurations looks bad in my model? What if i need to change the complete code? There are no much available documentation like how to modify only a part of a generic effect file? to fix it.


That's the misunderstanding here.... What i4dnf proposes does exactly what you wants. It overrides the default values.

You don't need the generic-shader in Aircraft/Generic/effects/Fuselagereflect.eff for- It wasn't added by the original shader-authors.... that was comitted by someone special. For quick and dirty work nice and maybe a start for beginners.

But If you prefer as well to see custom made and therefor realistic effects, you have to do it the same way as suggested by i4dnf.


Have a look on the C172p for the simple bumspec.eff.
The IAR80 for the newer 2.6.0 Combined-Shader. It inherits from data/Effects/model-combined.eff.
Or the DHC2- the later one even uses it's own Cubemaps....

You can find the documentation as always in data/Docs/ under model-combined.eff.
If there is something not clear enough just ask here- I'm sure all involved authors are happy to help and to get a feedback.

El Flauta wrote:Sorry i4dnf, but i disagree about that: If I don't want to use -in my humble opinion- poorly (or plain) textured, low resolution instruments, i have the right to make my own models: it's open source, isn't? And others can use it, too


The problem is- FGdata still isn't splitted. That's why there was once an unwritten rule, to add new instruments to data/Aircraft/Instruments or Instruments-3d, so other aircraft can easily link to it.
But I agree- for the some visual experience and other things (subsystems) it often needs a custom made Instrument, lying in the Model-folder itself. Especially when photorealistic images has been used.

On the other side your instruments are already an improvement and I'm sure no one would mind adding it to data/Aircraft/Instruments-3d and make a replacement, so everybody can make use of it.

What I do see is, that some instruments folders in your C337G contains the instrument twice- lowpoly or 2d, and better quality. (as an example Models/Instruments/AI) - I'm sure the older 2d one can be deleted here.


At the end you set the bar quite high- I really enjoy flying this aircraft! Thanks for the whole work! :D
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Introducing the update of the Cessna 337 Skymaster

Postby i4dnf » Mon Mar 12, 2012 12:39 am

El Flauta wrote in Sun Mar 11, 2012 9:02 pm:
i4dnf wrote in Sun Mar 11, 2012 10:02 am:That is why aircraft developers should NEVER copy the main effect file to their aircraft directory and edit it, but they should create an effect file that inherits form the main effect file, and that contains only those parts of the parameters section that are changed.

(...)

and aircraft developers should not have to add random instruments to their aircraft

Sorry i4dnf, but i disagree about that: If I don't want to use -in my humble opinion- poorly (or plain) textured, low resolution instruments, i have the right to make my own models: it's open source, isn't? And others can use it, too :wink:


You completely misunderstood me.
1st issue: refers to this hypothetical case: You want reflections on the aircraft. You like how the default looks, but want a bit more reflection. All you need to do is make a local effect (in your aircraft's directory), that inherits from the main effect that is in $fg_root/Effects, and that has only a line that changes the reflection amount, you don't have to copy the whole file, as that file contains much more than just the parameters that you should set-up, and if you copy the whole effect, and the developers decide to change one of the shaders, your effect won't work any more (as is the case now)
Example simple local effect file:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
    <name>my_local_enhanced_reflect</name>
    <inherits-from>Effects/model-combined</inherits-from>
    <parameters>
        <reflection-enabled type="int">1</reflection-enabled>
   <reflection-correction type="float">0.5</reflection-correction>
</parameters>
</PropertyList>

As you need more things enabled/disabled, adjusted, textures changed, you add them in. If a parameter remains at the default value it should not be in the local effect. Also, no part of the effect file below the <parameters> section should be present in the local effect(with a few notable exceptions you can find in the documentation).
Example more customized effect:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
    <name>iar80_alu_internal</name>
    <inherits-from>Effects/model-combined</inherits-from>
    <parameters>
            <normalmap-enabled type="int">0</normalmap-enabled>
            <lightmap-enabled type="int">0</lightmap-enabled>
            <reflection-enabled type="int">1</reflection-enabled>
            <reflection-dynamic type="int">0</reflection-dynamic>
            <reflect_map-enabled type="int">0</reflect_map-enabled>
            <reflection-correction type="float">-0.05</reflection-correction>
         <texture n="5">
            <type>cubemap</type>
            <images>
               <positive-x>Aircraft/IAR80/Models/Effects/Textures/Cubemap/Interior/back.dds</positive-x>
               <negative-x>Aircraft/IAR80/Models/Effects/Textures/Cubemap/Interior/front.dds</negative-x>
               <positive-y>Aircraft/IAR80/Models/Effects/Textures/Cubemap/Interior/right.dds</positive-y>
               <negative-y>Aircraft/IAR80/Models/Effects/Textures/Cubemap/Interior/left.dds</negative-y>
               <positive-z>Aircraft/IAR80/Models/Effects/Textures/Cubemap/Interior/up.dds</positive-z>
               <negative-z>Aircraft/IAR80/Models/Effects/Textures/Cubemap/Interior/down.dds</negative-z>
            </images>
         </texture>
         <reflection-rainbow type="float">0.2</reflection-rainbow>
         <texture n="7">
            <image>Aircraft/IAR80/Models/Effects/Textures/Rainbow.dds</image>
            <filter>linear-mipmap-linear</filter>
            <wrap-s>repeat</wrap-s>
            <wrap-t>repeat</wrap-t>
            <internal-format>normalized</internal-format>
         </texture>
         <reflection-fresnel type="float">0.05</reflection-fresnel>
         <texture n="6">
            <image>Aircraft/IAR80/Models/Effects/Textures/FresnelLookUp.dds</image>
            <filter>linear-mipmap-linear</filter>
            <wrap-s>repeat</wrap-s>
            <wrap-t>repeat</wrap-t>
            <internal-format>normalized</internal-format>
         </texture>
         <reflection-noise>0.35</reflection-noise>
         <ambient-correction>0.25</ambient-correction>
      </parameters>
</PropertyList>


2nd issue: I was refering to the fix for the window size bug on ATI cards, that appears to be fixed by the addition of a "random" instrument (as in an instrument that has nothing to do with the current aircraft, it just "fixes" an issue caused by some other things) to the aircraft, so that things initialize a bit differently, and the window resizes properly. I wanted to say that it's not a proper fix, and you(or I, or some other developer) should not have to add some odd instrument just because it appears to fix an issue.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Introducing the update of the Cessna 337 Skymaster

Postby El Flauta » Mon Mar 12, 2012 6:50 am

Oh, sorry... i understand now.

I'll try with your recomendations... thanks again
Vive FlightGear! Have you a Ñ on your keyboard? Spain-LatinAmerica FlightGear community!
--
PZL M18B Dromader
CASA C-101 Aviojet
Cessna 337G Skymaster
User avatar
El Flauta
 
Posts: 426
Joined: Fri Mar 14, 2008 1:09 am
Location: SCVM, Chile
Callsign: CC-FLT
Version: 3
OS: Windows 7 SP1

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 20 guests