[Flightgear-devel] A light cone effect, dev version

2010-01-23 Thread Lauri Peltonen
Hi!

I made an example of a light cone effect. It is a post processing
effect, that makes an object illuminate everything inside of it. It
would be usefull for landing lights or similar objects.

This version uses blending, but the final version should use stencil
buffer, once/if we get effects to support them. Because of the
blending, the lighting value is 1.5 * the value of the underlying
pixel. This means that during night, the light will not be very
visible... I found no way to overcome this without the whole
cone/model becoming visible. One way to cheat this is to add the
object multiple times, since the lighting cumulates. Also fog does not
work correctly.

Attached is the effect file. I also had to make simple vertex and
fragment shaders to get the effect working.

Also, I attached an example of the cone model and its xml. Two
screenshots from during the development is here:
http://users.tkk.fi/~lapelto2/fgfs/fgfs-light.png and
http://users.tkk.fi/~lapelto2/fgfs/fgfs-light2.png

I hope someone finds this dev version usefull, maybe after the release
we can get a real one :)

Lauri (Zan on IRC)
-- 
Lauri Peltonen
lauri.pelto...@gmail.com


light-cone.eff
Description: Binary data


light-cone.vert
Description: Binary data


light-cone.frag
Description: Binary data


light-cone.ac
Description: Binary data
?xml version=1.0?

PropertyList

 pathlight-cone.ac/path

 effect
  inherits-fromEffects/light-cone/inherits-from
  object-nameCone/object-name
 /effect

/PropertyList
--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] A light cone effect, dev version

2010-01-23 Thread Patrice Poly
On 24/01/2010 00:35, Lauri Peltonen wrote:
 Hi!

 I made an example of a light cone effect. It is a post processing
 effect, that makes an object illuminate everything inside of it. It
 would be usefull for landing lights or similar objects.
   
I am dreaming of landing lights since long, I have tried my teeth on OSG
light without any result, so I'm glad to see you are at it !
Can't wait to try this !

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel