How do I enable anti-aliasing?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I enable anti-aliasing?

unixnerd
How do I enable anti-aliasing? With Java3D 1.5.x I was using this but it no longer works:

             
			System.setProperty("j3d.implicitAntialiasing", "true");
                        View view = new View();
			ViewPlatform viewPlatform = new ViewPlatform();
			viewPlatform.setActivationRadius(100f);
			viewPlatform.setViewAttachPolicy(View.NOMINAL_HEAD);

			view.setProjectionPolicy(View.PERSPECTIVE_PROJECTION);
			view.setViewPolicy(View.SCREEN_VIEW);
			view.attachViewPlatform(viewPlatform);

			PhysicalEnvironment phyEnv = new PhysicalEnvironment();
			view.setPhysicalEnvironment(phyEnv);

			GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
			template.setSceneAntialiasing(GraphicsConfigTemplate.PREFERRED);
			GraphicsConfiguration config = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getBestConfiguration(template);
			view.setSceneAntialiasingEnable(true);

			canvas3d = new Canvas3D(config);
Reply | Threaded
Open this post in threaded view
|

Re: How do I enable anti-aliasing?

unixnerd
System.out.println("anti-aliasing available "+ canvas3d.getSceneAntialiasingAvailable());
prints true, so the system thinks it's at least a possibility :-)
Reply | Threaded
Open this post in threaded view
|

Re: How do I enable anti-aliasing?

unixnerd
This post was updated on .
Bump. Any ideas? Spent a fair while on this.

For info I'm on Windows 10 64 bit. NVIDIA Quadro 4000 on DirectX 12.0, Direct3D API 11.2
If I go into my NVIDIA control panel and set:
Use advanced 3D image settings, AntiAliasing - FXAA to ON
then it works. But sceneAntialiasingNumPasses is still 1. It looks way better but not quite as good as my old setup under Java3D 1.5.x.

I'm also worried I've made this work on my machine but it's not a general solution for other users.

Any thought? Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: How do I enable anti-aliasing?

gouessej
Administrator
By the way, JogAmp's Java3D doesn't use DirectX, the obsolete versions of Java3D don't have a consistent behavior and they have plenty of unfixed bugs.

Thank you for the hint about the advanced 3D image settings. It would be nice to know whether the problems comes from Java3D or from JOGL. I advise you to run an existing JOGL unit test about antialiasing.
Julien Gouesse | Personal blog | Website