[GEM-dev] gem cvs alpha-depth bug?

guenter geiger geiger at xdv.org
Mon Dec 1 20:03:25 CET 2003


On Mon, 1 Dec 2003, B. Bogart wrote:
> When the "depth" object is in a gemchain lighting is not rendered properly.
>
> (objects become hollow (ie reversed) with the front facing missing and the
> lighting that of a hollow box)
>
> now if depth turns off depth buffering this would explain it.
>
> It would be nice to be able to make a box in gem that is properly
> transparent (all the back faces being visible. with lighting on. Right now
> if you just create a box without depth lighting works, but not all the sides
> are transparent! (I imagine because of the render order of the faces) all
> sides do become transparent with [depth] but then lighting does not work.

That was actually what the new feature of alpha was trying to achieve.
It only turns off depth test for the affected object. Thats what is
suggested for implementing blending in the OpenGL Guide.

See attachment for an example of a transparent cube with lighting.
Of course, this is not a "real" solution...

> I really would be happy to drop all this render order nonesense. Objects
> further back (in z) get rendered first. If the user wants to override this,
> then then can specify a render-order with [tigger] or gemhead arguments.
> This would simply be a lot more intuitive approach. (if its possible.)

I think it is possible, but it is quite an effort to do so. We would have
to calculate all the matrixes twice and then do the sorting by hand,
per polygon. Not something I see feasible in the near future, but
I am not a OpenGL guru.

>
> Ben
>
> ----- Original Message -----
> From: "guenter geiger" <geiger at xdv.org>
> To: <ben at ekran.org>
> Cc: <gem-dev at iem.at>
> Sent: Sunday, November 30, 2003 2:20 PM
> Subject: Re: [GEM-dev] gem cvs alpha-depth bug?
>
>
> > On Fri, 28 Nov 2003 ben at ekran.org wrote:
> > > I'm actually very fond of z-buffering
> > >
> > > could we "fix" lighting so that it works as expected with
> depth-buffering on?
> >
> > What do you mean with "fix" the lighting ?
> > Is there another problem I have overlooked ?
> >
> > Guenter
> >
> > >
> > > Ben
> > >
> > >
> > > > On Fri, 28 Nov 2003 ben at ekran.org wrote:
> > > >> hey all,
> > > >>
> > > >> I just updated my gem cvs again today.
> > > >>
> > > >> I've noticed an odd bug with alpha (again). this time the alpha
> object
> > > >> seems to turn on depth buffering when its in the chain!
> > > >
> > > > Ooops, obviously my fault.
> > > > I have changed default behaviour of alpha to the one it was in 0.87.
> > > > Damn, I really forgot about that, ...
> > > >
> > > > It is not really a bug, but a feature that lets you use alpha blending
> > > > independent from position, but the default behaviour should of course
> > > > stay the same. Sorry ..
> > > >
> > > > Guenter
> > > >
> > > >>
> > > >> I'm using lighting (because lighting tends to get messed up when
> using
> > > >> "depth" to show the effect. without a depth object in a chain, the
> > > >> cube looks identical to its depth counterpart, as long as the alpha
> > > >> object is in the chain. If I turn off the alpha object it works fine.
> > > >> (looks as it does without using depth.
> > > >>
> > > >> Here is an example patch.
> > > >>
> > > >> Ben
> > > >>
> > > >>
> > > >
> > > >
> > > > _______________________________________________
> > > > GEM-dev mailing list
> > > > GEM-dev at iem.at
> > > > http://iem.at/cgi-bin/mailman/listinfo/gem-dev
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > GEM-dev mailing list
> > > GEM-dev at iem.at
> > > http://iem.at/cgi-bin/mailman/listinfo/gem-dev
> > >
> >
>
>
> _______________________________________________
> GEM-dev mailing list
> GEM-dev at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/gem-dev
>
-------------- next part --------------
#N canvas 0 0 450 300 10;
#X obj 43 67 gemwin;
#X obj 135 14 gemhead;
#X obj 43 33 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X msg 62 32 create;
#X obj 135 200 alpha;
#X floatatom 157 72 5 0 0 0 - - -;
#X floatatom 200 71 5 0 0 0 - - -;
#X floatatom 246 71 5 0 0 0 - - -;
#X floatatom 290 70 5 0 0 0 - - -;
#X msg 42 182 lighting 1;
#X floatatom 164 184 5 0 0 0 - - -;
#X msg 25 9 lighting 0;
#X floatatom 199 18 5 0 0 0 - - -;
#X floatatom 245 18 5 0 0 0 - - -;
#X floatatom 289 17 5 0 0 0 - - -;
#X obj 135 222 cube;
#X obj 316 239 world_light;
#X obj 316 218 gemhead 30;
#X msg 165 160 auto 1;
#X obj 135 49 rotateXYZ 80 20 30;
#X obj 135 105 colorRGB 1 1 1 0.5;
#X obj 165 140 loadbang;
#X connect 1 0 19 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 15 0;
#X connect 5 0 20 1;
#X connect 6 0 20 2;
#X connect 7 0 20 3;
#X connect 8 0 20 4;
#X connect 9 0 0 0;
#X connect 10 0 4 1;
#X connect 11 0 0 0;
#X connect 12 0 19 1;
#X connect 13 0 19 2;
#X connect 14 0 19 3;
#X connect 17 0 16 0;
#X connect 18 0 4 0;
#X connect 19 0 20 0;
#X connect 20 0 4 0;
#X connect 21 0 18 0;
#X connect 21 0 9 0;


More information about the GEM-dev mailing list