Rendering problems in java3d 1.6.0

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

Rendering problems in java3d 1.6.0

miro77
Hello,

I've just updated from Java3D 1.5.2 to Java3D 1.6.0 and now I get a poor rendering and spiky edges where it should be round cylindrical appearances of my gears:

with Java3D 1.6.0
how it was with Java3d 1.5.2:
java3d_1.JPG

Maybe I have to change some settings or some little adjustments in my code?

I use basically the following to generate my Java3D-Elements:

GeometryInfo gi=new GeometryInfo(triangleStripArray);
NormalGenerator normGen=new NormalGenerator();    
normGen.generateNormals(gi);
Shape3D shape=new Shape3D();
shape.setGeometry(gi.getGeometryArray());

I would really appreciate to here from you all.

Kind regards,
Miro

Reply | Threaded
Open this post in threaded view
|

Re: Rendering problems in java3d 1.6.0

gouessej
Administrator
Hey

Please can you reproduce your problem on several different computers? If it persists, you'll have to provide a SSCCE.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Rendering problems in java3d 1.6.0

philjord
Hi Miro,
Thanks for posting this issue.

As mentioned we'll need a bit more information to be able to investigate and give you an answer.

Generally speaking the calls you are using to GeometryInfo and NormalGenerator are exactly the same in the 2 versions and are unlikely to be the cause of the issue. I'd say given the nice curved outer parts of the image that the geometry generated is about right.

Looking at the image my very first thought is that your z-buffer is not big enough and you are getting z-fighting. This would not be unexpected as the internal configuration of a Canvas3D and it's associated graphics context in back end is quite different between the 2 versions.

So to move forward we really need to see how you are setting up your Canvas3D in code and your hardware specs.

Then after that possibly a bit of debug output for the configurations supported by your driver and the defaults picked, which I can tell you how to get after you post the first 2 parts.

Thanks,
Phil.
Reply | Threaded
Open this post in threaded view
|

Re: Rendering problems in java3d 1.6.0

miro77
Hi Phil,

here is my (simple) code:

GraphicsConfiguration config=SimpleUniverse.getPreferredConfiguration();
canvas=new Canvas3D(config);
universe=new SimpleUniverse(canvas);
universe.addBranchGraph(scene);

OrbitBehavior orbit=new OrbitBehavior(canvas, OrbitBehavior.REVERSE_ALL|OrbitBehavior.STOP_ZOOM);
universe.getViewingPlatform().setViewPlatformBehavior(orbit);

My Hardware:
8GB RAM, Intel i5-4670 CPU@3.40 GHz,
Graphics:


Software: Windows 7, Java 7.

Thank you for your efforts and answer.

Regards,
Miro



Reply | Threaded
Open this post in threaded view
|

Re: Rendering problems in java3d 1.6.0

gouessej
Administrator
Thank you for the feedback with the information about your hardware but please provide a SSCCE. The few lines you provide don't allow to reproduce your problem.
Julien Gouesse | Personal blog | Website