Forums > Jitter

3D shape capping

December 3, 2012 | 5:52 pm

I was wondering if someone could offer some advice on how to render the intersection between a 3D-polygon (possibly concave) and a plane. That is to say, I want to draw the area of the plane that is inside the polygon in a different color from the area outside.

Help much appreciated!

-S


December 4, 2012 | 7:28 pm

hey sam.
probably easiest way to do this is with textures.

you can capture the shape to a texture, and use that with something like jit.gl.pix, to determine which color to paint the plane.

– Pasted Max Patch, click to expand. –

December 4, 2012 | 7:37 pm

if you want to go the geometry route, distance functions might allow you to perform boolean operations.
check out my reply here: http://cycling74.com/forums/topic.php?id=31304


December 5, 2012 | 5:31 am

Hey Rob,

So unfortunately while what you sent me is pretty cool, it’s not quite what I’m looking for. I was really hoping for something more like a cross section than simply projecting the object down onto a surface.

This thread seems to describe pretty well what I want to do, along with what looks like a solution. http://www.opengl.org/discussion_boards/showthread.php/169569-cap-clipped-complex-geometry

The only downside is that it involves a lot of openGL wizardry that I don’t really know how to approach in Max.

Any thoughts?


December 6, 2012 | 9:55 pm

ah, yes. significantly more complicated.
i will have to defer to andrew b or wes for this one.
sorry sam!


May 24, 2013 | 8:11 pm

Hi Sam,

Did you (or anyone else) get anywhere with this? Very curious to hear what you learned.


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