[Flightgear-devel] Lit the lights!

2011-11-22 Thread Paul Guhl
Hello!

Recently i tried to implement cockpit night lightning system in FG and 
came around a curious problem i can't solve: definition of 
new/additional light sources is ignored by FG. I went the classical 
OpenGL path and tried to incorporate additional standard light sources 
(OGL supports from 8 to 10 of them depending on the hardware). The code 
works so far, BUT only if the light source number is zero. Ergo none of 
the lights from 1 to 9 configured with the same code would work. Other 
light sources appear to be disabled somewhere in FG/SG, since OSG 
demonstrates in the example projects multiple light sources operated. 
Altering light 0 also affects the entire scene graph, but that's 
expected behavior as noted in OSG docs. Not even rough cut through with 
glEnable(...) helps.

Implementation details:

Markup extension:
cockpit_light
source0/source
namecockpit_light/name
colors
ambient
R0.0/RG0.7/GB0.0/BA1.0/A
/ambient
diffuse
R0.0/RG0.0/GB0.0/BA0.0/A
/diffuse
/colors
direction
X0.3/XY0.3/YZ0.3/Z
/direction
offsets
x-m-0.309142/x-m
y-m0.286432/y-m
z-m0.275279/z-m
pitch-deg0/pitch-deg
heading-deg180/heading-deg
roll-deg0/roll-deg
/offsets
spot
cutoff0.002/cutoff
exponent0.002/exponent
/spot
attenuation
constant5.0/constant
linear5.0/linear
quadratic10.0/quadratic
/attenuation
/cockpit_light

Method invocation in:
static osg::Node *
sgLoad3DModel_internal(const SGPath path,
const osgDB::ReaderWriter::Options* options_,
SGPropertyNode *overlay)
...
 // process cockpit lights
 std::vectorSGPropertyNode_ptr light_nodes;
 light_nodes = props-getChildren(cockpit_light);
 for(unsigned i = 0; i  light_nodes.size(); i++) {
 group-addChild(Particles::appendLights(group, light_nodes[i], 
prop_root, options.get()));
 }
...

Method implemented:
osg::Group * Particles::appendLights(const osg::ref_ptrosg::Group parent,
  const SGPropertyNode* configNode,
  SGPropertyNode* modelRoot,
  const 
osgDB::ReaderWriter::Options* options)
{
 int lightNum = configNode-getIntValue(source, 0);
 // create and configure light source
 osg::LightSource *interiorLightSource = new osg::LightSource();
 interiorLightSource-setLocalStateSetModes(osg::StateAttribute::ON);
 interiorLightSource-getLight()-setDataVariance(Object::DYNAMIC);
 interiorLightSource-setLocalStateSetModes(osg::StateAttribute::ON);
 // acquire the light itself and do setup
 osg::Light *interiorLight = interiorLightSource-getLight();
 interiorLight-setLightNum(lightNum);

 
interiorLight-setPosition(osg::Vec4(configNode-getFloatValue(offsets/x-m, 
0.0),
  
configNode-getFloatValue(offsets/y-m, 0.0),
  
configNode-getFloatValue(offsets/z-m, 0.0), 1.0f));
 
interiorLight-setAmbient(osg::Vec4(configNode-getFloatValue(colors/ambient/R,
 
0.0),
 
configNode-getFloatValue(colors/ambient/G, 0.0),
 
configNode-getFloatValue(colors/ambient/B, 0.0),
 
configNode-getFloatValue(colors/ambient/A, 0.0)));
 
interiorLight-setDiffuse(osg::Vec4(configNode-getFloatValue(colors/diffuse/R,
 
0.0),
 
configNode-getFloatValue(colors/diffuse/G, 0.0),
 
configNode-getFloatValue(colors/diffuse/B, 0.0),
 
configNode-getFloatValue(colors/diffuse/A, 0.0)));

 
interiorLight-setDirection(osg::Vec3(configNode-getFloatValue(direction/X, 
0.0),
   
configNode-getFloatValue(direction/Y, 0.0),
   
configNode-getFloatValue(direction/Z, 0.0)));
 // exponent  cutoff
 
interiorLight-setSpotCutoff(configNode-getFloatValue(spot/cutoff, 
0.0));
 
interiorLight-setSpotExponent(configNode-getFloatValue(spot/exponent, 
0.0)); 

 // light attenuation
 
interiorLight-setConstantAttenuation(configNode-getFloatValue(spot/attenuation,
 
0.0));
 
interiorLight-setLinearAttenuation(configNode-getFloatValue(spot/linear, 
0.0));
 
interiorLight-setQuadraticAttenuation(configNode-getFloatValue(spot/quadratic,
 
0.0));
 // state propagations
 osg::StateSet *parentState = parent-getOrCreateStateSet();
 parentState-setMode(GL_LIGHTING, osg::StateAttribute::ON);
 parentState-setMode(GL_LIGHT0 + lightNum, osg::StateAttribute::ON);
 interiorLightSource-setStateSetModes(*parentState, 
osg::StateAttribute::ON);
 return interiorLightSource;
}

P.S. Best result sofar: 
http://www.flickr.com/photos/43342833@N04/6344963545/in/photostream

--
All the data continuously generated 

[Flightgear-devel] Profiling Results

2011-11-22 Thread Paul Guhl
Hello all,

i performed hot spot and thread analysis with current FG code base, here 
the results:
Hot Spots:
http://www.flickr.com/photos/43342833@N04/6384920207/in/photostream
Threads:
http://www.flickr.com/photos/43342833@N04/6384919719/in/photostream



--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] No geomtry rendered, please help!

2011-09-28 Thread Paul Guhl
Greetings,

i have strange behavior in FG 2.4.0 release-final git tag complied 
with MSVS2008. The compiled exe appears to be operational since embeded 
application dialogs and camera control with mouse work , but fgfs show 
neither any geometry nor any background effects like clouds. I also 
noticed that initial teaser image while loading aircraft/scenery doesn't 
show off. OSG ensured operational (fgfs.exe shipped with release 
installer works with OSG 3.0.1 also VS2008-compiled flawless).
Anomalies/deviations:
- no SVN support included in this build
- AL device fails to load (same visual output with sound support 
disabled via startup parameter)
- png loader plugin produces a warning due interlacing beeing off
- no teaser image
This is how it looks like:
http://www.flickr.com/photos/43342833@N04/6190895429/in/photostream

Cheers,
Paul

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Strange Build Result

2011-09-22 Thread Paul Guhl
I produced project files with CMake and built FG release 2.4.0 with 
MSVS2008 (latest service pack, built on Windows7 64bit). The overall 
process worked with minor glitches, but executable has only 5.18Mb 
compared to 9.2MB of the FG Release. It runs, the initialization phase 
succeeds successfully, but in the virtual environment i only see the HUD 
bars and sky color background. The application menue is fully 
operational. The only option i left out is the SVN dependency. Tried to 
run my executable in fully built own environment as well as in the 
release 2.4.0 installer provided one with the same result.

Any idea?

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Running FG in debug mode? Profiling?

2011-09-08 Thread Paul Guhl
Is it possible to run FG in debug mode stepping with some IDE? I built 
FG with MS VS 2008 an MSVS 2010. While both toolchains produce working 
executables, none of them would run in debug mode. Launching a debug 
version of fgfs.exe just plain off without IDE in backstages fails in 
both cases due memory allocation errors while processing png textures. 
Is the 3.0.1 OSG version guilty? I noticed changed dependencies compared 
with current 2.4.0 FG and OSG version it uses: my 3.0.1 OSG asks for 
libpng13.dll and zlib.dll. The OSG compiled into 2.4.0 release is just 
happy with its internal png reader in osgdb_png***.dll

Also, does anyone tried to profile FG with gprof or something?

Best Regards
Paul

--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Code::Blocks IDE Project files for Linux?

2011-09-02 Thread Paul Guhl
Does someone have project files for Code::Blocks IDE for Linux? I would 
like to compile FG on Linux with Intel Compiler and profile the debug 
output with Parallel Studio.

Best Regards
Paul

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Which compiler has been used for Release 2.4.0?

2011-08-31 Thread Paul Guhl
For compatibility i would like to know, which compiler has been used for 
building the 2.4.0 windows release?


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Content protection for modders?

2011-08-28 Thread Paul Guhl
Hello all,

i see the intention behind protecting models has been misunderstood. 
Lets clarify the issues: the modellers asked me to provide secured file 
format to prevent model theft and resell for benefit. They are willing 
to contribute to FG and don't plan to sell add-ons. Instead they would 
like to see their copyright enforced and not abused by others. AFAIK 
open source licenses in generall are about the programs and their code, 
not the conent people create with this software. I bet noone would ask 
companies using open office to disclose their documents or excel sheets 
;). I also notice that MSFS enjoys greater attention by add-on creators. 
As for the protection realization: i think of an OSG format plugin 
supporting common OSG plugin conventions. The code won't be disclosed 
and only shipped in compiled form for dynamic linking against.

Best Regards
Paul

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Content protection for modders?

2011-08-25 Thread Paul Guhl
Hello everybody,

not sure if this discussion arose before... From what i have seen so 
far, all usable 3d formats for aircraft/building models are either ASCII 
text or reversible/convertible formats. Mod developers told me, that 
they would wish close format for 3d models which would prevent reverse 
engineering of the content they create for free. I feel it is a legitim 
wish and would invite more modelers to join the FlightGear project.

Is it legal to provide closed source plug-in to FlightGear (more exact 
OSG file reader plug-in). The only need to keep code close is the 
prevention of reverse engineering.

Thoughts, suggestions?

Best Regards
Paul

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Near Clipping in the virtual cockpit: please help!!

2011-02-12 Thread Paul Guhl
Curtis,

I know, it's a problem solved in FG many years ago :). I know it arises 
in all simulations and has to be solved in some way. Falcon4 for example 
apears to be scaling the cockpit model 10x of original size (from what i 
have seen in the code).

Thanks for advice, i will check it! It was also my idea to feature 
ordered renderinging and switching z-depth depending on the stage, now i 
have to discover how :D

Thanks!

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Near Clipping in the virtual cockpit: please help!!

2011-02-09 Thread Paul Guhl
Hello!

I have unsolved problem driving me nuts for weeks now. In my opengl 
application the terrain presentation is flickering very frequently 
(either as whole our 1/3 of all polygons). The problem disappears as 
soon as i increase the near clipping value. The problem root is the z 
buffer precision, but greater near clipping in turn truncates much of 
the virtual cockpit display. How did you solve the clipping problem in 
flight gear???

Thanks in advance
Paul

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Global Coordinate System

2010-11-11 Thread Paul Guhl
Hello!

I'm a hobby programmer and work on a flight simulation project as well 
and would like to ask probably a trivial question:
Lets the global origin of the coordinate system be at 0deg lat and 0deg 
lon. While moving an aircraft within 100km off the global origin, the 
movement and camera rotation / position work smooth. When moving further 
away the transformations start to jitter increasingly, transformations 
are less exact. The problem is most probably rooted  in rounding error. 
Solution for this problem is the switch to the local coordinate system.
My question is: how the local/global coordinates are managed in FlightGear?
Where in the code i could reivew your solution?
How do you solve the momentum of entering critical distances of the 
local coordinate system, ergo moving local coordinate system to get the 
aircraft back again within the limits of the local coordinate system?


Kind Regards and thanks in advance
Paul

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel