java3d OGL and DX...

hi!
i’ve many many questions again! ::slight_smile: :stuck_out_tongue:

  1. How to install both implementations and switch easely from the one to the other? (for testing purposes)

  2. Despite of having a FPS rate of about 60-70, the animation is not smooth (OGL&DX), is it normal?

  3. i’ve seen suprising things here, with both implementations: PointLights act differently! It’s hard to explain clearly the difference, maybe this sheme will help, where 0 is the point light source, and X the “camera” looking at the top:
    OGL (1.3.1 beta):
    0
    .
    .
    .
    X
    DX (1.3.1):
    0
    .
    .
    .
    X
    In the OGL impl, a main light ray is directed // to the direction you’re looking at while in DX impl it’s directed on you. (EDIT: for specular reflection!)Strange huh?!
    Are there many differences like this?

  4. also, there is drastical changes with framerates, i’ve nearly the double with DX! I’ve heard ATI cards support better DX than OGL, that could be the reason.
    Is it possible for an app to test both and chose the best for running?

  5. How to see if hardware is used, and which grapic card is used?

That’s really a lot of questions!!! :stuck_out_tongue:
Any answer is appreciated!

  1. Perhaps this would work: Install a version of the JRE into your program directory - rename the directory jre_gl and then create a copy of it and rename it jre_d3d. Next find the java3d dll files ( java3d.dll and two others, I don’t remember which but it should be evident from their names) from a direct3d and opengl install of java3d. You should be able to run $DirectoryHome/jre_gl/bin/java MyApp or $DirectoryHome/jre_d3d/bin/java MyApp to use the different versions of Java3D. I havent done this exactly, but I speculate that it is correct.

  2. If the framerate is high but the animation is not smooth then it may be that some other part of your program is running at a rate that means your scene is not changing for every frame that is rendered.

  3. I have no idea.

  4. ATI do seem to support openGL in a fairly half-assed way. I don’t know if it is possible to choose the best version either at runtime or at install time, but I would be very interested to know if there is a workaround for this.

  5. I again have no idea.

thanks

any other still welcome

[quote]hi!
i’ve many many questions again! ::slight_smile: :stuck_out_tongue:

  1. How to install both implementations and switch easely from the one to the other? (for testing purposes)
    [/quote]
    Two copies of the jre + java3d, just change your batch file between the two instalations

[quote]2) Despite of having a FPS rate of about 60-70, the animation is not smooth (OGL&DX), is it normal?
[/quote]
Yes and no, there could be two reasons off the top of my head

  1. your running windows 98 which only has a timer res of 50 millis, which means a max animation of 20 fps (if my brain serves me right)
  2. Your unimation/view updates aren’t in sync with the render thread, are you updating your objects from a behavior, or from a seperate thread?

[quote]3) i’ve seen suprising things here, with both implementations: PointLights act differently! It’s hard to explain clearly the difference, maybe this sheme will help, where 0 is the point light source, and X the “camera” looking at the top:
[/quote]
erm

[quote]4) also, there is drastical changes with framerates, i’ve nearly the double with DX! I’ve heard ATI cards support better DX than OGL, that could be the reason.
[/quote]
I’ve heard this more in reference to bugs rather than FPS, but it’s possible

[quote]Is it possible for an app to test both and chose the best for running?
[/quote]
not unless you install both version in two vms (from your application), run a test, and save the results, this will make one huge download.

[quote]5) How to see if hardware is used, and which grapic card is used?
[/quote]
Not that I know of

Hope that helps some.

Endolf

thanks, i’ll try later with the batch file (or the different path installation + dll à la breakfast), i’m now staying with the better one for a while…

About the jerky motions, it’s not a thread problem nor anything like this. Even with the simple rotating color cube demo, when the window is maximized, the motion… No, in fact, it’s the rendering which is jerky! It suffers lot’s of innaccuracies, imperfections. drawing is jerky, despite of having fps > 60.

Bah, doesn’t matter, everything else is running fine! :stuck_out_tongue: