Flicker

When I add objects to the scenegraph, with textures that contains transparent pixels, untextured objects start to flicker, that is they occasionally turn black. Anyone else who has had that problem?

Is it a bug or a feature and in that case are there a work around other than texturing all objects?

Thanks
Björn

Please please please!

We need a test case. Potentially this may be a bug, so the best way is to make a small test program - as simple as possible - and file it into IssueZilla.

Yuri

if i make an model and add it to the scene and move away from it. the models faces start to flicker. like flashing around the edges. it starts to flash even more as i move away from the model. u dont need textures- but they dont help. it just seems to keep happening.

i will update to the latest Xith and JoGL today to see if this is still happening… its not very nice looking. and i dont recall it happening in older versions.

i’ll get back to u all…

ok im all up to date. :slight_smile:

it seems its somthing to do with Material and setting lighting to true. i dont get flashing if iset to to false

.setLightingEnable(false);

looks like a lighting thing.

i get flashing when using textures. turning Material lighting to false makes not difference… :frowning:
– looks bad. wonder why everyone isent seeing this?

my models are 100*100 square in size… could it be that?

locked it down… not sure its a bug- as always

view.setFrontClipDistance(000.1f);
view.setBackClipDistance(5000f);

the frontClipDistance cant be this small. so i have set it to 1f and nothing flashes now. so looks like i will have to find a way of zooming in only to 1f… gurr… downer… but thats what the probjem is…

Sounds like z-fighting which is due to precision errors/roundings in the depth buffer. I dunno how Xith handles things but if possible you’ll be able to make things better with a higher precision depth buffer (32 or 24 instead of 16).

You’ve basically got too much distance between your near and far planes, so you need to reduces that somehow. Also the depth buffer is logarithmic, so most of the precision is near the camera. This means that you’ll likely get better precision by pushing the front plane out a little as you’ve tried. If you really do need the front plane that close then try reducing the far plane quite a bit to compensate.

The front/back clipping ratio documentation here is very good, and applies to opengl/xith/whatever as much as java3d.

HTH

Endolf

cool thanks dude :slight_smile: - intresting read. just did some messing around and fix some other stuff :wink: now it all looks sweet…