Board index FlightGear Development Effects and shaders

Landing Lights (solved)

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Re: Landing Lights (solved)

Postby gral » Tue May 18, 2010 12:44 am

Zan wrote:Also I think there is some problems with multiple lights or overlapping lights.


Overlapping of two lights might work when you have one effect per light-cone. I checked this with 737-100 and two landing lights. This worked for me here http://img710.imageshack.us/img710/2803/737overlapping.png. I guess this is a "buffer sorting problem"? Anyway thank you very much for this "simple" and nice effect!
-gral
gral
 
Posts: 323
Joined: Mon Nov 16, 2009 2:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Re: Landing Lights (solved)

Postby ot-666 » Tue May 18, 2010 11:42 am

What du you meen with 2 effects. Just duplicate and renaim the effects and use each for only one cone model?

Cheers, Oliver
Callsign: ot-666
Working on LOWI and other stuff - Custom Scenery Overlay Repo: http://gitorious.org/fgfs-custom-scenery/custom-scenery-overlay/
VMX22 - Osprey... sometimes in 2014
ot-666
 
Posts: 746
Joined: Sun Nov 08, 2009 6:14 pm
Location: Germany, Konstanz
Callsign: ot-666
IRC name: ot666
Version: GIT
OS: win7 64bit

Re: Landing Lights (solved)

Postby gral » Tue May 18, 2010 1:27 pm

ot-666 wrote:What du you meen with 2 effects. Just duplicate and renaim the effects and use each for only one cone model?

Cheers, Oliver


Example with overlapping lightcones of 737-100:

1. Copy fgdata/Effects/light-cone.eff two times to
Aircraft/737-100/Models/effects/
Change names of the effects i.e. to light-cone-left.eff and light-cone-right.eff

2. In Aircraft/737-100/Models/lights change light-cone.xml to "light-cone-left.xml" and "light-cone-right.xml". Example for new light-cone-left.xml:
Code: Select all
<PropertyList>

  <path>light-cone.ac</path>

  <effect>
    <inherits-from>Aircraft/737-100/Models/effects/light-cone-left</inherits-from>
    <object-name>Cone</object-name>
  </effect>
 
 </PropertyList>


light-cone-right.xml:
Code: Select all
<PropertyList>

  <path>light-cone.ac</path>

  <effect>
    <inherits-from>Aircraft/737-100/Models/effects/light-cone-right</inherits-from>
    <object-name>Cone</object-name>
  </effect>
 
 </PropertyList>


3. In Aircraft/737-100/Models/737-100.xml look for left and right wing lightcones and change to the new path
Code: Select all
<!-- Wing light cone left -->
  <model>
    <path>Aircraft/737-100/Models/light/light-cone-left.xml</path>


Code: Select all
<!-- Wing light cone right -->
  <model>
    <path>Aircraft/737-100/Models/light/light-cone-right.xml</path>


The effects use the same light-cone.ac but different effects (and buffers?). Maybe there is a better solution? At least on my card the overlapping works with this change.
-gral
gral
 
Posts: 323
Joined: Mon Nov 16, 2009 2:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Re: Landing Lights (solved)

Postby Fahim Dalvi » Tue May 18, 2010 3:05 pm

Hey Gral,

That definitely seems to work. Here are the results:

Before:
Image
After:
Image

Regards,
Fahim
User avatar
Fahim Dalvi
 
Posts: 1353
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: Landing Lights (solved)

Postby gral » Tue May 18, 2010 10:05 pm

Maybe you do not want to have only white objects within the light-cone. You change in the new light-cone-left/right effect:
Code: Select all
      <blend>
        <active>true</active>
        <source>dst-alpha</source>
        <destination>one</destination>
      </blend>


to
Code: Select all
      <blend>
        <active>true</active>
        <source-rgb>dst-color</source-rgb>
        <source>dst-alpha</source>
        <destination>one</destination>
      </blend>
gral
 
Posts: 323
Joined: Mon Nov 16, 2009 2:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Re: Landing Lights (solved)

Postby Fahim Dalvi » Wed May 19, 2010 8:15 am

Hi Gral,

The above change you mentioned doesn't look too good here. I mean the cone no more illuminates things, Its just a simple cone with a texture!

Regards,
Fahim
User avatar
Fahim Dalvi
 
Posts: 1353
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: Landing Lights (solved)

Postby gral » Thu May 20, 2010 1:29 am

Image

Works only at dusk ;-) But the lightcone effect is not light at all. I hope for OSG::Light. And shadows.
-gral
gral
 
Posts: 323
Joined: Mon Nov 16, 2009 2:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Previous

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 4 guests