3D shape capping
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!
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.
----------begin_max5_patcher---------- 1277.3ocyZtsjhpCEF9Z7oHEW61BBfh6a18SwbSWSYEgHldvDlPrsmYp4cem C.BpXG51FsrJnLm3OeYkURVvel33tl8FtzE7ufmANN+YhiiNIUBNU+2wcG5s jbTotXtT7A15WbmZxRfeSnSNmgRWinY0YP2uiPywBck7qRjjpKqr9+i+75Rt gQEkjei0EDNy6XCv1KNsELII9UA1nYW8yD78prKPhjsDZ1JNNQXJQPnmrMks r9174pqP+YdM0Q87onc5Fz8aXdJhhbUY82ISTWl94.yKDwrr7YEj2tHZfW.M QCBMv9Pi7IuJKekRI64X2o.2qBJ+HMgp4kmmcjpcCh4U7oBPxpPxwuh4kDFs 0vniKpnnUxNsphhpuvzMz7oMIQnlj7ZRhiekTW+XShxwpI0YV2qhiiM8i.0s vvHSeL3X2RNtlkvxMs+y.uYKm15he2BlyR9ANssRbYEXJgVvwkXp.IpjTS1o 3Mn84hUWdrra9aPI3dqbOj2wMiSRYTkL5TWUx0OP4na0nZ6titDTTwEpborm rubMhqf75bbKCMosMik2MqlwU4TDDkrCIvBhQtPulFkrqfSnhNOHLEIaiskI bVddmlxjyqWHmT4PeB9.IUrU2Vsgor3jh5AA2FFkRxvkhtoIPYkcSoiyv11j sm62I8q4CnqefxCjeCPsy5RtHO0Wvh1UnGSnd8VdY2BMNA5yQfwOPr9ZX7od AttOSmZ+lUyGu8br.wQ6.nbgdNKvG3I+42KW8tLWmeG3p+hVf023I5Qhr+Wu PL3xPL5tYb5Gz2hT2aHRnC2Xz+twQCFCBd.oHbnTDdOlRG7PiQYG5JVi8rjS 3GhidVMs03ALD9o.0wMvjSn8sdsVCp7uLAKY64I0CyUKH.5JG4dIDDZyF5dt wmG.1obaIooc28jYCGkpsuX1pnUi1CUwKFfh8dHTrukJdwCihgCfw9ODJNxR EGdiXL36SNlx.Ow7NbYIJCe1Ql4XTJP9f2hKmsi8p0maN71DRAqBmPkCspiU sbbimvOEJtPvVGrE+aWDEjmsiqhkgkbJdXQS3lG2EJKECdJAUnhAhbN5SXNp Duxb3AOyOawX7fnXv.hKikwlAVcaQ7chl5HFrEUHQp4lfw2WZK+BFcqP3hky hjjZYkw3CC2JxQT0eRP4XPvLH.NKTtuhmpOTq9Wcqob+mv1ahbRnkvFN5vtN .hwsOh17nu.X2+BGkXg0KW.GgkKBMtAgP8YChtKqVHs+1hno41ubg2sw14cs XpoSzW9hDBVVl8.Xo6vLAzA07J8y45NVTPqyJ1JPrlPZgEX9JSLOa1q0swFP .VCzq5Ya2ewsY3275f.tlm86ym5WQS3X6j9mR3yYfHa8bLVu5JCVVdGewUGH zT1AvSaJQniqG8d1Og2V6GKXDDVYAEcmVfmiooXtZil6jl65sUFYs61QGW9U 29B2GIRH36I1hfnQXo3p97xOzq2TMdup4MNMOtQYp9otBaxYxyXKGB9xgk+h wXiKF9TQqkAeFZEdNspe+Msokto6FSOC7NMFHUH773K0IvQ8D3C+NQH47ndb dDONavzZ8L2F8DNd5wyB8DLZxYQ6fl0GcFU038vnlXKXSvnplGo4U91pG+wQ OQVnG3ikk73YJehCt6tdVZgblOZpwlkHVLZpwFC4Qb8JnMVNdeP8X1twIeHZ JobxGf1Ie7Ym9gmIas+N4+8I3nzO -----------end_max5_patcher-----------
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
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.
ah, yes. significantly more complicated.
i will have to defer to andrew b or wes for this one.
Did you (or anyone else) get anywhere with this? Very curious to hear what you learned.