Board index FlightGear Development Aircraft

PC-9M updates

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

PC-9M updates

Postby erik » Sat Mar 11, 2017 12:45 pm

After applying the reflection shader to the PC-9M and seeing how good that looks I decided to give the PC-9M the "detailed Cessna 172P" treatment. So far I've made quite some changes to the model and animations and the exterior is starting to look really nice.

It's still a work in progress though but the basis was really well done by Petar Jedvaj which made it quite easy.
Things that need to be done:
* Updates to the cockpit (it is already quite decent)
* Systems modeling
* Tweak the FDM for better ground handling
* possibly more.


The result is committed to FGAddon.

Erik
Last edited by erik on Sat Mar 11, 2017 2:15 pm, edited 1 time in total.
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: PC-9M updates

Postby pjedvaj » Sat Mar 11, 2017 1:55 pm

Nice work with shaders. You made me install FG again just to check it out. :)

Image
Retired
User avatar
pjedvaj
 
Posts: 682
Joined: Thu Mar 18, 2010 9:32 pm

Re: PC-9M updates

Postby erik » Sat Mar 11, 2017 2:12 pm

Yes the instant gratification it gives pushed me to go further with it.
Great to see you back.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: PC-9M updates

Postby vanosten » Sat Mar 11, 2017 6:16 pm

I love it. Being Swiss the PC-9 has always been one of my favorites. Raindrops effect is so nice - it is somehow calming to fly slow in the rain :-)
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: PC-9M updates

Postby Johan G » Sun Mar 12, 2017 7:38 am

It kind of bother me that the reflectivity IIRC can not be altered between liveries. In particular that Slovenian livery is very dull and non-reflective compared to some of the other liveries. These are the two images I could quickly find that had the most similar lighting conditions:

Image
Pilatus PC-9M Hudournik at Airpower 11 [CC BY 3.0 (http://creativecommons.org/licenses/by/3.0)], by Niklas 555 (Own work), from Wikimedia Commons

Image
Boddy 261 (8030719105) [CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0)], by Simon Boddy from Maidenhead, Uk (261), from Wikimedia Commons
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: PC-9M updates

Postby Thorsten » Sun Mar 12, 2017 7:47 am

It kind of bother me that the reflectivity IIRC can not be altered between liveries.


It sort of can - you 'just' have to swap the surfaces with a <select> animation rather than the textures via livery support.

Or (haven't really tested this, but it ought to work) you can write a custom effect that uses the <predicate> section to swap textures - but that's prone to breakage...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: PC-9M updates

Postby D-ECHO » Sun Mar 12, 2017 8:39 am

Isn't the reflectivity just set by a <tag> in the .eff file? And therefor, can't you replace that value with a <use>property</use> tag so it can be switched via livery?
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: PC-9M updates

Postby pjedvaj » Sun Mar 12, 2017 11:24 am

Also different parts (materials) need to have different reflectivity. Unfortunately PC-9M project was abandoned by me way before I've started using normal and specular maps on my FG projects. They work fine under default rendering settings but I couldn't get normal map to work under ALS. Below is the screenshot of my Sea Harrier FA2 as an example with both maps applied:

Image
Retired
User avatar
pjedvaj
 
Posts: 682
Joined: Thu Mar 18, 2010 9:32 pm

Re: PC-9M updates

Postby Thorsten » Sun Mar 12, 2017 12:13 pm

Isn't the reflectivity just set by a <tag> in the .eff file? And therefor, can't you replace that value with a <use>property</use> tag so it can be switched via livery?


Unless you want to also change environment map or use a reflection map... If it's about gross reflectivity, you can do that.

but I couldn't get normal map to work under ALS


You probably didn't pass tangent and binormal to the ALS technique, only to the classic technique. Otherwise the implementation is identical and works out of the box, but this one step couldn't be done automagically.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: PC-9M updates

Postby pjedvaj » Sun Mar 12, 2017 1:04 pm

Thanks Thorsten, I've found a discussion on this subject I've been a part of few years ago. After been out of active development for few years there is a lot to catch up.

https://forum.flightgear.org/viewtopic.php?f=4&t=24273
Retired
User avatar
pjedvaj
 
Posts: 682
Joined: Thu Mar 18, 2010 9:32 pm

Re: PC-9M updates

Postby erik » Sun Mar 12, 2017 2:47 pm

Ideally I would love to be able to specify a different bumpmap texture based on the path provided by a property though. I tried the <use/> tag for the <image/> specifier of the bumpspec effect but it expects "texture[2]/image" instead of the texture path.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: PC-9M updates

Postby Thorsten » Sun Mar 12, 2017 3:40 pm

Ideally I would love to be able to specify a different bumpmap texture based on the path provided by a property though


This would be a welcome addition to the effect framework, but currently it doesn't work like this (also the ability to use a canvas as functional texture, i.e. do runtime-writable normal or specular maps would be a 'cool to have' feature).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: PC-9M updates

Postby Hooray » Sun Mar 12, 2017 5:32 pm

Thorsten wrote in Sun Mar 12, 2017 3:40 pm:This would be a welcome addition to the effect framework, but currently it doesn't work like this (also the ability to use a canvas as functional texture, i.e. do runtime-writable normal or specular maps would be a 'cool to have' feature).


Agreed, FWIW, Tim and Curt once talked about this idea - and more recently, James also suggested something along these lines, for a summary of the corresponding effects/Canvas related discussions, see: http://wiki.flightgear.org/Canvas_Devel ... 2F_Shaders

However, I think Stuart is the one with the most recent experience touching the materials framework - which would be one of the lowest hanging fruits to mutually integrate the materials and Canvas frameworks so that a Canvas texture can be treated as an input for a material, but also as an output/target buffer - i.e. so that nested effects using chained Canvas FBOs would become possible, which is also touching on psadro_gm's recent work relating to procedural texturing/draping: http://wiki.flightgear.org/Canvas_Scenery_Overlays

If/when this functionality is added, it would become possible to move most of the Rembrandt related FBO setup logic into xml/fgdata space without sacrificing any performance, while gaining tons of flexibility, also for people wanting to experiment with additional/alternate rendering approaches, such as:

http://wiki.flightgear.org/Experimental_terrain_engine
http://wiki.flightgear.org/Building_Fli ... ntegration
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: PC-9M updates

Postby erik » Mon Mar 13, 2017 4:43 pm

Turns out I was looking at the wrong part of the code, I've now located the proper part.
Give me a few days to look into this.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: PC-9M updates

Postby erik » Mon Mar 13, 2017 7:00 pm

No, I'm lost again. I hate this code,
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Next

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 17 guests