[osg-users] Light point depth

Ivan Bolčina ivan.bolcina at gmail.com
Thu Sep 6 01:32:12 PDT 2007


Hi Simon,

Could you explain how you implemented your lights on space ship like in *
pic22312.jpg*? I too am developing a space ship application ( a home made
game in my case) and need same stuff (lights on ship, lens flare, and engine
exoust). If you can share some code that would be great!

Bye,
Ivan


2007/1/9, Simon.Mills at esa.int <Simon.Mills at esa.int>:
>
> Hi Zach,
>
> No as it's polygonal geometry. My light is also a 3D object, not light
> point.
> For me this is approriate as they are small lights that would appear
> dimmer,
> and hence have less "glow", when seen far away.
>
> Thinking about it lights like street lights might need to remain still
> quite
> bright as you move far away and the normal perspective foreshortening
> would
> reduce the glow too much.
>
> Regards, Simon
> _______________________________________________________________________
>
> Simon Mills
> Modelling & Simulation Section (TEC-SWM)        Tel: +31 (0)71 565 3725
> European Space Agency (ESA/ESTEC)               Fax: +31 (0)71 565 5420
> Postbus 299, 2200AG Noordwijk               e-mail: Simon.Mills at esa.int
> The Netherlands                       http://simulation.esa.int
> _______________________________________________________________________
>
>
>
>              Zach Deedler
>              <zjd at faac.com>
>              Sent by:
> To
>              osg-users-bounces@         "'osg users'"
>              openscenegraph.net         <osg-users at openscenegraph.net>
>
>                                                                           cc
>
>              09/01/2007
> 15:42                                        Subject
>                                         RE: [osg-users] Light point depth
>
>              Please respond to
>                  osg users
>              <osg-users at opensce
>                 negraph.net>
>
>
>
>
>
>
> Hi Simon,
>
> Looks good.  If you zoomed in on one of the halos, would it shrink like a
> light point does?
>
>
> Zach
>
> -----Original Message-----
> From: osg-users-bounces at openscenegraph.net
> [mailto:osg-users-bounces at openscenegraph.net] On Behalf Of
> Simon.Mills at esa.int
> Sent: Tuesday, January 09, 2007 03:22
> To: osg users
> Subject: RE: [osg-users] Light point depth
>
> Yes, glow is uniform from all directions. Here's a screen snap to show how
> it looks in my application.
>
> The offset billboard trick was good enough for me avoiding the effort of
> hooking up specific run-time coding. I guess some kind of generic run-time
> interface could be constructed but of course would get progressively
> heavier
> the more light halos you have.
>
> (Embedded image moved to file: pic22312.jpg)
>
> Regards, Simon
> _______________________________________________________________________
>
> Simon Mills
> Modelling & Simulation Section (TEC-SWM)        Tel: +31 (0)71 565 3725
> European Space Agency (ESA/ESTEC)               Fax: +31 (0)71 565 5420
> Postbus 299, 2200AG Noordwijk               e-mail: Simon.Mills at esa.int
> The Netherlands                       http://simulation.esa.int
> _______________________________________________________________________
>
>
>
>
>              Brad Colbert
>
>              <bcolbert at rscusa.c
>
>
> om>                                                          To
>
>              Sent by:                   osg users
>
>              osg-users-bounces@         <osg-users at openscenegraph.net>
>
>              openscenegraph.net
> cc
>
>
>
>
> Subject
>
>              08/01/2007 23:03           RE: [osg-users] Light point depth
>
>
>
>
>
>              Please respond to
>
>                  osg users
>
>              <osg-users at opensce
>
>                 negraph.net>
>
>
>
>
>
>
>
>
>
> Is the glow uniform from all aspects?
>
> The reason I ask this sounds similar to work I did for a lightpoint halo,
> which is uniform, but does not intersect with geometry and disappears when
> the light source is occluded.
>
> -B
>
> > -----Original Message-----
> > From: osg-users-bounces at openscenegraph.net [mailto:osg-users-
> > bounces at openscenegraph.net] On Behalf Of Simon.Mills at esa.int
> > Sent: Monday, January 08, 2007 8:05 AM
> > To: osg users
> > Subject: RE: [osg-users] Light point depth
> >
> > I've had the same problem in the past and my solution, purely on the
> > modelling side, was to offset my glow polygon along the axes that
> points
> > towards the eye (+Y I think). Then the billboard is positioned at the
> > light source but the glow is drawn a little closer towards the eye. So
> > as
> you
> > look
> > more obliquely, the glow polygon is not immediately clipped in half.
> It
> > does
> > start to get clipped at some angle but the effect is much less
> serious.
> > For
> > me it was adequate for all my small lights in the scene and you might
> need
> > to
> > experiment with the offset distance which depnds on the light size. I
> used
> > the occlusion method too but only for really bright objects like the
> sun
> > with
> > lens flare etc.
> >
> > Regards, Simon
> >
> _______________________________________________________________________
> >
> > Simon Mills
> > Modelling & Simulation Section (TEC-SWM)        Tel: +31 (0)71 565
> 3725
> > European Space Agency (ESA/ESTEC)               Fax: +31 (0)71 565
> 5420
> > Postbus 299, 2200AG Noordwijk               e-mail:
> Simon.Mills at esa.int
> > The Netherlands                       http://simulation.esa.int
> >
> _______________________________________________________________________
> >
> >
> >
> >              Roderick Kennedy
> >              <Roderick.Kennedy@
> >              evos.net>
> > To
> >              Sent by:                   osg users
> >              osg-users-bounces@         <osg-users at openscenegraph.net>
> >              openscenegraph.net
> > cc
> >
> >
> > Subject
> >              04/01/2007 17:26           RE: [osg-users] Light point
> depth
> >
> >
> >              Please respond to
> >                  osg users
> >              <osg-users at opensce
> >                 negraph.net>
> >
> >
> >
> >
> >
> >
> > No now I think about it, that wouldn't work. What you need is for the
> > actual depth test to depend on the sprite centre, which can't be done
> > with
> the
> > usual
> > z-test. Sounds like the occlusion test is the way forward.
> >
> > From: osg-users-bounces at openscenegraph.net
> > [mailto:osg-users-bounces at openscenegraph.net] On Behalf Of Roderick
> > Kennedy
> > Sent: 04 January 2007 15:57
> > To: osg users
> > Subject: RE: [osg-users] Light point depth
> >
> > How about a billboard sprite shader that takes z depth from the sprite
> > centre?
> >
> > From: osg-users-bounces at openscenegraph.net
> > [mailto:osg-users-bounces at openscenegraph.net] On Behalf Of Zach
> Deedler
> > Sent: 04 January 2007 15:37
> > To: 'osg users'
> > Subject: RE: [osg-users] Light point depth
> >
> > Hmmm, looks like there is no simple solution.  For now, I'll just try
> to
> > offset the light points more, and put the more elegant solutions on
> the
> > back
> > burner.  Thanks for all the ideas everyone.
> >
> >
> >
> > Zach
> >
> >
> >
> >
> > From: osg-users-bounces at openscenegraph.net
> > [mailto:osg-users-bounces at openscenegraph.net] On Behalf Of Paul Martz
> > Sent: Thursday, January 04, 2007 10:17
> > To: 'osg users'
> > Subject: RE: [osg-users] Light point depth
> >
> >
> >  I don't care if the light point occludes objects within a few meters.
> > Would
> >  using a PolygonOffset work with a meter offset?
> > I believe PolygonOffset won't work for you when viewing the light at
> an
> > obtuse angle, say from the side, and slightly in front of, the
> vehicle. In
> > such a case, the further headlight would need a greater depth offset
> than
> > the
> > near headlight to in order to completely avoid intersecting the
> vehicle
> > body.
> >
> > In general, whether PolygonOffset produces acceptable results or not
> > varies depending on available depth buffer precision, and how you've
> > set your near/far planes.
> >
> > Paul Martz
> > Skew Matrix Software LLC
> > http://www.skew-matrix.com
> > 303 859 9466_______________________________________________
> > osg-users mailing list
> > osg-users at openscenegraph.net
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users at openscenegraph.net
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> _______________________________________________
> osg-users mailing list
> osg-users at openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
> _______________________________________________
> osg-users mailing list
> osg-users at openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070906/1e9d7533/attachment-0002.htm>


More information about the osg-users mailing list