Forums > Jitter

OpenGL, difference OsX-Windows on the same machine, layers and distance

October 17, 2012 | 11:35 pm

Hi all,
I used Max 4.5 with Jitter until a few months ago.
In my works (http://www.youtube.com/watch?v=hPjvsQoYr9c&feature=related)
I use many plans jit.gl.gridshape placed very close to each other to simulate 2D animations.
With the chamber at 7.25 of height I calculated a safety distance of 0.0001 between one level and the other.
As in Photoshop at every level I assign a height position that I find by dividing the number of the level to 10000.
For example, the level 1 will have 0.0001 height, the level 271 will have height 0.0271.
This method allows me to not have problems of perspective without using the orthogonal view.

But …

Now I switched to Max 6.0.7 on a MacBookPro with Radeon HD6770M and 10.7.4 and Windows 7 (on the same machine).
On Windows I have no problems,
but on OsX the safety distance is no longer sufficient and is larger than 10 times,
then I can not load my old patches because the levels are hiding each other.

I think it is a bug, at least for me is a big bug.

Also if I change all the patches (very long work), the sum of all the small distances will ensure that the highest levels suffer from the prospect, and plans of the images should be reduced in width and height.
I could turn off the parameter "depth_enable" for all objects but I would have no problems in other parts.

In the patch there are 3 planes,
a large red square with level 101 and position 0.0101,
a green square with level 102 and position 0.0102,
a yellow square with level 102 and position 0.0112.

On Windows, the two squares are moving above the red square, that’s how it should be.
But …
On OsX, the green square disappears under the red even if it is above.
The yellow square is ok because it is higher than the green square (0.01ß2 and not 0.0102).

Does anyone know if you can change the "sensibility" of the world OpenGL?

Thank you very much

– Pasted Max Patch, click to expand. –


Spa
October 18, 2012 | 4:06 am

you’re at the limit of the precision of the z-buffer, and it’s perhaps implemented differently in mac drivers..
if you change the ‘near_clip’ of ‘jit.gl.render’ to 5. and the far_clip to 20., it behave correctly.
in between values it flickers.

by the way, there’s no way to determine which shape will be draw first on the same layer…
so workong with transparent surfaces should imply layering structure.
perhaps it’s time for changing you’re strange 0.0000110001 workaround for a more layer like structure?


October 18, 2012 | 9:40 am

Yes, I work at the limit of precision of the z-buffer but the mac drivers have some problems.
Changing the values of ‘near_clip" and "far_clip" to 5. and 20. it works better, but there’s no reason that with values of 3. and 10. (theoretically more precise) the yellow square is ok and the green square disappear!

By the way, I work with a layer like structure, in the demo patch I used the same layer for two non-overlapping plans only to show the problem.
The use of the "strange 0.0000110001 workaround" is to draw many levels, typically up to 500 in a tiny space, with a precise order without wrong overlays.
If you try to draw two planes with different ‘layer’ but with the same ‘z position’, there’s no way to determine which shape will be draw first, have you tried?


Viewing 3 posts - 1 through 3 (of 3 total)