Line l = new Line("l", points , null, colors, null);
l.setAntialiased(true);
l.setLineWidth(1.0f);
l.setModelBound(new BoundingBox());
l.updateModelBound();
this.attachChild(l);
//where points contains two Vector3f instances and colors contains two ColorRGBA instances
I already have set the minimum samples to 8 in the initialization routine of the game and have added antialiasing by applying an AlphaState to the parentNode of the lines (as you can see in the first picture). Also I did call setAntialiased(true) on the lines. For results see pic1.
Making the lines thicker results in visual fragments, too.
And I don’t even know what you mean by Z-Fighting and grid-offset, I am more or less a noob to 3d programming. The lines should be visible even if they were behind the map, since the map is transparent.
Try removing the map itself and see if it works better… If so, then you could do Polygon Offset (search the forums) to make sure you draw the lines in front of your map, if not, then you first need to come up with setting that would draw the lines neatly.
Try removing the map itself and see if it works better... If so, then you could do Polygon Offset (search the forums) to make sure you draw the lines in front of your map, if not, then you first need to come up with setting that would draw the lines neatly.
Yes, you're right, the lines look perfect without the map. Gonna tackle that PolygonOffset thing.
I thank thee much for this hint! Works perfectly now!