Skip to main content

Performance Problems with AntiAliasing

5 replies [Last post]
mattn
Offline
Joined: 2010-06-25
Points: 0

hi,
im from germany so the spelling or grammar might not be the best ...
___________________________________________________________
my problem:
i have enormously performance problem´s by renderin my scene with enabled anitaliasing
("canvas.getView().setSceneAntialiasingEnable (true);")

i have 300 cubes and every cube is connected with a line with the forrunner cube
(demo to check the performance)

so i enable the antialiasing of the lineattributes(for each line) -> performance is ok

so when want to antialiase a text3d or the cubes i have to set antialiasing enable to the whole canvas -> performance is realy bad

i tryed to boost the performance by setting CULL_BACK (- polygonattributes from the cubes) but there is no success

can you help me to solve this problem

edit:
the problems occur by changing the viewpoint(orbitbehavior) or navigate a transformgroup with mouse rotate/zoom/translate --> bucking

this bucking occurs even when i set the polygonattributes = PolygonAttributes.POLYGON_POINT .... java have to render just 4 points .... when scene antialiasing true --> bucking when i whant to rotate the "box"

is it possible to antialiase a shape/like a box or a text3d...line or pointAA dosnt work...

addition statement

Message was edited by: mattn

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lyfox
Offline
Joined: 2010-08-17
Points: 0

Hi again, I tried your demo running.
Well, the good thing is: there was no bucking at all. The bad thing is that I couldn't notice any antialiasing at all, even when the text field said "on".. >_<

As far as I'm concerned, the .getPreferredConfiguration() call doesn't always return an appropriate config with antialias support. At least my programs on my machine always stated, that Canvas3D.getSceneAntialiasingAvailable() flag was false. And all the attempts to set antialiasing modes failed. I don't know exactly why that happens, but since there wasn't any exact task for me to turn it on, I never cared much about it.

I'm sorry, but adraid I can't help you solve this problem at the moment. I'll be looking over the docs and srcs on j3d, and if something comes up I'll let you know.

Meanwhile, there is a chance that the reason lies within that GraphicsConfiguration class (along with its neighbour GraphicsEnvironment). I bet it would require some deeper knowledge about graphics hardware. Sorry for being helpful only this much.

mattn
Offline
Joined: 2010-06-25
Points: 0

finally i got it...
the function
GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
// 1 = Multisampling Antialiasing
template.setSceneAntialiasing(1);// GraphicsConfigTemplate3D.REQUIRED
c = new Canvas3D(GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice().
getBestConfiguration(template));

was not workling just because my videocard does not support multisampling(normaly the card sould support - i think this function is broken -.-)

the multisampling test is @
https://j3d-webstart.dev.java.net/test/
->QueryProperties-> sceneAntialiasingNumPasses = 1 --> support multisampling
->QueryProperties-> sceneAntialiasingNumPasses = 8 --> dosnt support multisampling

aces
Offline
Joined: 2003-07-17
Points: 0

Query sceneAntialiasingNumPasses before you create your running Canvas3D.
And set graphicsConfigTemplate3D.setSceneAntialiasing as REQUIRED / PREFERRED when sceneAntialiasingNumPasses == 1.

btw, check if the D3D renderer gives better AA performance.

lyfox
Offline
Joined: 2010-08-17
Points: 0

Would you post a link for a demo or at least some code source? It's hard to tell what causes your bucking and how big that thing is.

And check out this applet to compare: http://openastexviewer.net/web/jsinterface.html. Maybe your anxiety's out of nothing. You know, antialising is something that always demand hardware resources.

mattn
Offline
Joined: 2010-06-25
Points: 0

thanks for your reply
yes i know... aliasing is depending on hardware...
I post a demo tomorrow at midday...

you will see every computer should be able to render a fluent scene (even 4 dots bucks)...

by the way...i just got few bucks..but it is no comparison with my (realy simple) scene

_______
edit

so I link to the zip file, with the src-code and a html view of the applet -> so you are able to understand what I mean with every pc should be able to render this mini scene fluently...
http://www.file-upload.net/download-2758162/demo.zip.html

Message was edited by: mattn

Message was edited by: mattn