Basically, projection mapping is the same thing as texture mapping. I have a texture, which as two dimensions, that have to be applied to a solid, which as three dimensions, or anyway exists in a 3 dimensions space.
Every polygon of the solid has spatial coords and has also texture coords: these define which parts of a texture will fill \ cover \ be applied to that polygon.
While objects - or any of its component: point, line, polygon - have XYZ coordinates, a 2d texture, when it comes to mapping, has UV coords.
Now, if I recall correctly, as a puppy dog has just entered this house with all its pee and poop gifts - still no barf, though -, opengl and directx assign these coords differently. DX assigns to the top left corner of the texture the UV(0,0) coords and to the bottom right the UV(1,1), where U is the horizontal axis, and V the vertical one. See example 0 in attached patch.
vvvv’s Grid (EX9.Geometry) has fixed texture coords: this means that if you squeeze it in one dimension, the applied texture will squeeze accordingly.
In example 0 switch from native to transformed, and notice that South-America is not affected by geometry changes - except Venezuela and Colombia, poor guys.
Try to look at real life objects as a grid of regular polygons - don’t do this at parties: they’ll think you’re a weirdo; trust me, it will happen, though it depends on the kind of party, I guess. Oh well. -: the more the polygons go away from you, the smaller they get. The same thing happens in a renderer, which is, in fact, a 2d space.
So, since the Z axis is the depth one, how renderer manages depth, in this case? Making the polygons smaller the more they are far. What should you do to correct this? You should inverse the shrinking - assuming the projector is perpendicular to the projection surface. See example 1 and 2 in AP.
Since the punchstuff is circular, I’d use CircularSpread. Factor=0.5, I guess. Or GetSlice.
I see you are using dx11, which is not my case, so I don’t know which and how parameters and nodes should be used with this engine. For sure theory doesn’t change.
Anyway I think that from AP you should be able to understand how to do this with dx9, so you could then transform it to dx11.
There are also a few mapping tools and tutorial in contributions, one very well made by elliotwoods.
I hope this is of some help.
for_drehwurm.zip (8.7 kB)