How make a "clip()" in 3d ?

clip() function are not affected by matrix transformations like translate, rotate… Have you any idea for do this ?

Thanks before !

Clip has some utility with respect to the display only, right? Because you want to keep some areas clean for buttons etc… What excatly do you expect from a 3d clip?

@Jmv38 : This is an exemple :

with camera eye position change :

I don’t want to see the public part who exceed the “screen”

Unfortunately your images dont show up on the forum…

@Jmv38 lol, this is not your fault, excuse me for bad links. That works now ?

Ok, now i can see your pictures.
In your above example you are Not really using 3d capability, you are more trying to do a 2d scale of your dashboard, am i correct? Then you can scale the clip coordinates too.
The problem with clip is that it is a flat rectangle, so if you do real 3d, with rotations etc, your objects will be distorded in non-rectangular way => a simple rectangular clip will not work. Now if you use only 2D scale and move, you can scale and move your clip rectangle ‘by hand’ too. Is this what you are looking for?

@Jmv38 for me that work, but i’ve add links.

Maybe because you are the owner of dropbox account? When i click on the link, i get:

Error (403)
It seems you don't belong here! You should probably sign in. Check out our Help Center and forums for help, or head back to home.

sorry for this side discussion - it doesnt help you at all...

@Jmv38 In this example, this is just a sort of 2d scale, you’ve right, but i think about “real” 3d with rotations. And yes, a simple rectangular is not sufficient : this is the problem.

another better example :

In this case i will suggest the following: instead of doing clip() in 3d, just create an image CLIP of the size you want, sprite your images into it with setcontext(CLIP) so that the parts not to be seen are outside it (by construction it will clip this part) then sprite your CLIP image with all the 3d transforms you want. The result will be exactly what you want, i think.

I’ve already think about that, but i don’t remember if this solution was sufficiently fast.

I use @jmv38 solution for things like scrolling menus and clipping ellipses and stuff, it shouldn’t be too slow if your only using a section of the screen