jit.gl.mesh artifacts

billyanok's icon

Hello, I was wondering if someone could provide me with a bit of help with my patch?
Using matrixout from a gridshape into a few gen objects then to jit.gl.mesh.
I can't seem to get rid of blending artifacts..
Thx!
B

Preset 1: 1 mesh, blend mode on, depth off, blend_mode 6 7

Preset 2: 2 meshes, 1st mesh @cull_face front, 2nd mesh @cull_face back, blend_mode 6 7

Preset 3: Same as preset 2 except blend_mode 6 3

Patch here-

Max Patch
Copy patch and select New From Clipboard in Max.

billyanok's icon

Anyone?

Rob Ramirez's icon

your use of 2 layers with opposite cull_face settings looks correct to me, so I believe these artifacts are simply the result of your geometry overlapping.

often times with z-fighting type artifacts you can fix them by adding a jit.gl.camera and setting near_plane and far_plane to as close together as possible (e.g. bump near up to 1 and far down to 10). This doesn't seem to affect your render, but i did notice that a near_plane of 1.5 clipped enough of the geometry to make overlap no longer visible. maybe something to explore.

increasing the dim of the geometry may also help minimize the artifacts.

billyanok's icon

Hey Rob,
Thx so much for the reply.
I tried everything in my arsenal to try and solve this and have made no progress. The near and far clip's can make a difference but end up decimating the shape too much.

Any other ideas?

Thx!
B