Werner Almesberger | 1 Nov 2011 12:24
Favicon
Gravatar

bug ? texturing artefacts in corners when rotating

I noticed that, for high values of "rot", I get fairly large
"titles" in the corners where the texture doesn't match the rest:

http://downloads.qi-hardware.com/people/werner/m1/midi/corner-artefact.jpg

When modulating "zoom", I can put them to good use, but they look
a little odd when running with fixed zoom/rot and a "crowded"
screen. Bug or feature ?

- Werner
Sébastien Bourdeauducq | 1 Nov 2011 12:27

Re: bug ? texturing artefacts in corners when rotating

    !!!     "It's not a BUG,
   /o o\  /  it's a FEATURE!"
  (  >  )
   \ - /
   _] [_     (jcooley 1991)

When distorting the current picture, when texture (i.e. source) 
coordinates go off-screen, two things can happen:
1) the coordinates wrap around (i.e. the texture repeats)
2) the coordinates are clamped

Right now, you are seeing behaviour #1. You can go to #2 with this line:
bTexWrap=0
(it also works in per-frame equations, if you want to play with it)

You can also add a border in combination with bTexWrap=0, to make those 
area black. Try this:
ob_a=1
ob_size=0.01
(There are also ob_[r|g|b] to change the color, defaults are 0)

S.

On 11/01/2011 12:24 PM, Werner Almesberger wrote:
> I noticed that, for high values of "rot", I get fairly large
> "titles" in the corners where the texture doesn't match the rest:
>
> http://downloads.qi-hardware.com/people/werner/m1/midi/corner-artefact.jpg
>
> When modulating "zoom", I can put them to good use, but they look
(Continue reading)

Werner Almesberger | 1 Nov 2011 15:06
Favicon
Gravatar

Re: bug ? texturing artefacts in corners when rotating

S?bastien Bourdeauducq wrote:
> Right now, you are seeing behaviour #1. You can go to #2 with this line:
> bTexWrap=0
> (it also works in per-frame equations, if you want to play with it)

Cool, thanks ! Of course I want to play with it ;-) Here's a short
video:

http://downloads.qi-hardware.com/people/werner/m1/demo/MVI_1765.MOV

It's rotated. To unrotate, play with mplayer -vf rotate=2

Audio: "Love Tractor Part 1" from "Doghouse Riley" (the full song
uses samples from Lessig, but the extract in the video is just an
instrumental part). CC-BY.

http://ccmixter.org/files/Doghouse/18888
http://ccmixter.org/content/Doghouse/Doghouse_-_Love_Tractor_Part_1.mp3

I assigned bTexWrap to a button on the nK2. So the default would be
clamping and it would only wrap (as it did in the videos before)
when I press the button.

The effect is most visible when inverting the zoom, so that the
screen content is pulled towards the center:

00:03 smooth traces from the border (with clamping)
00:06 oops, missed the border, let's try this again ...
00:10 distortion producing "kaleidoscope" patterns (without clamping)
00:13 and once more
(Continue reading)


Gmane