Board index FlightGear Development Aircraft Liveries

Glossy effect for Citation II livery?  Topic is solved

Discussion of aircraft textures and liveries

Re: Glossy effect for Citation II livery?

Postby chris_blues » Tue Jan 11, 2011 2:51 pm

HHS wrote:But if you want to change the strength of reflection-effect per livery, you might wann look at the JU52 and/ or IAR80.

Yea, I'll do that! First I got to set some things straight in the livery and greymap... once you begin correcting, you'll always find more! :)
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery?

Postby chris_blues » Tue Jan 11, 2011 5:14 pm

Great concept! Just take any value, place it into the internal properties, and read it out per livery! I like the style!
Only problem, this doesn't work with a greymap. Maybe because the greymap is being loaded statically, so you can't change the shader itself in runtime?
Here's the code I tried:
citation_reflect.eff:
Code: Select all
...
    <texture n="8">
     <image><use>/sim/rendering/greymap</use></image>
     <filter>linear-mipmap-linear</filter>
     <wrap-s>repeat</wrap-s>
     <wrap-t>repeat</wrap-t>
     <internal-format>normalized</internal-format>
   </texture>
...


LXA LX-GDL.xml: (livery)
Code: Select all
<PropertyList>
<sim>
    <model>
        <livery>
            <name type="string">LXA LX-GDL</name>
            <texture>Lv4.png</texture>
        </livery>
    </model>
    <rendering>
        <greymap type="string">Aircraft/Citation/Models/Effects/greymap_LX_GDL.png</greymap>
    </rendering>
</sim>
</PropertyList>


and blue-grey.xml (Livery): This is the same as the other 2 old liveries.
Code: Select all
<PropertyList>
<sim>
    <model>
        <livery>
            <name type="string">Blue-grey</name>
            <texture>Lv1.png</texture>
        </livery>
        <registration>
            <red>0.05</red>
            <green>0.05</green>
            <blue>0.05</blue>
        </registration>
    </model>
    <rendering>
        <greymap type="string">Aircraft/Citation/Models/Effects/greymap_1-3.png</greymap>
    </rendering>
</sim>
</PropertyList>


I created said greymaps and in theory this should work. I can find the variable greymap=Aircraft/Citation/Models/Effects/greymap_1-3.png in the internal properties, but the shader won't load ANY greymap! The plane is just completely golden, with all liveries.
Did I iverlook something here? Or does it just not work (yet)?
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery?

Postby HHS » Tue Jan 11, 2011 5:17 pm

chris_blues wrote:Great concept! Just take any value, place it into the internal properties, and read it out per livery! I like the style!
Only problem, this doesn't work with a greymap. Maybe because the greymap is being loaded statically, so you can't change the shader itself in runtime?
Here's the code I tried:
citation_reflect.eff:
Code: Select all
...
    <texture n="8">
     <image><use>/sim/rendering/greymap</use></image>
     <filter>linear-mipmap-linear</filter>
     <wrap-s>repeat</wrap-s>
     <wrap-t>repeat</wrap-t>
     <internal-format>normalized</internal-format>
   </texture>
...



Exactly this you can't do. :-(
It doesn't work, as the greymap can't be loaded at runtime. But you can change the refl-correction factor at runtime. The JU52 makes use of it.
Up, up and away
User avatar
HHS
Retired
 
Posts: 3624
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: Glossy effect for Citation II livery?

Postby chris_blues » Tue Jan 11, 2011 5:22 pm

Too bad! I'm running out of ideas, since refl_correction is not an option, because the engines, which should stay chromy, will decrease reflecting too... No this doesn't look good.

I guess, if no one brings along the great, mind-freggling idea of the new millenium, it'll have to stay chromy, even if that's not quite right. It looks nice though...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery?

Postby i4dnf » Tue Jan 11, 2011 7:27 pm

Modify the shininess of the other objects (those that are not chromed). You can see an example in the IAR-80 liveries (also a few posts back I've done this in the citation-II.xml file):
Code: Select all
   <animation>
       <type>material</type>
       <object-name>LEngine</object-name>
       <object-name>REngine</object-name>
       <object-name>LHwing</object-name>
       <object-name>LHaileron</object-name>
       <object-name>LHflap</object-name>
       <object-name>LHmain.door</object-name>
       <object-name>RHwing</object-name>
       <object-name>RHaileron</object-name>
       <object-name>RHflap</object-name>
       <object-name>RHmain.door</object-name>
       <object-name>Cabin.door</object-name>
       <object-name>Fuselage</object-name>
       <object-name>Pylons</object-name>
       <object-name>Fin</object-name>
       <object-name>Hstab</object-name>
       <object-name>RHelevator</object-name>
       <object-name>LHelevator</object-name>
       <object-name>Rudder</object-name>
       <object-name>FrDoor</object-name>
       <object-name>FrRHdoor</object-name>
       <object-name>FrLHdoor</object-name>
       <shininess>16</shininess>
   </animation>

   <animation>
       <type>material</type>
       <object-name>RHwing.heater</object-name>
       <object-name>LHwing.heater</object-name>
       <object-name>REngine.heater</object-name>
       <object-name>LEngine.heater</object-name>
       <object-name>Door.handle</object-name>
       <object-name>RH.Ureverser</object-name>
       <object-name>LH.Ureverser</object-name>
       <object-name>RH.Lreverser</object-name>
       <object-name>LH.Lreverser</object-name>
       <object-name>Door.glass</object-name>
       <object-name>Glass</object-name>
       <object-name>Glass.001</object-name>
       <shininess>192</shininess>
   </animation>


..after these messages going back to work on the l-10 electra ;).
i4dnf
Retired
 
Posts: 745
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Glossy effect for Citation II livery?

Postby chris_blues » Tue Jan 11, 2011 10:20 pm

I tried again, and came up with some sort of compromise! I changed the refl_correction to 0.10 less on the white liveries. That doesn't get rid of the chrome on the windows, but I also doesn't "flatten" the engines...
:)
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Glossy effect for Citation II livery? [Done]

Postby chris_blues » Wed Jan 12, 2011 9:52 am

So here we go!
You can download the latest Luxaviation livery here: LXA_LX-GDL.zip (ca 700 kB)

...or you can update your git! :) (Gijs has changed some names in the git-version. The livery is now named LXA.)

Many thanks to all involved; i4dnf, HHS, Gijs, Syd and Curtis!!! (Especially for coping with my chaotic way of doing things!) :D

Cheers!
chris
Last edited by chris_blues on Fri Sep 23, 2011 11:10 pm, edited 4 times in total.
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery? [done]

Postby chris_blues » Fri Sep 23, 2011 11:01 pm

Hi folks!

I've found some trouble, starting the Citation II with LXA-livery. Trouble is, the shiny shader isn't loaded on startup. With every other livery it is. So, I've found out, it has to do with refl_correction=0.15. But where do I set it, so it's loaded on startup? It appears empty in flightgear's properties, as it is...

Cheers, as I do pop open my next beer... :) good night everyone...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery? [done]

Postby chris_blues » Mon Mar 05, 2012 4:34 pm

More than a year later, accidently I found it! It's a small 3-liner in Citation-set.xml!!!
Code: Select all
$FG_DATA/Aircraft/Citation/Citation-set.xml:
<sim>
--- snip ---
    <rendering>
        <refl_correction type="string">0.15</refl_correction>
    </rendering>
--- snip ---
</sim>

I'll try to get this into GIT somehow... :)

Happy flying everyone! :)
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery?

Postby chris_blues » Fri Jan 25, 2013 1:35 am

In an effort to bring this livery up to specs, I hope to get some support concerning the Citation II...

Since the upcoming of rembrandt, a lot seems to have changed. Now I'd like to get things back to normal :) I remember some time ago, when someone (I don't remember who) changed the specs for aircrafts to fit rembrandt's needs, I remember to write that someone, that the chrome-effect was gone. Then some changes on the CitationII were reverted. I don't know, what exactly was done...

Here's the real deal, how it look right now, in the upper line my original from this thread, with current FG; in the lower line the git-version, not that different, I might add... I just wanted to know, if there are some visible differences...
Image

So, if anyone has an idea, how to make the glass into glass again, and how to get back the chromish parts around the windows etc, I'd be very grateful for every hint!

Cheers
chris

EDIT:
another thing is the instruments: before rembrandt everything was great, now the DME, Appr-Course, and all Comm-Units are blacked out like this:
Image
DME did work fine too. Haven't noticed it has gone black too, even without rembrandt...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery? [done]

Postby i4dnf » Fri Jan 25, 2013 7:09 am

For glass/reflection/chrome, look at Docs/model-combined.eff/*. (and at how it's done for the c172p, Concorde, dhc2, dhc6, iar80, hurricane, SpitfireV/Seafire, Seahawk, to name just a couple of aircraft using those effects)
The effects are done in such a way that they use what's required to give you the same look with and without Rembrandt, without any additional logic necessari in the model XML.
For the instrument issues, there might be many factors involved, I'll need to take a proper look at them to have an idea of what's going on.
i4dnf
Retired
 
Posts: 745
Joined: Wed Sep 09, 2009 7:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Glossy effect for Citation II livery? [done]

Postby chris_blues » Fri Jan 25, 2013 4:18 pm

Thanks!
I'm just reading up in the effects-files... Boy, seems like I got some trial and error ahead :)
Is there some more info, sth stupid-proof?

Cheers

Edit:
first success: the glass is glass again!

Now I found the passage of the already chromish parts of the model. These are rendered as chrome, but they have no shadows. I've already read it before, but I'm not sure what to do about it.
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery?

Postby chris_blues » Fri Jan 25, 2013 7:34 pm

Now I got the simple reflections back, but I'm hitting the same wall as in the beginning of this thread. It's just not shiny enough.
I got the cubemap and the other things converted as in the readme and model-compined-bump.eff... but still no shiny chrome on the fuselage etc... :-/
Image

Edit:
Might be interesting to post the modified files - here we go:
Citation-II.xml from line 80
Code: Select all
<!-- Disabled because of interference with rembrandt -->
     <!--effect>
        <inherits-from>Aircraft/Citation/Models/Effects/glass</inherits-from>
           <object-name>Door.glass</object-name>
           <object-name>Glass.001</object-name>
           <object-name>Glass</object-name>
     </effect-->

      <effect>
        <inherits-from>Effects/model-transparent</inherits-from>
           <object-name>Door.glass</object-name>
           <object-name>Glass.001</object-name>
           <object-name>Glass</object-name>
            <object-name>rednav</object-name>
            <object-name>greennav</object-name>
            <object-name>whitenav</object-name>
            <object-name>Flash01</object-name>
            <object-name>Flash02</object-name>
            <object-name>beacon</object-name>
            <object-name>beacon.001</object-name>
            <object-name>beacon.002</object-name>
            <object-name>beacon.003</object-name>
            <object-name>Recog.flash1</object-name>
            <object-name>Recog.flash2</object-name>
            <object-name>LHland.light</object-name>
            <object-name>RHland.light</object-name>
    </effect>


and citation_reflect.eff (complete)
Code: Select all
<?xml version="1.0" encoding="utf-8"?>

<PropertyList>
 <name>Effects/citation_reflect</name>
 <inherits-from>Effects/model-combined-deferred</inherits-from>
 <parameters>

<!-- Normal Map -->
   <normalmap-enabled type="int"> 0 </normalmap-enabled>
   <normalmap-dds type="int"> 0 </normalmap-dds>
   <normalmap-tiling type="float"> 1.0 </normalmap-tiling>
   <texture n="2">
     <image>Aircraft/Citation/Models/Liveries/LXA.png</image>
   </texture>

<!-- Light Map -->
   <lightmap-enabled type="int"> 1 </lightmap-enabled>
   <lightmap-multi type="int"> 1 </lightmap-multi>
   <lightmap-factor type="float" n="0">1.0</lightmap-factor>
   <lightmap-color type="vec3d" n="0"> 1.0 1.0 1.0 </lightmap-color>
   <lightmap-factor type="float" n="1">1.0</lightmap-factor>
   <lightmap-color type="vec3d" n="1"> 1.0 1.0 1.0 </lightmap-color>
   <lightmap-factor type="float" n="2">1.0</lightmap-factor>
   <lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color>
   <lightmap-factor type="float" n="3">1.0</lightmap-factor>
   <lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
   
   <texture n="3">
     <image>Aircraft/Generic/Effects/greymap.png</image>
     <filter>linear-mipmap-linear</filter>
     <wrap-s>clamp</wrap-s>
     <wrap-t>clamp</wrap-t>
     <internal-format>normalized</internal-format>
   </texture>

   <reflection-enabled type="int"> 1 </reflection-enabled>
   <reflect-map-enabled type="int"> 1 </reflect-map-enabled>
   <reflection-correction type="float"> 0.25 </reflection-correction>
   <reflection-dynamic type="int"> 1 </reflection-dynamic>
   <texture n="4">
     <image>Aircraft/Citation/Models/Effects/greymap.png</image>
   </texture>

   <texture n="5">
     <type>cubemap</type>
     <images>
        <positive-x>Aircraft/Generic/Effects/fgfs-sky2/1.png</positive-x>
        <negative-x>Aircraft/Generic/Effects/fgfs-sky2/4.png</negative-x>
        <positive-y>Aircraft/Generic/Effects/fgfs-sky2/2.png</positive-y>
        <negative-y>Aircraft/Generic/Effects/fgfs-sky2/3.png</negative-y>
        <positive-z>Aircraft/Generic/Effects/fgfs-sky2/6.png</positive-z>
        <negative-z>Aircraft/Generic/Effects/fgfs-sky2/5.png</negative-z>
     </images>
   </texture>

   <reflection-fresnel type="float"> 0.05 </reflection-fresnel>
   <reflection-rainbow type="float"> 0.01 </reflection-rainbow>
   <reflection-noise type="float"> 0.0 </reflection-noise>
<!--Ambient correction -->
   <ambient-correction type="float"> 0.0 </ambient-correction>
   <dirt-enabled type="int"> 0 </dirt-enabled>
   <dirt-color type="vec3d"> 0.0 0.0 0.0 </dirt-color>
   <dirt-factor type="float"> 0.0 </dirt-factor>

 </parameters>

<!--WARNING: Do not edit below this line -->
<!-- ####################
### NORMALMAP INCLUDE ###
######################### -->
      <generate>
         <tangent type="int">6</tangent>
         <binormal type="int">7</binormal>
      </generate>

      <technique n="7">
         <pass>
            <program>
               <attribute>
                  <name>tangent</name>
                  <index>6</index>
               </attribute>
               <attribute>
                  <name>binormal</name>
                  <index>7</index>
               </attribute>
            </program>
         </pass>
      </technique>

      <technique n="9">
        <pass>
         <program>
           <attribute>
            <name>tangent</name>
            <index>6</index>
           </attribute>
           <attribute>
            <name>binormal</name>
            <index>7</index>
           </attribute>
         </program>
        </pass>
      </technique>
<!-- ########################
### END NORMALMAP INCLUDE ###
############################# -->

</PropertyList>

<!--
Explanation:
(Taken from http://wiki.flightgear.org/index.php/Howto:_Aircraft_Reflection_Shader )

The tags at the bottom:

    * <rainbowiness> = adds a nice Rainbow-effect to the reflection. Perfect for the modern Airliner-windows or modern coatings.
    * <fresneliness> = adds some black stripes to the reflection.
    * <noisiness> = adds noise to the reflection. Usefull for dirt etc...
    * <ambient_correction> = correct the appearance of the reflection at shadowed parts.
    * <reflect_map> = enables the use of a greymap. If enabled the greymap will controll the strength of the reflection.
        Black = zero reflection, White = full reflection. For modern aircraft coatings a grey of 75-90% is usefull, for chromish parts
        about 10-25%.
    * <refl_correction> = another parameter for controlling the strength of the reflection. Reflect_map and refl_correction are
        working together.
    * "texture= n5" is the path to the image wich will be later the reflection. You can choose between cubemaps with 6 single images
        or a cubecross. You can take the one included in data/Aircraft/Generic/Effects or you can use your own.
    * "texture= n6" is the path to the rainbow-texture.
    * "texture= n7" path to the fresnel-texture.
    * "texture= n8"is the path to the greymap.
-->


Is this Reflect-Bump-Spec-Shader still available with the ubershader???
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery?

Postby chris_blues » Sun Jan 27, 2013 4:13 pm

Ok, I'm stupid!
I had the quality-settings for the shaders to 0... :oops:

Back to work....
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Glossy effect for Citation II livery?  

Postby chris_blues » Mon Jan 28, 2013 2:17 am

...and here are my results so far.

I've managed to increase the resolution for the image files! What a result!
I've got the shaders going so far, for the shiny effects and so on.

Only thing is, the chrome parts still don't have no shadows... If anyone could bring me up to speed, how to accomplish that... And these chrome parts tend to show up in very strange colors, which seems to be linked with the sun light. In the evening they become golden to purple and then black in the night ... :-$
I hope there's something we can do... :roll:

This is how she looks so far! Comments, critics etc very welcome!
Image

I plan on adding some more little details like these rivetings on the chrome window frames which can be seen here, since it's now possible, with 4096x4096 textures...

Edit:
I've managed to push a merge request into fgdata. So we have the Citation in the state she was before, maybe a little better with the hiRes LXA-Livery. The future patch for the chrome parts will go on as an update. As well as the more details, I want to add. For now RL takes its toll, I'm not sure when I can continue this endeavor, I certainly hope soon... :)
And, I nearly forgot: The instruments issue inside the cockpit. It occurs only on DME-units (both) and Radial display...

So I'll need help with:
  • Rembrandt vs DME instruments
  • Chrome parts without shadow and with strange colors
Or should I put this into a new thread??

Any hints and usefull comments are very appreciated!
Thx
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1581
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

PreviousNext

Return to Liveries

Who is online

Users browsing this forum: No registered users and 1 guest