java3d
  1. java3d
  2. JAVA3D-617

OGL Driver with ATI Radeon - LinearArray not wotking wit Fog nodes

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: not determined
    • Component/s: j3d-core
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      617

      Description

      I am currently using an onboard ATI Radeon on Windows, and via -Dj3d.rend I am
      using the OGL driver.

      1) I draw a grid composed by thin lines, all LineArray, and then I add a
      LinearFog (ExponentialFog has the same behavior) node.

      2) I use OrbitBehavior to navigate the scene, but pratically only when I watch
      straight I see correctly all grid lines.

      But using D3D driver with fog all lines are correctly drawn, it seems that OGL
      works only without foggy nodes.

      See following pictures:
      Some screenshots:

      D3D, foggy watching straight:

      <a target='_blank' title='ImageShack - Image And Video Hosting'
      href='http://img385.imageshack.us/my.php?image=d3dstraight.jpg'><img
      src='http://img385.imageshack.us/img385/5026/d3dstraight.jpg'
      border='0'/></a><br/><a
      href="http://g.imageshack.us/img385/d3dstraight.jpg/1/"><img
      src="http://img385.imageshack.us/img385/d3dstraight.jpg/1/w666.png" border="0"></a>

      D3D, foggy watching with changed viewing angle:
      <a target='_blank' title='ImageShack - Image And Video Hosting'
      href='http://img222.imageshack.us/my.php?image=d3dangled.jpg'><img
      src='http://img222.imageshack.us/img222/6218/d3dangled.jpg'
      border='0'/></a><br/><a
      href="http://g.imageshack.us/img222/d3dangled.jpg/1/"><img
      src="http://img222.imageshack.us/img222/d3dangled.jpg/1/w666.png" border="0"></a>

      OGL, foggy watching straight (disappearing some lines):
      <a target='_blank' title='ImageShack - Image And Video Hosting'
      href='http://img217.imageshack.us/my.php?image=oglstraight.jpg'><img
      src='http://img217.imageshack.us/img217/4205/oglstraight.jpg'
      border='0'/></a><br/><a
      href="http://g.imageshack.us/img217/oglstraight.jpg/1/"><img
      src="http://img217.imageshack.us/img217/oglstraight.jpg/1/w644.png" border="0"></a>

      OGL foggy watching with changed viewing angle (disappearing all lines):
      <a target='_blank' title='ImageShack - Image And Video Hosting'
      href='http://img222.imageshack.us/my.php?image=oglangled.jpg'><img
      src='http://img222.imageshack.us/img222/4279/oglangled.jpg'
      border='0'/></a><br/><a
      href="http://g.imageshack.us/img222/oglangled.jpg/1/"><img
      src="http://img222.imageshack.us/img222/oglangled.jpg/1/w644.png" border="0"></a>

      The FOG

      LinearFog fog = new LinearFog();
      fog.setName("FOG-LIN:"+groupScope.getName());
      fog.setColor(new Color3f(BCK_COLOR));
      fog.setFrontDistance(.5D);
      fog.setBackDistance(27D);
      fog.setCapability(LinearFog.ALLOW_COLOR_WRITE);
      fog.setCapability(LinearFog.ALLOW_DISTANCE_WRITE);

      fog.setInfluencingBounds(this.worldBounds);
      fog.addScope(groupScope);
      this.getBranchRoot().addChild(fog);

      The GRID

      static Shape3D createLand(Color col) {
      Color3f cf = new Color3f(col);
      // Color4f cf = new Color4f(col);
      // cf.setW(0);

      int grid=50;
      int factor = grid*2;
      int size = 40*factor;
      LineArray landGeom = new LineArray(size, GeometryArray.COORDINATES |
      GeometryArray.COLOR_3);
      final float len = grid*10;
      float newLen = -len;
      for (int c = 0; c < size; c += 4) {
      landGeom.setCoordinate(c + 0, new Point3f(-len, 0.0f, newLen));
      landGeom.setCoordinate(c + 1, new Point3f(len, 0.0f, newLen));
      landGeom.setCoordinate(c + 2, new Point3f(newLen, 0.0f, -len));
      landGeom.setCoordinate(c + 3, new Point3f(newLen, 0.0f, len));
      newLen += 1f;
      }

      for (int i = 0; i < size; i++)
      landGeom.setColor(i, cf);

      return new Shape3D(landGeom);
      }

      1. FoggyGrid.java
        12 kB
        fravalle
      2. FoggyGrid.java
        8 kB
        fravalle
      3. hs_err_pid780.log
        10 kB
        fravalle
      1. tex.png
        201 kB

        Activity

        Hide
        aces added a comment -

        Check if this issue also happens on latest AMD/ATi drivers.
        If possible attach a minimal running example, so we can test it on NVidia /
        Intel vcards.

        Show
        aces added a comment - Check if this issue also happens on latest AMD/ATi drivers. If possible attach a minimal running example, so we can test it on NVidia / Intel vcards.
        Hide
        fravalle added a comment -

        Created an attachment (id=375)
        Test case for foggy, use ogl or d3d as input param for selecting the renderer driver

        Show
        fravalle added a comment - Created an attachment (id=375) Test case for foggy, use ogl or d3d as input param for selecting the renderer driver
        Hide
        fravalle added a comment -

        Created an attachment (id=376)
        New Test case for foggy with texturized plane, use ogl or d3d as input param for selecting the renderer driver

        Show
        fravalle added a comment - Created an attachment (id=376) New Test case for foggy with texturized plane, use ogl or d3d as input param for selecting the renderer driver
        Hide
        fravalle added a comment -

        Created an attachment (id=377)
        Texture for testcase

        Show
        fravalle added a comment - Created an attachment (id=377) Texture for testcase
        Hide
        fravalle added a comment -

        Created an attachment (id=378)
        Using OGL I get also this error when exiting, but only using JFrame

        Show
        fravalle added a comment - Created an attachment (id=378) Using OGL I get also this error when exiting, but only using JFrame
        Hide
        fravalle added a comment -

        Hi, I noticed the problem also using Windows XP and the unfamous G400

        Show
        fravalle added a comment - Hi, I noticed the problem also using Windows XP and the unfamous G400
        Hide
        aces added a comment -

        Example works fine on NVidia, but fails on AMD/ATI vcards. Possibly it is a
        video card driver issue.
        I'll fill up a issue at AMD drivers support and wait.
        If possible, use D3D renderer for those vcards.

        For that crash with JFrame and OpenGL renderer, try to disable Swing DirectX
        acceleration, by setting -Dsun.java2d.noddraw=true as VM option, or
        System.setProperty("sun.java2d.noddraw","true") before you create Swing objects.

        Show
        aces added a comment - Example works fine on NVidia, but fails on AMD/ATI vcards. Possibly it is a video card driver issue. I'll fill up a issue at AMD drivers support and wait. If possible, use D3D renderer for those vcards. For that crash with JFrame and OpenGL renderer, try to disable Swing DirectX acceleration, by setting -Dsun.java2d.noddraw=true as VM option, or System.setProperty("sun.java2d.noddraw","true") before you create Swing objects.

          People

          • Assignee:
            java3d-issues
            Reporter:
            fravalle
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: