Grease pencil behind 3d object works in camera view. In render strokes are in front of the object

Hello, I think the title of my post describes my problem. I´m on Eevee and version 3.2. Same on earlier versions.
Thank You in advance for any tip


Disable clipping in object buttons for the problem objects.

Do You mean the N- panel? There clip start is 0,0 and clip end 10000 meters. Interestingly even in rendered mode viewport the display is correct. Your proposal had no effect :smiling_face_with_tear:

No, that’s a different clipping setting. I’ll see if I can find the one I meant…It’s been awhile since I used grease pencil, but I had the same issue. You can also reorder the material layers, which might work.

Now I found a workaround which maybe is not the correct solution for my problem but it works. I put my 3d- object in a second scene anr render this transparent. In the compositor I use alpha over node.

I looked into this…try enabling the Z pass in render settings.

Yess!..In Layer properties / Passes / Z
Thank You