Hi everybody!
trying to work with some circular shapes just wondering does somebody knows any kind of polar coordinates plugin or method to achieve that in resolume? thanks for your time!
kind regards,
B.
Polar Coordinates plugin
Re: Polar Coordinates plugin
It just so happens we have a polar coordinates plugin lined up for the 5.0.2 release.
Drop us a mail@resolume.com if you want early access.
Drop us a mail@resolume.com if you want early access.
Re: Polar Coordinates plugin
Thanks for your quick reply Joris!Joris wrote:It just so happens we have a polar coordinates plugin lined up for the 5.0.2 release.
Drop us a mail at resolume.com if you want early access.
can't wait to check it our or make some beta-testing if possible

- gpvillamil
- Posts: 550
- Joined: Mon Apr 04, 2005 03:33
- Location: San Francisco, California
Re: Polar Coordinates plugin
What came of this? Was it released as the PolarKaleido effect?
It would be great if there was a version that treated the "overflow" as black, so you get a circular image.
It would be great if there was a version that treated the "overflow" as black, so you get a circular image.
Re: Polar Coordinates plugin
This indeed is the PolarKaleido effect. We're sticking with the fullscreen version for now, but if you feel like rolling your own, here's the relevant shader:
Code: Select all
uniform sampler2D texture;
uniform vec2 resolution;
uniform float rings;
uniform float kaleidos;
uniform float aspect;
uniform float angle;
void main()
{
vec2 coords = gl_FragCoord.xy / resolution - vec2(0.5);
//adjust for aspect ratio
coords.y /= aspect;
//cartesion to polar with rings and kaleido vars
float r = length (coords) * (rings + 1.0);
float theta = atan( coords.y, coords.x ) * kaleidos;
//adjust center point of angle
//get fracts so we get useable values
float pi = 3.141592654;
theta = ( theta + ( angle + 0.25 ) * 2.0 * pi * kaleidos ) / ( 2.0 * pi );
vec2 endCoords = fract ( vec2( theta, r ));
gl_FragColor = gl_Color * texture2D( texture, endCoords );
}
Re: Polar Coordinates plugin
Hmmm. When reading the code back like this, I suppose it's kind of silly to pass in both the resolution and the aspect ratio as separate uniforms.