Intro.

An openGL have eight light sources. In FlightGear world, first of them used
for create sun/moon light, but seven light sources stays unused.

I offer use this light sources for creating landing light and scenery
 effects. I write some code, based on Modelmgr subsystem. It add to
 FlightGear ability to control openGL (Plib) light sources like an aircraft
 model.

Light source may be static or dynamic, moving under FDM or script control, by
setting properties. It may be added to existing aircraft, just write some
section to aircraft-set.xml file. All of work doing into videoboard, CPU only
count coordinates - no need redraw 3d objects, textures etc. It is _real_
light - no lightmap or like it.


There are two problems around this issue.

First, position of light source is jump over 30 meters, when flightgear shift
center of scenery to new position. If light direct ahead (like landing
lights), it seen like small blink, but if you have static light (for example,
on ground projector) it will blink more. I can blank this, but in this case,
result worse - dark comes in some times. I need help about it .

Second trouble. Then aircraft near the runway, light stay very unstable -
 spot light may disappear or blink. The reason is big polygon of
 runway/taxiway mesh. OpenGL not correctly count lighting, if size of polygon
 near or big size of spot light. First issue - split big polygon of mesh to
 less, but you can drop some reality and use omnidirectional light for
 taxiing, shift light source some meters ahead and up.

Install procedure.

Unpack archive, apply patch to src/Main/model.cxx & src/Main/globals.hxx
Put lightmgr.cxx & lightmgr.hxx to src/Model
Overwrite src/Model/Makefile.am

Run configure and make. Since globals.hxx was changed, you will need
 recompile flightgear at all.

Copy <light>  section from example-aircraft-set.xml to your favorite aircraft
set file.

Run fgfs, open file->browse internal properties->sim. You may tune light
parameters by editing light/light-source vars.

You may up to 7 sources simultaneously, simple add new sections
 <light-source> to /sim/light, but it depend of power of you video board.

sorry for English...
-- 
Wbr, Yurik

Attachment: dynamic_light_source.tar.gz
Description: application/tgz

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to