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: Cockpit textures for the c172p

Postby thevirtualfer » Wed Feb 11, 2015 10:28 pm

Maybe you are right, Torsten.

@ludomotico

If you wanna follow this path, please. Let me know before.
I have to apply the left side mirror and close a hole.

@primtala2

Maybe you are right, too.
I got the sign from a photo posted by the owner of this thread, @gsagostinho (who is missed somewhere, without a GPS).

I can purge it. But @ludomotico is leading the changes now. If he says to remove it, i will remove.

Anyway, you can remove it yourself, if yo want.
The texture file is COLOR_something.png, into the Models folder.

Cheers.
thevirtualfer
 
Posts: 167
Joined: Mon Jan 26, 2015 4:36 pm
Location: Benevides-PA Brazil (Benevides is inside Amazon Forest)
OS: Ubuntu Linux

Re: Cockpit textures for the c172p

Postby thevirtualfer » Thu Feb 12, 2015 3:26 pm

LIGHTS and SHADOWS

abassign wrote in Wed Feb 11, 2015 9:08 am:I think we can make the two illuminators domes softer and semi-transparent, as was done in DHC6 project.


Can you check how the lights are rendered when rembrandt is enable in the DHC6 ?

Here, i am facing the (guess it is a traditional one) dillema of getting good shadows or getting good transparencies.
See these referece pics :

Image

As you see, there is no texture semi-transparency when rembrandt is enabled.

Don't know if it is being fixed or not.
thevirtualfer
 
Posts: 167
Joined: Mon Jan 26, 2015 4:36 pm
Location: Benevides-PA Brazil (Benevides is inside Amazon Forest)
OS: Ubuntu Linux

Re: Cockpit textures for the c172p

Postby thevirtualfer » Thu Feb 12, 2015 9:15 pm

@ludo

- Joined the Manual and the bag into one LeftBag object ;
- Changed the name into xml, to reflect this change ;
- Aplied the mirror to the right side and closed ;
- Changed some incosistent names, (doorhandle, windowlock etc, to "object_left", "object_right" way of naming) ;
- Applied the mirror on the right door ;
- Leaving the door. The only way i see is to remodel a new door. I will not waste time on this for while ;
- I make some dirty in the main glass. But it doesn't work on rembrandt. Lost a lot os time trying to figure why, until realize that rembrandt views the trasparency as 0 or 1. There is no semi-transparency.

The files are in the same place.

I see these changes as possible finished. If you want submit, it is with you.

Going to seats, but tomorrow.

Cheers, boss !
thevirtualfer
 
Posts: 167
Joined: Mon Jan 26, 2015 4:36 pm
Location: Benevides-PA Brazil (Benevides is inside Amazon Forest)
OS: Ubuntu Linux

Re: Cockpit textures for the c172p

Postby ludomotico » Fri Feb 13, 2015 1:52 am

thevirtualfer wrote in Thu Feb 12, 2015 3:26 pm:LIGHTS and SHADOWS

Here, i am facing the (guess it is a traditional one) dillema of getting good shadows or getting good transparencies.
See these referece pics :

Image


There is an effect to manage this: model-transparent. Just add these lines to c172-detailed.xml:

Code: Select all
   <effect>
       <inherits-from>Effects/model-transparent</inherits-from>
       <object-name>navlight_left</object-name>
       <object-name>navlight_right</object-name>
       <object-name>navlight_back</object-name>
       <object-name>strobe1</object-name>
       <object-name>strobe2</object-name>
       <object-name>navlight_back</object-name>
       <object-name>BeaconOffX</object-name>
   </effect>


I have added these lines after the already existing comment "<!-- Transparent Surfaces for Rembrandt rendering -->" ;)

Image

In Rembrandt, an object with this effect will use the alpha channel but won't cast any shadow (afaik) Be careful with transparent objects in Rembrandt because there many appear problems with the order surfaces are drawn. Check this thread for reference: viewtopic.php?f=5&t=22707

This is the only change I've made today, so I'm not uploading again my files (they take a while, my connection is not the best)

Also, we must configure the new effect to have shadows at least for the exterior model in ALS. This would be a job for the next week, I'll be flying this weekend!
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cockpit textures for the c172p

Postby gsagostinho » Fri Feb 13, 2015 11:24 pm

Hi all,

Sorry for my late reply, I've been busy this last week. I created a new image for the vac gauge with the same resolution as before (128x128); it is very simple but I hope you will like it (or find it acceptable). It is based in the gauge picture that ludomotico had previously shared with us. Let me know if this works.

VAC:
Image

VAC without the needle:
Image

Needle only (background is transparent, so the white needle is invisible due to the forum's white background):
Image

Link for the xcf file: http://www.4shared.com/zip/KQT1YkuCce/vac.html

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

Re: Cockpit textures for the c172p

Postby ludomotico » Sat Feb 14, 2015 12:23 am

Thanks! This texture looks superb! I will add this texture to the aircraft, but I'm afraid yo'llu have to wait until Sunday.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cockpit textures for the c172p

Postby gsagostinho » Sat Feb 14, 2015 12:26 am

I am glad to hear that, ludomotico! I am glad I can contribute a little bit somehow :) And there is no rush in adding it to the aircraft.

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

Re: Cockpit textures for the c172p

Postby thevirtualfer » Sat Feb 14, 2015 1:27 am

gsagostinho wrote in Fri Feb 13, 2015 11:24 pm:Hi all,

Sorry for my late reply, I've been busy this last week.


Hey, guy !
Glad to see you.

Great job with the VAC.

Welcome back !
thevirtualfer
 
Posts: 167
Joined: Mon Jan 26, 2015 4:36 pm
Location: Benevides-PA Brazil (Benevides is inside Amazon Forest)
OS: Ubuntu Linux

Re: Cockpit textures for the c172p

Postby thevirtualfer » Sat Feb 14, 2015 1:47 am

abassign wrote in Wed Feb 11, 2015 9:08 am:Notice the light on top of the rudder, is off center


Hi there, abassign.

Today i would give some roundness to the seats. But as the change in the beacon pos appears to be only a change in the xml file, i decided to do this first.

The bad news is that the UV mapping was displaced :

Image

It is a single plane always facing the camera. But in the specific case of this light, it works only partially, because of the tail acting as a obstacle.

I bended the plane a bit, to avoid this.

Image

Then, i recentered the UV map and centered the light pos into the median point of the beacon.
The result is that the tail does not obstuct the light, independent of the angle.

Image

Image

Image

It needs yet put some transparence on the beacon itself when using rembrandt.

About the shape and alpha of the light, i will see what to do.

But at least, it is centered now.

Cheers !
thevirtualfer
 
Posts: 167
Joined: Mon Jan 26, 2015 4:36 pm
Location: Benevides-PA Brazil (Benevides is inside Amazon Forest)
OS: Ubuntu Linux

Re: Cockpit textures for the c172p

Postby gsagostinho » Sat Feb 14, 2015 2:47 am

Hi all,

I just did some very small tweaks on that gauge (better layout of the text + some smoothing of the edges). Please use this newer version:

gauge:
Image

gauge without needle:
Image

needle only:
Image

xcf file available here: http://www.4shared.com/zip/JCAtOo7zba/vac.html

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

Re: Cockpit textures for the c172p

Postby thevirtualfer » Sat Feb 14, 2015 6:09 am

@gsagostinho

Really a good job.


Image
NO POWER


Image
POWER ON


Image
FULL THROTLE


What about those buttons ?

Cheers, guy !
thevirtualfer
 
Posts: 167
Joined: Mon Jan 26, 2015 4:36 pm
Location: Benevides-PA Brazil (Benevides is inside Amazon Forest)
OS: Ubuntu Linux

Re: Cockpit textures for the c172p

Postby wlbragg » Sat Feb 14, 2015 10:05 am

I took the liberty of creating the aircraft shadow (ALS style)

If you want to incorporate it into your project please feel free to do so.

Here is the code

In Aircraft/c172p/c172p-detailed-set.xml (about LINE 120) add
Code: Select all
<autopilot>
      <path>Aircraft/c172p/Systems/gearAGL.xml</path>
</autopilot>


Create Aircraft/c172p/Systems/gearAGL.xml
Code: Select all
<?xml version="1.0"?>
<PropertyList>
   <filter>
      <type>gain</type>
      <gain>0.3048</gain>
      <input>/position/altitude-agl-ft</input>
      <reference>5</reference>
      <output>/position/gear-agl-m</output>
   </filter>
</PropertyList>


The path to the shadow code goes at the end of Aircraft/c172p/Models/c172p-detailed.xml
I put it as the last block of code before the closing "</PropertyList>"
Code: Select all
<!--  ALS ground shadow  -->
<model>
   <path>Aircraft/c172p/Models/Effects/shadow.xml</path>
</model>


The shadow configuration code goes in Aircraft/c172p/Models/Effects/shadow.xml
Note: The "Translate to ground level" code block remains commented out. It would be used for the non-ALS shadow.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<!--
Copied from the Boeing 737-100
http://helijah.free.fr/flightgear/hangar.htm
embaranger@free.fr
Fix required:
when the aircraft is flying at a high/low pitch or is rolling over far,
the shadow seems to disappear into the ground.
-->

<PropertyList>

  <path>shadow.ac</path>
  <offsets>
   <z-m>.45</z-m>
   <pitch-deg>.50</pitch-deg>
  </offsets>

  <animation>
    <object-name>shadow</object-name>
    <type>select</type>
    <condition>
      <not>
        <property>/sim/rendering/rembrandt/enabled</property>
      </not>
    </condition>
  </animation>
 
  <effect>
    <inherits-from>Effects/shadow</inherits-from>
    <object-name>shadow</object-name>
  </effect>

  <animation>
    <type>noshadow</type>
    <object-name>shadow</object-name>
  </animation>

  <!-- pitch -->
  <animation>
    <type>rotate</type>
    <object-name>shadow</object-name>
    <property>/orientation/pitch-deg</property>
    <factor>-1.0</factor>
    <center>
      <x-m>0</x-m>
      <y-m>0</y-m>
      <z-m>0</z-m>
    </center>
    <axis>
      <x>0</x>
      <y>1</y>
      <z>0</z>
    </axis>
  </animation>

  <!-- roll -->
  <animation>
    <type>rotate</type>
    <object-name>shadow</object-name>
    <property>/orientation/roll-deg</property>
    <factor>1.0</factor>
    <center>
      <x-m>0</x-m>
      <y-m>0</y-m>
      <z-m>0</z-m>
    </center>
    <axis>
      <x>1</x>
      <y>0</y>
      <z>0</z>
    </axis>
  </animation>

  <!--Translate to ground level  -->
  <!--animation>
   <type>translate</type>
   <object-name>shadow</object-name>
   <property>/position/altitude-agl-ft</property>
   <factor>-0.3048</factor>
   <center>
     <x-m>0</x-m>
     <y-m>0</y-m>
     <z-m>0</z-m>
   </center>
   <axis>
     <x>0</x>
     <y>0</y>
     <z>1</z>
   </axis>
 </animation-->

</PropertyList>


Aircraft/c172p/Models/Effects/shadow.ac file is
Code: Select all
AC3Db
MATERIAL "DefaultWhite" rgb 1 1 1  amb 1 1 1  emis 0 0 0  spec 0.5 0.5 0.5  shi 64  trans 0
MATERIAL "DefaultWhite.001" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0.5 0.5 0.5 shi 64 trans 0
OBJECT world
kids 1
OBJECT poly
name "shadow"
data 6
shadow
texture "shadow.png"
texrep 1 1
crease 30.000000
numvert 4
-4.128285 -1.756925 5.327894
-4.128286 -1.756925 -5.316878
6.516488 -1.756925 -5.316878
6.516484 -1.756925 5.327895
numsurf 1
SURF 0x00
mat 1
refs 4
0 1.78813905904e-07 0.0
3 0.999999880791 5.960463767e-08
2 1.0 0.999999880791
1 0.0 1.0
kids 0


and the Aircraft/c172p/Models/Effects/shadow.png


If someone knows a better or more efficient way to do this, please let me know.

The results
Image
Image
Image
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit textures for the c172p

Postby gsagostinho » Sat Feb 14, 2015 1:16 pm

thevirtualfer wrote in Sat Feb 14, 2015 6:09 am:Really a good job.


Thanks a lo! I think it is looking nice indeed, thanks for implementing the textures.

thevirtualfer wrote in Sat Feb 14, 2015 6:09 am:What about those buttons ?


Which buttons? If there are some textures missing, let me know and I can try to create them myself, ok?

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

Re: Cockpit textures for the c172p

Postby wlbragg » Sat Feb 14, 2015 6:27 pm

The experts think we only need frame rate level property rule instead of the fdm autopilot rule.
So here is the change.

In Aircraft/c172p/c172p-detailed-set.xml (about LINE 120) add

<autopilot>
<path>Aircraft/c172p/Systems/gearAGL.xml</path>
</autopilot>

Instead use this
Code: Select all
<property-rule n="101">
       <name>gear_agl-m</name>
       <path>Aircraft/c172p/Systems/gearAGL.xml</path>
</property-rule>
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit textures for the c172p

Postby wlbragg » Sat Feb 14, 2015 6:56 pm

More fine tuning.

Need to remove the "offsets" from Aircraft/c172p/Models/Effects/shadow.xml
<offsets>
<z-m>.45</z-m>
<pitch-deg>.50</pitch-deg>
</offsets>
they are not needed for this implementation.

and then in Aircraft/c172p/Systems/gearAGL.xml change LINE 8 "reference" from 5 to 6 (if the shadow needs more distance from the ground add to the reference number)
Code: Select all
<?xml version="1.0"?>
<PropertyList>
   <filter>
      <type>gain</type>
      <gain>0.3048</gain>
      <input>/position/altitude-agl-ft</input>
      <reference>6</reference>
      <output>/position/gear-agl-m</output>
   </filter>
</PropertyList>


Also, if one of you talented artists want to touch up the shadow.png texture. It was a real hack job on my part.

All your modifications are really outstanding.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: wlbragg and 11 guests