_1024_PolygonMask

franz's picture

Good for architectural mapping projects : draws an arbitrary convex polygon mask. Download from 1024 Blog

gtoledo3's picture
Re: _1024_PolygonMask

Hey thanks... out of curiosity, is this what we were talking about awhile back?

franz's picture
Re: _1024_PolygonMask

errrr, can't remember what we were talking about.... sorry. Can you remind me ?

gtoledo3's picture
Re: _1024_PolygonMask

Pinning the corner on buildings....but looking, I see that this probably isn't what you meant.

franz's picture
Re: _1024_PolygonMask

o i c. No, this is not what i meant. This is just to draw arbitrary convex masks on the fly using openGL, thus avoiding to make bitmaps. There's no texturing involved in that plugin, and the blending mode is always set to OVER, like a proper mask. I'm currently fighting at making concave polygons using the stencil buffer... ;(

We have an ultra-fast cornerpin plugin internally since a long time (that is perspective-correct, as opposed to all the QCtechniques you can find around), but I didn't make it public, b/c I have to keep some cards under my sleeve. It is actually being used in every mapping projects we do at 1024, from Boombox to the Tennis Mapping. I'll probably make it public when I'll finish some more advanced mapping plugins.

franz's picture
Re: _1024_PolygonMask

updated to handle convex and concave polygons

blackburst's picture
Re: _1024_PolygonMask

Fantastic, very generous of you Franz, thankyou. Could you please take a minute to clarify exactly what is meant by "perspective correct", I've seen it bandied about with ur plugs a lot and I'm not sure I totally understand the difference, after all, isn't all cornerpinning sort of altering the perspective?

marcofilipevieira's picture
Re: _1024_PolygonMask

Hello, I have a problem. I've downloaded the plugin from your blog. And I've placed the _1024_PolygonMask 1.1 onto the QC Plugins folder. But when I try to open the sample that cames in the zipped folder. I find myself with this message error

(null) : Patch with name "QCPlugInPatch:_1024_PolygonMaskPlugIn" is missing

Macro Patch Cannot create node of class "QCPlugInPatch" and identifier "_1024_PolygonMaskPlugIn"

Macro Patch Cannot create connection from ["outputQueue" @ "Queue_1"] to ["inputStructure" @ "PlugInPatch__1024_PolygonMaskPlugIn_1"]

(null) State restoration failed on

What am I missing? Can anybody help me please?

marcofilipevieira's picture
Re: _1024_PolygonMask

Forget my message. I've already solve it. It was really dummy. ahahah eu just erased the plugin from the plugin folder and pasted there again. And then it was working. :) Maybe I had a different version. I don't know. Great plugin, thanks. I wonder if it is possible to download the source code of it. So I can really understand how you do this, and try some stuff por myself. And then I can also publish here.

Thanks

cybero's picture
Re: _1024_PolygonMask

I can't reproduce this problem, I downloaded the plugin patch, installed it to the Plug-Ins folder, opened up the example composition and the plugin patch works as would be expected.

Is the plugin actually in the right location or have you inadvertently dropped it outside of the folder?

I know I've managed to do that with one plugin or patch from time to time.

I wonder also if this is a message provoked by a 32 bit / 64 bit environment mismatch - just hazarding a guess here though.

cybero's picture
Re: _1024_PolygonMask

Self help - the best help for oneself :-)

franz's picture
Re: _1024_PolygonMask

perspective correct means that the actual perspective is calculated, it's not the vertices that are moved.

hence perspective correct != quad warping

check http://en.wikipedia.org/wiki/Texture_mapping (while not related to my plugins, it will give an explanation)

marcofilipevieira's picture
Re: _1024_PolygonMask

This patch is really useful. :)

I wonder if it is possible to download the source code. Because I need something like this, but I want to save maks and load them after.

Cheers,

benoitlahoz's picture
Re: _1024_PolygonMask

Hi Franz,

I see that you were fighting with the stencil buffer in 2010, and updated your plugin in 2012 to handle concave polygons :-) Can I ask how you managed to do it ? Thanks a lot if you can give me a tip on this.

franz's picture
Re: _1024_PolygonMask

As far as I remember I use a triangulation algo that can handle concave polygons. I think it was poly2tri or something similar. Anyway, it was lightweight.

benoitlahoz's picture
Re: _1024_PolygonMask

Thanks ! I already implemented poly2tri, but I thought there was a GPU side way to do it.