Board index FlightGear Development Aircraft Liveries

How do I make a certain livery glossy?

Discussion of aircraft textures and liveries

How do I make a certain livery glossy?

Postby xen_steda » Sun Mar 29, 2020 3:11 am

Hello, I would like to make a livery appear glossy, like a brand new paintjob. The standard "shader" I guess it could be called is not overly glossy on the plane, rather like brushed metal. Is there a way to make one livery have more glossiness? Thanks for any information on this.
xen_steda
 
Posts: 234
Joined: Sun Jan 05, 2020 3:53 pm

Re: How do I make a certain livery glossy?

Postby Thorsten » Sun Mar 29, 2020 6:39 am

Glossy generally means you reflect stuff, so you need to supply a cubemap for an environment that is reflected and switch that part of the model effect on.

But you can not do that on a 'per livery' basis, you need to do this as an aircraft-side effect, so you would either need some involved hacks or define two different aircraft-set.xml files for the glossy and non-glossy liveries.
Thorsten
 
Posts: 11748
Joined: Mon Nov 02, 2009 8:33 am

Re: How do I make a certain livery glossy?

Postby erik » Sun Mar 29, 2020 7:17 am

Actually you can.
For the Ercoupe I've used a properties for reflection-fresnel and reflection-correction in the bumspec shader
Code: Select all
<reflection-fresnel type="float"><use>sim/model/livery/fresnel</use></reflection-fresnel>
<reflection-correction><use>sim/model/livery/shininess</use></reflection-correction>

Which is set to a different value for every livery:
Code: Select all
<PropertyList>
  <sim>
    <model>
      <livery>
        <name type="string">Aluminium</name>
        <texture>ercoupe-ext2.png</texture>
        <shininess type="float">-0.325</shininess>
        <fresnel>0.7</fresnel>
      </livery>
      <livery-wings>
        <texture>c150-02.png</texture>
      </livery-wings>
    </model>
  </sim>
</PropertyList>


Erik
Last edited by erik on Sun Mar 29, 2020 7:58 am, edited 1 time in total.
erik
 
Posts: 1690
Joined: Thu Nov 01, 2007 1:41 pm

Re: How do I make a certain livery glossy?

Postby erik » Sun Mar 29, 2020 7:58 am

Additional you could also make reflection-enabled livery specific as I've done for thew PC-9M to toggle between a glossy civilian liver and a dull military style livery.
Code: Select all
<reflection-enabled><use>sim/model/civilian</use></reflection-enabled>


Erik
erik
 
Posts: 1690
Joined: Thu Nov 01, 2007 1:41 pm

Re: How do I make a certain livery glossy?

Postby Thorsten » Sun Mar 29, 2020 8:38 am

Yes, you're absolutely right - I'm confusing this with swapping a normal-map in (which you can't do per livery). But the shininess parameter is under runtime control if you have an environmap at all.
Thorsten
 
Posts: 11748
Joined: Mon Nov 02, 2009 8:33 am

Re: How do I make a certain livery glossy?

Postby xen_steda » Sun Mar 29, 2020 11:05 am

Thanks the great information. I will use your snippets as soon as I get a chance. :D
xen_steda
 
Posts: 234
Joined: Sun Jan 05, 2020 3:53 pm

Re: How do I make a certain livery glossy?

Postby xen_steda » Sun Mar 29, 2020 1:59 pm

erik wrote in Sun Mar 29, 2020 7:17 am:Actually you can.
For the Ercoupe I've used a properties for reflection-fresnel and reflection-correction in the bumspec shader
Code: Select all
<reflection-fresnel type="float"><use>sim/model/livery/fresnel</use></reflection-fresnel>
<reflection-correction><use>sim/model/livery/shininess</use></reflection-correction>


Hello, thanks for the help, I can't find where I am supposed to add this snippet you provided. Where should I put this? I added the other snippet to the livery xml file but noticed no change in glossiness. Thanks for any help you can give.
xen_steda
 
Posts: 234
Joined: Sun Jan 05, 2020 3:53 pm

Re: How do I make a certain livery glossy?

Postby D-ECHO » Sun Mar 29, 2020 2:07 pm

The aircraft needs to use an effect that supports reflections, this is where you'd put it. The effect files (.eff) are usually in Aircraft/NAME/Models/Effects/, which aircraft is it that you'd like to work on?
User avatar
D-ECHO
 
Posts: 2122
Joined: Sat May 09, 2015 12:31 pm

Re: How do I make a certain livery glossy?

Postby xen_steda » Sun Mar 29, 2020 3:28 pm

Hi, it's for the Zivko Edge 540. I'm trying to make my Classic RBW livery I recently made have a glossy appearance.

After looking at the Edge 540 directory, I see there is no Effects folder. So I'm not sure I can actually get it looking glossy.
xen_steda
 
Posts: 234
Joined: Sun Jan 05, 2020 3:53 pm

Re: How do I make a certain livery glossy?

Postby Thorsten » Sun Mar 29, 2020 4:25 pm

You can, but you have to learn how to configure effects first.
Thorsten
 
Posts: 11748
Joined: Mon Nov 02, 2009 8:33 am

Re: How do I make a certain livery glossy?

Postby D-ECHO » Sun Mar 29, 2020 4:31 pm

In this case you'll need to add the effect, but it's not very hard. You can have a look at erik's ercoupe for example, it has this effect.
User avatar
D-ECHO
 
Posts: 2122
Joined: Sat May 09, 2015 12:31 pm

Re: How do I make a certain livery glossy?

Postby xen_steda » Sun Mar 29, 2020 5:37 pm

I'm mostly not looking to add a whole lot to the plane files. I could include the missing effects folder in my livery project files I suppose. Thanks for the info everyone.
xen_steda
 
Posts: 234
Joined: Sun Jan 05, 2020 3:53 pm

Re: How do I make a certain livery glossy?

Postby D-ECHO » Mon Mar 30, 2020 6:58 am

Is there a reason you'd like to keep your liveries separate? According to the -set.xml, Torsten (not Thorsten ;) ) Dreyer (memberlist.php?mode=viewprofile&u=961) is the relevant author for you, and I think he'd be happy to help you include your liveries and also work out the glossy thing.
User avatar
D-ECHO
 
Posts: 2122
Joined: Sat May 09, 2015 12:31 pm

Re: How do I make a certain livery glossy?

Postby xen_steda » Mon Mar 30, 2020 9:47 am

Hello, I want to keep my livery separate until I get looking just right. Unfortunately I haven't been able to get the technique Erik showed to work correctly for the glossy paintjob effect. I tried to contact Torsten a while ago but never heard back. I will keep trying to get the glossy effect to look correct.
xen_steda
 
Posts: 234
Joined: Sun Jan 05, 2020 3:53 pm

Re: How do I make a certain livery glossy?

Postby Thorsten » Mon Mar 30, 2020 11:08 am

* pick a plane with a glossy livery like the Ercoupe
* study how it's done there
* try to change a few things to get a feeling for what does what
* copy the effect over to your plane, adjust filenames and paths to what you need, have a look at the log to see what doesn't load properly, often simply typos prevent things from working
* report back

This is how you typically learn to apply new stuff :D
Thorsten
 
Posts: 11748
Joined: Mon Nov 02, 2009 8:33 am

Next

Return to Liveries

Who is online

Users browsing this forum: No registered users and 1 guest