jit.gl.gridshape compound of two shapes

André Rangel's icon

Hello all,

Any orientation on hot to do a compound shape resulting of a plane and a circle? Something like Shape Modes on Illustrator Pathfinder.

Thanks in advance,

André

Francisco Xavier Casillas Navarro's icon

I think what you need is jit.xfade, you can create two jit.gl.gridshape whit matrixoutput 1 and then send them to jit.xfade and back to jit.gl.render and there you go.

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

heres an example

André Rangel's icon

Hi Francisco :)

Thank you for your answer. In fact I did not try your approach, instead I tried two jit.gl.gridshape with matrix output 1 and send them to a jit.op... I tried different operators but i did not manage what I pretend. Let me be more clear:

I want to cut of a square inside or inscribed in a circle... something like https://www.gmatpill.com/images/PS/circle_inscribed_square.png being white the erase_color... so we can look through the square hole.

If you have any idea on how to do that I appreciate!

Cheers,

André

Andro's icon

I think this needs to be done with textures/color.
Send both shapes to a jit.gl.node @erase color 0.5 0.5 0.5 1.
Then gridshape @shape plane @color 1. 1. 1. 1. @ layer 0
Gridshape @ shape circle @ color 0. 0. 0. 1. @ layer 1
Apply all movement and rotation instructions to both gridshapes.

André Rangel's icon

Thank you Andro!

But it does not work ...

Andro's icon

Missed the part with it being see through.
I wouldn't try to make the basic shape in max.
Download blender.
Create a circle and a cube, use the boolean modifier to cut out the square shape from the circle.
Export as dae model
import with jit.gl.model.

André Rangel's icon

Thanks Andro, but I want to be able to change the size of the square inside de circle ;) Circle fixed size and square variable size.

I will keep linkage for a solution :)

Andro's icon

Well thats not so hard if you get a little creative.
The square shape can be defined as a few vertex points.
By using jit.gl.model @matrixoutput 1 to a jit.gl.mesh
Then only altering the vertex points of the square form (x,y vertexes only)
then you can change the square form.
Start experimenting !

André Rangel's icon

Hi Andro,

I managed something with blend_modes... We can see the background color through the square inside the circle but if a place a videoplane behind the circle and the square I can't see the videoplane any longer :-/

OvoDeColombo.maxpat
Max Patch