Previous topicNext topic

polygon creation with wireframe

Suggestions for new features for Magic.
Post Reply
Kvasnik
Posts: 67
Joined: Thu Feb 05, 2015 1:09 am

polygon creation with wireframe

Post by Kvasnik »

Hi, I'm doubtful this would be easy to do, but maybe I'm wrong...

The ability to create a polygon using a mouse to point and click, creating a box on each corner (wireframe), so you could drag each corner into position and make a complicated shape, e.g. a star or an abstract polygon.

Why? Because this would make precise video mapping possible in magic. Looking at standard video mapping programs, creating the wireframe seems the main function necessary for mapping complex objects, e.g. buildings. Having a wireframe polygon would be a cheap way to open magic up to more complex mapping.

Alternatively I think the only way to do mapping on complicated shapes currently would be to sprout magic to another program.

Regards!
M
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: polygon creation with wireframe

Post by Magic »

I can't find the post right now, but there was a discussion about being able to do things by using the mouse in the Magic window. But, this is very difficult in the context of a modular interface. Since everything in Magic is created/controlled by modules, and there could be many different layers of modules, how do you associate a particular module with the mouse actions? There's no easy answer. I'm not saying it's impossible, just very complicated.
Kvasnik
Posts: 67
Joined: Thu Feb 05, 2015 1:09 am

Re: polygon creation with wireframe

Post by Kvasnik »

Yes, I thought that it would be complicated, specifically relating to the mouse pointer. I'm still thinking if there's some workaround.

What about a polygon module where you could create vertices, each with an x / y parameter, and the ability to 'add' vertices, so you could create as many sides as you want, and then move them into place using the x/y? So it would look something like this:
vertice#1: x 0 y 0
vertice#2: x 1 y 0
vertice#3: x 1 y 1
[add vertex]
...
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: polygon creation with wireframe

Post by Terry Payman »

Neat! The selected polygon module and the active coordinate box within it would then be uniquely associated with the mouse actions.

It would be totally consistent with the present UI to use up/down movements of the mouse to position a vertex on one axis at a time, so you would position a particular vertex X by selecting the X coordinate box for that vertex and dragging the mouse up/down to move the vertex right/left. Positioning the vertex Y would be by selecting the Y coordinate box for that vertex and dragging the mouse up/down to move the vertex up/down.

For quick adjustments it would be more intuitive if X and Y mouse dragging could be used simultaneously to position a vertex in both dimensions, which is perhaps what you had in mind. I think this would add extra complexity, as for consistency and precision it would still be necessary to be able to fine-trim a vertex position on one axis at a time, as one can with the Translate module.

Offhand, I can't think of any interface elements in Magic that have simultaneous two-dimensional control, so it could be much more work to implement - and therefore much less likely (at least in the first version of your desired module).

Would you be happy if you had to adjust X and Y independently for each vertex?
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: polygon creation with wireframe

Post by Terry Payman »

I think Solid and Line Width options would be neat additions, giving the additional possibility of an arbitrary un-filled outline.
damstraversaz
Posts: 176
Joined: Tue Aug 26, 2014 11:22 am

Re: polygon creation with wireframe

Post by damstraversaz »

that's very interesting, it could be a useful feature
Kvasnik
Posts: 67
Joined: Thu Feb 05, 2015 1:09 am

Re: polygon creation with wireframe

Post by Kvasnik »

Hi Terry,

I think the simpler implementation you described would be completely adequate, where you adjust the x and y coordinates seperately - I actually can't see a need to edit them both together. In fact the more I think about it, having a wireframe controlled by a mouse, as I originally thought, is unnecessary - it would be quicker, but not much at all. Being able to change the parameter by the mouse, and watching it move in the magic window, would be enough for great precision.

Also, if you were mapping a building, certain parts repeat (e.g. the windows), so if you created a polygon shape for a single window, you could then just copy the module, and add an extra translate module to move it into place. Especially with the magic capabilities of nesting scenes, creating a complex mapping would be very do-able.

And I agree, solid / line width would be a great feature, which I'd expect would be easy to add on. I could imagine layering vectors with duplicates with outlines to create complex mappings. You could also achieve the same effects that all the commercial mapping programs do - they always run the same clique bank FX, such as making the outlines 'pulse', or making the vectors wobble. The complex 3D transformations they usually do on building mappings, which would require a skeleton frame, they actually don't look that good. All you need to do great building mapping is layers of masks, which magic already does.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: polygon creation with wireframe

Post by Sadler »

With regards to mouse control - perhaps temporary binding to the mouse or OSC would be convenient?
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: polygon creation with wireframe

Post by Sadler »

Eric wrote:I can't find the post right now, but there was a discussion about being able to do things by using the mouse in the Magic window.
Perhaps from 2016: https://magicmusicvisuals.com/forums/vi ... ndow#p4303
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: polygon creation with wireframe

Post by Magic »

Yes, that's it, thanks. Good searching.

Here is another post that may be helpful: https://magicmusicvisuals.com/forums/vi ... 4642#p4642 . It demonstrates how you can use the Model module to generate polygons with a list of vertices in a text file.
yumatripp
Posts: 21
Joined: Fri Aug 14, 2020 9:45 pm

Re: polygon creation with wireframe

Post by yumatripp »

Sadler,

What is that “Perspective_Warp” module)
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: polygon creation with wireframe

Post by Sadler »

Hey, the perspective warp is adapted from Inigo Quilez: https://www.shadertoy.com/view/lsBSDm
Post Reply