14 Replies Latest reply on Jan 16, 2008 8:57 AM by GlennoUK

    ATI video cards drawing errors

    cratica Level 1
      I created a game in Director 10 that uses 3D. The game features characters and 3d worlds. Everything looks great using Nvidia cards but some ATI cards do not draw certain things correctly. For instance, the womans lips do not appear and some of the clothing does not draw properly, perhaps a z-sorting error. Again, these problems do not exist on Nvidia cards.

      Latest ATI drivers and DirectX9c are installed.

      What is the cause of this and how can it be corrected?

      Thank you!
        • 1. Re: ATI video cards drawing errors
          AlinaX Level 1
          quote:

          Originally posted by: cratica
          the womans lips do not appear and some of the clothing does not draw properly, perhaps a z-sorting error.
          Again, these problems do not exist on Nvidia cards.


          Always use OpenGL as default 3d renderer.
          Also be sure your display is set to the highest color depth (32bit).

          • 2. Re: ATI video cards drawing errors
            cratica Level 1
            Sorry, that's not an option. OpenGL is not a reasonable choice for a commercial product as this, DirectX is. Also, 32bit doesn't have any effect on this problem. It's a GPU z-sorting error that only occurs on ATI cards.

            Thanks though!
            • 3. ATI video cards drawing errors
              Martin Schaefer Level 1
              Your main problem is the 16bit Z-Buffer Limit of ATI cards and your world size in units.
              Try to change your worlds unit size to less than 3500 and you'll see the difference.
              nVidia provides support for up zu 24bit Z-Buffer in Shockwave3D, which is
              enough precision for up to 1.000.000 units.

              That's the reason for the difference you're experiencing.

              Cheers,
              Martin
              • 4. Re: ATI video cards drawing errors
                AlinaX Level 1
                quote:

                Originally posted by: cratica
                Sorry, that's not an option. OpenGL is not a reasonable choice for a commercial product as this, DirectX is. Also, 32bit doesn't have any effect on this problem. It's a GPU z-sorting error that only occurs on ATI cards.


                In fact OpenGL is the best choice for a commercial product (fully supported on any machine, including macs)
                But i think the Z-buffer fightings is your fault.
                You're using alpha channel materials (TGA,PNG) inside of a muti-sub material.
                Translation: you have models with mutiple shaders and one (or more) shader is using alpha-channel texture (transparency).
                And this is a big mistake in shockwave 3D.
                You have to detach all the (semi)transparent parts and to center the pivot for each one.


                • 5. Re: ATI video cards drawing errors
                  Martin Schaefer Level 1
                  In fact OpenGL is not the best choice for commercial products, if Mac support is not necessary. Shockwave3D supports full hardware Antialias with DirectX.
                  OpenGL is not fully supported in Shockwave3D.
                  AntiAliasing is one of the main visual aspects when it comes to quality.
                  Mac is not very important platform for professional Games production.

                  Cheers,
                  Martin
                  • 6. Re: ATI video cards drawing errors
                    AlinaX Level 1
                    quote:

                    Originally posted by: Macromartin
                    Shockwave3D supports full hardware Antialias with DirectX.
                    OpenGL is not fully supported in Shockwave3D.


                    All the game developers i know don't use hardware anti-aliasing in Shockwave 3d because of very poor resulted performances.
                    OpenGL is fully supported in Shockwave 3D.
                    You'll get a better image quality in OpenGL especially when you have more than 1 lighting source inside of the 3d world.
                    Also all the (semi)transparent objects are rendered properly in OpenGL.
                    DirectX in Shockwave 3D is buggy!
                    If you don't believe all of these, check out by yourself.

                    • 7. Re: ATI video cards drawing errors
                      Martin Schaefer Level 1
                      OpenGL is not fully supported.
                      There's no hardware AntiAliasing at all in OpenGL & Shockwave3D.
                      Anyway, do whatever you want, I'll stick with the way I'm working.
                      Should be ok for both of us.
                      • 8. Re: ATI video cards drawing errors
                        tedalde2 Level 2
                        The easiest way to fix the ATI z-depth bug is to bump up your camera's hither value. This may create a visible clipping plane when you get close to models. How much you need to bump it up depends on your scene dimensions -- just tweak hither for the best trade-off.
                        • 9. Re: ATI video cards drawing errors
                          duckets Level 1
                          I would add to this - OpenGL is definitely not the best choice when viewing on windows. For a start, in shockwave3d, it only supports one texture layer per rendering pass, wheras in DirectX up to 8 are supported.

                          The problem is most definitely as tedalde2 suggested, there is a bug in shockwave which causes it to recognise some ATI cards as having only a 16 bit depth buffer (when really they have larger, eg 24 or 32 bit). Increasing your 'hither' value further from your camera should fix it, and if you're interested, here's why:

                          The bit depth of the z-buffer determines the 'resolution' of the depth sorting. When the 3d image is drawn, the 3d card examines each part of a polygon that falls within a visible pixel on the screen. The distance of that point from the camera determines the value for that pixel within the depth buffer range. As the polygons are processed, the pixels that are already drawn in the depth buffer are checked, and new pixels are only drawn if the new pixel has a 'nearer' depth buffer value than any others that have so far been processed. The 3d card does this for every pixel that might be visible within every polygon, each frame.

                          Having only 16 bits for the depth buffer means there is a much more limited depth resolution between your hither and yon available for sorting (only 65536 'steps', compared with over 16 million steps in a 24-bit buffer). In addition, these steps are not linearly distributed, so you have much better depth sorting near your 'hither', and much less precise depth sorting near your 'yon'.

                          By reducing the distance between your 'hither' and 'yon', you reduce the distance over which these depth 'steps' are distributed, therefore increasing the resolution within that area. If your hither is very very close to the camera, it means you are wasting a large amount of the most precise depth sorting resolution over a very small space where it may not be required. Eg, if your hither is 0.1 unit away from your camera, but your camera never actually gets closer than, say, 10 units to any object, there is a huge amount of your depth sorting resolution precision wasted within that first 9.9 units (because the resolution is much more densely packed near the 'hither'). Moving the hither value out as far as is tolerable means that the depth resolution is maximised over the distance where it is most needed.

                          - Ben
                          • 10. Re: ATI video cards drawing errors
                            AlinaX Level 1
                            quote:

                            Originally posted by: duckets
                            in shockwave3d, it only supports one texture layer per rendering pass, wheras in DirectX up to 8 are supported.


                            ???
                            Up to 8 texture layers per rendering pass in OpenGL as well.
                            Don't mess up things: one rendering pass per lighting source.
                            But this true in both OpenGL or DirectX renderers.
                            Anyway, Macromartin is right: "do whatever you want. Should be ok for both of us. "
                            • 11. Re: ATI video cards drawing errors
                              duckets Level 1
                              Ah yes you're right. it's the DirectX 5 option that has the 1 texture layer limit, not OpenGL.
                              • 12. Re: ATI video cards drawing errors
                                cratica Level 1
                                I just wanted to thank you all for the great explanations and a quickie solution to the ATI issue. I tried it and it worked, sort of. It does in fact now render properly on the ATI machines. However, on *some* (2 of 10) machines, the entire 3d window is black. Since the two machines are customers machines, I cannot test using them. I have two systems that are very similar to their two systems (same cpu and same video cards/ one of them is same motherboard). We are all using DirectX 9c and same OS. (Win XP Pro)

                                Anyone know why after changing the hither/yon, 2 computers 3d windows are now black screens, whereas nearly identical systems (same cpu/motherboard/gpu/OS/DIrectX version/GPU drivers) are fine?

                                Thanks!!
                                • 13. Re: ATI video cards drawing errors
                                  tedalde2 Level 2
                                  I find it difficult to imagine how camera hither/yon could totally blank 3D rendering (other than setting them so that everthing is clipped)... but I guess I've seen stranger things. Did you explicitly test versions with hither/yon and without to see if that's really the problem? Perhaps you could dummy-up a special control to have users adjust camera hither/yon to further check it... maybe all scene objects are getting clipped. But all other things equal, if that doesn't work, it smacks of a driver problem. See if they can upgrade the ATI drivers and see if that fixes it. Also check _movie.getRendererServices(), _movie.getRendererServices().getHardwareInfo() and _system.environmentPropList on those computers to see if anything sticks out as a problem.
                                  • 14. ATI video cards drawing errors
                                    GlennoUK
                                    Hi.. Im having the same problem.. on ATI cards. Ive done a bit of a search for mroe answers, but this thread is the best answers ive found on the problem. But it only hints at the solution.

                                    What would be some suggested values for these variables youve all mentioned. Hither, Yon and my 3D environments World Units.

                                    I have a normal (real world) sized room, where in
                                    3D Max, World Units, is 1 = 1.3 cms(half an inch).
                                    Hither = 1
                                    Yon = 3.14etc

                                    As, I have tried numerous settings to reduce the distance between Hither and Yon, yet trying to get the range between these 2 values to encompass the majority of the detail in my scene. But it doesnt seem to improve things much. I can certainly make things worse however, so i know im on to something promising :)

                                    Would the next step be to change the scale in the 3D max file? Say, to set world units to be something like 1 wu = 100 inches? And just deal with the fact that i now probably have people 17000 inches tall or soemthing like that?

                                    MacroMartin says "Try to change your worlds unit size to less than 3500 and you'll see the difference.
                                    nVidia provides support for up zu 24bit Z-Buffer in Shockwave3D, which is
                                    enough precision for up to 1.000.000 units."

                                    But what does that exactly mean? Should i try to pick a world unit that has all the important detail of my scene, fit within a rough 3500ish world unit distance? So if the real world length of my room is 30 metres.. set my world unit to 1wu = 1cm? to get roughly 3000 wu distance to the far wall, which is the max i will be able to see anyway, so dont waste z-buffer limit on anything beyond that, as its not viewable anyway(cause its behind the far wall). Then refiddle with the hither and yon settings to encompass the minimum distance anything gets to the camera as my Hither, probably about 10, and the number 3000 as my Yon, as thats the max distance to the wall anyway.

                                    Then if its still not fixed.. im screwed?
                                    Thanks,
                                    Glen