[Flightgear-devel] Cloud altitudes in shader?

2012-01-09 Thread thorsten . i . renk

Hi Stuart,

is gl_Vertex.z a reasonably approximate guess for the altitude in which
the cloud finally appears or do I have to look elsewhere? There's lots of
reshuffling of the vertex coordinates going on in the shader, and I've
kind of lost track a bit...

* Thorsten


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Aircraft issues: Vostok-1, (dc-3, dhc6, CRJ700, pa24-250-CIIB)

2012-01-09 Thread thorsten . i . renk
 Thorsten, can you make a test flight and see if the instruments behave
 as they used to?

I've just updated everything and had a short hop with Vostok to ~100 km
altitude and 2nd stage burnout - at least five minutes into the mission,
everything was looking and responding normally, so I'd assume that your
fix was good.

I'll try a full orbital insertion and return in the next few days (it's
quite tricky and takes some time) - I want to test the the skydome shader
performance anyway.

Thanks,

* Thorsten


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Aircraft issues: Vostok-1, (dc-3, dhc6, CRJ700, pa24-250-CIIB)

2012-01-09 Thread Anders Gidenstam
On Mon, 9 Jan 2012, thorsten.i.r...@jyu.fi wrote:

 Thorsten, can you make a test flight and see if the instruments behave
 as they used to?

 I've just updated everything and had a short hop with Vostok to ~100 km
 altitude and 2nd stage burnout - at least five minutes into the mission,
 everything was looking and responding normally, so I'd assume that your
 fix was good.

 I'll try a full orbital insertion and return in the next few days (it's
 quite tricky and takes some time) - I want to test the the skydome shader
 performance anyway.

Great! Thanks for testing the bug fix.

Cheers,

Anders
-- 
---
Anders Gidenstam
WWW: http://gitorious.org/anders-hangar
  http://www.gidenstam.org/FlightGear/

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Cloud altitudes in shader?

2012-01-09 Thread Stuart Buchanan
Hi Thorsten,

No, I don't think gl_Vertex.z will give you the cloud altitude. That's
just the vertex position relative to the sprite center. glColor is
used to pass in the sprite location relative to the cloud center, and
the Model Matrix places the cloud relative to the rest of the scene.

I don't think the Model matrix will help you much either, as IIRC
(0,0,0) is the center of the earth spheroid.

What do you need it for? sunrise/sunset lighting?

As it happens, the Impostor changes will reduce the number of
variables required by the shader significantly, so I could add it in
as an additional variable if it would be useful.

-Stuart

On Mon, Jan 9, 2012 at 8:08 AM,  thorsten.i.r...@jyu.fi wrote:

 Hi Stuart,

 is gl_Vertex.z a reasonably approximate guess for the altitude in which
 the cloud finally appears or do I have to look elsewhere? There's lots of
 reshuffling of the vertex coordinates going on in the shader, and I've
 kind of lost track a bit...

 * Thorsten


 --
 Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
 infrastructure or vast IT resources to deliver seamless, secure access to
 virtual desktops. With this all-in-one solution, easily deploy virtual
 desktops for less than the cost of PCs and save 60% on VDI infrastructure
 costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Cloud altitudes in shader?

2012-01-09 Thread thorsten . i . renk

 I don't think the Model matrix will help you much either, as IIRC
 (0,0,0) is the center of the earth spheroid.

Hm, the line is

  gl_Position = gl_ModelViewProjectionMatrix * gl_Position;

Doesn't gl_ModelViewProjectionMatrix transform things into 2d screen
coordinates?

Would it work if I use a different matrix instead? Apparently

vec4 groundPoint = gl_ModelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0);

can be used to generate the zero altitude point just below the current
view, so then the length of the difference vector dotted with an 'up'
normal would represent altitude (?)

 What do you need it for? sunrise/sunset lighting?

Yes, the earthShade factor should affect objects dependent on their
altitude, basically I want glowing high-altitude clouds whereas the lower
clouds are still dark.

* Thorsten


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Cloud altitudes in shader?

2012-01-09 Thread Emilian Huminiuc
On Monday 09 January 2012 10:31:24 Stuart Buchanan wrote:
 On Mon, Jan 9, 2012 at 10:00 AM,  thorsten.i.renk wrote:
  I don't think the Model matrix will help you much either, as IIRC
  (0,0,0) is the center of the earth spheroid.
  
  Hm, the line is
  
   gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
  
  Doesn't gl_ModelViewProjectionMatrix transform things into 2d screen
  coordinates?
 
 Correct (hence my reference to the Model matrix, rather than
 ModelViewProjection matrix).
 
  Would it work if I use a different matrix instead? Apparently
  
 vec4 groundPoint = gl_ModelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0);
  
  can be used to generate the zero altitude point just below the current
  view, so then the length of the difference vector dotted with an 'up'
  normal would represent altitude (?)
 
 I didn't know that.
 
  What do you need it for? sunrise/sunset lighting?
  
  Yes, the earthShade factor should affect objects dependent on their
  altitude, basically I want glowing high-altitude clouds whereas the
  lower
  clouds are still dark.
 
 Thought so. That would be yet another nice effect to add :)
 
 On Mon, Jan 9, 2012 at 10:08 AM, Emilian Huminiuc wrote:
  In the transition shader (and the other terrain shaders), using
  gl_Vertex.z works as a good aproximation (it's used to determine if
  there should be snow painted, sometimes it behaves funny, but it's
  generally reliable enough), but for clouds maybe using the final value
  of gl_Position.z might give you what you want?
 
 The gl_Vertex of the terrain has a different coordinate system
 (presumably based on
 (0,0,0) being the center of the tile at sealevel?) than the clouds
 (where (0,0,0) is the
 center of the sprite).
 
 -Stuart
 
I know that, that's why I suggested the final position, which should be 
actually given by ecPosition.z. (At least for fogging the trees that works as 
expected, I assume the trees use roughly the same approach).--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Cloud altitudes in shader?

2012-01-09 Thread Emilian Huminiuc
On Monday 09 January 2012 12:48:25 Emilian Huminiuc wrote:

 I know that, that's why I suggested the final position, which should be
 actually given by ecPosition.z. (At least for fogging the trees that works
 as expected, I assume the trees use roughly the same approach).
Actually meant gl_Position.z (ecPosition is in screen coordinates)--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Cloud altitudes in shader?

2012-01-09 Thread Frederic Bouvier
Hi Thorsten,
 De: thorsten i renk
 
  I don't think the Model matrix will help you much either, as IIRC
  (0,0,0) is the center of the earth spheroid.
 
 Hm, the line is
 
   gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
 
 Doesn't gl_ModelViewProjectionMatrix transform things into 2d screen
 coordinates?
 
 Would it work if I use a different matrix instead? Apparently
 
 vec4 groundPoint = gl_ModelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0);
 
 can be used to generate the zero altitude point just below the
 current view, so then the length of the difference vector dotted with 
 an 'up' normal would represent altitude (?)

gl_ModelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0); 

has always been the position of the camera in world coordinates.

If object center is at altitude 0, and up vector is (0,0,1,0), you could 
use gl_Vertex.z/gl_Vertex.w as the altitude of the vertex, but you'll 
probably see numerical inaccuracy because transforming big numbers with 
matrices of float is not recommended.

If you need world coordinates of any vertex, OSG predefined this :

// add me to the shader
uniform mat4 osg_ViewMatrixInverse;

that you can use like this :

vec3 wPos = osg_ViewMatrixInverse * gl_ModelViewMatrix * gl_Vertex;

Regards,
-Fred

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] G115; Was Aircraft issues: dg101g, Lightning

2012-01-09 Thread Martin Spott
Martin Spott wrote:

 Which motor aircraft do you use for towing ? Given the above figures I
 suspect you're using the Piper Cub, right ?  Did you ever try the Grob
 G115 ? I've never flown that one, neither in RL nor in FG, but I
 *guess* it's probably the closest in performance and FDM credibiliy to
 commonly used towing aircraft.

I tried it today and as far as I can tell from a simple setup with
mouse-control only I'd say the G115 behaves sufficiently reasonable. 
BUT I'm _very_ surprised: Don't these birds have neither a speed
indicator nor engine gauges on the pilots side of the panel ?

Cheers,
Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] G115; Was Aircraft issues: dg101g, Lightning

2012-01-09 Thread Martin Spott
Martin Spott wrote:

 I tried it today and as far as I can tell from a simple setup with
 mouse-control only I'd say the G115 behaves sufficiently reasonable. 
 BUT I'm _very_ surprised: Don't these birds have neither a speed
 indicator nor engine gauges on the pilots side of the panel ?

Finally I've found out that the pilot-viewpoint and -model must be
sitting on the wrong side in FlightGear's G-115, because the real G-115
Tutor is supposed to be flown solo from the right seat  :-)

  http://www.raf.mod.uk/equipment/tutorgriffin.cfm

Cheers,
Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel