Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gabriel.wurzer

Pages: [1]
1
Support / Re: strange blitting artefacts with software renderer
« on: September 21, 2014, 09:22:45 am »
Sorry for the "doesn't work", would have been more polite to say "the preferred way is..." :-) I've tried your suggestion
Code: [Select]
Config.texelFilter = false;
and while this did not change the blitting artifacts concerning the text, I noticed an improvement in billboarded text (see attached image). Now I can either
  • print text to a BufferedImage and assign this as a billboard texture, as given in the image. this has the advantage that the labels are treated as normal object within the scene that move with their hosting objects (I figure I shall addChild() the labels). the disadvantage I can imagine is that this uses a lot of texture memory - even more so if I want to display high-res text.
  • use Interact2D.projectCenter3D2D() and inverse camera transform on all wasVisible() objects of the scene, then see if that coordinate lies within the screen, then draw "over" the rendered jpct image with java2D which gives the qualitatively best results at the tradeoff of performance (since I have to go through every object once more)
still figuring what I'll do for best performance/visual quality; egon, if you have a gut feeling, then please let me know.

2
Support / Re: strange blitting artefacts with software renderer
« on: September 20, 2014, 05:02:48 pm »
Sorry, I just found the solution in the following thread http://www.jpct.net/forum2/index.php/topic,1074.msg14528/topicseen.html#msg14528. Summary: blitting of text doesn't work in software mode, revert to Java2D. Thank you!

3
Support / strange blitting artefacts with software renderer
« on: September 20, 2014, 04:23:05 pm »
dear all,
I get strange artifacts when blitting, as seen in the attached image, which shows that this happens both with billboards as well with text rendered through glFont.blit which uses Framebuffer.blit().



Details: I am using the software renderer in java, established through

Code: [Select]
FrameBuffer buffer = new FrameBuffer(width, height, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.enableRenderer(IRenderer.RENDERER_SOFTWARE);
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
...
World world = new World();
world.addObject(...billboarded object...)

Adjusting framebuffer size by a few pixels plus or minus does not help (this is, the assumption that it could be an issue with the passed-in size or of size being odd or even [as given in this post: http://www.jpct.net/forum2/index.php/topic,3158.msg23122.html#msg23122], does not hold).

I render using

Code: [Select]
public void paintComponent(Graphics g) {
  buffer.clear(java.awt.Color.DARK_GRAY);
  world.renderScene(buffer);
  world.draw(buffer);
  buffer.update();
  glFont.blitString(buffer, "this is a blitted text", 200, 100, 0, Color.ORANGE);
  buffer.display(g);
  repaint();
}

any suggestions?

Pages: [1]