Old 9th December 2017, 19:21   #1
chrisjj
Junior Member
 
Join Date: May 2008
Posts: 6
Mystery noise in uv

Is there a Milkdrop 2 preset author who could try the attached test preset for me and post a screenshot of the result?

It's a blank preset with this one-line warp shader:

ret = (uv.y*5000)%2 < 1;

in a window 416 pixels high (as shown by the monitor at top right).

Here, the output id this:



(or a variant, depending on window height) continually changing, not a static pattern of unbroken horizontal lines as expected.
chrisjj is offline   Reply With Quote
Old 9th December 2017, 19:24   #2
chrisjj
Junior Member
 
Join Date: May 2008
Posts: 6
Oops - attachment lost.

Reattaching here.
Attached Files
File Type: milk CJ test lines.milk (4.8 KB, 69 views)
chrisjj is offline   Reply With Quote
Old 17th December 2017, 14:11   #3
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 821
It depends a lot on the actual screensize, as you are getting moiré patterns.
To avoid this, don't use "5000" but the actual screen height in pixels like this:

float k= 15;
ret = (uv.y*texsize.y*k)%2 < 1;

You can adjust the appearance by setting the value of k. It makes rather a difference whether it is a multiple of 2 or not.

Note - the pattern is actually moving because of the line "warp = 0.01000" in the milk file. Unless you explicitly overwrite these distortion parameters (e.g. rot, warp, zoop, sx,sy,dx,dy) in your code (in the per frame or per vertex section), milkdrop takes the values from the .milk file. So you'll see a distortion effect but no corresponding code, which can be a bit confusing.
Nitorami is offline   Reply With Quote
Old 17th December 2017, 14:26   #4
chrisjj
Junior Member
 
Join Date: May 2008
Posts: 6
[QUOTE=Nitorami;3146604]It depends a lot on the actual screensize[quote]

I know. Hence my "(or a variant, depending on window height)".

[QUOTE=Nitorami;3146604]It makes rather a difference whether it is a multiple of 2 or not./QUOTE]

Sure does

And I'm guessing that's not the only thing that makes a difference. E.g. GPU model.

I'd be interested in seeing your screenshot for comparison.
chrisjj is offline   Reply With Quote
Old 17th December 2017, 15:17   #5
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 821
chrisjj

I have checked with nvidia and an AMD iGPU, there is no difference. I would be surprised if there was any, with such simple code. With the mods as suggested, you'll get a definitive behaviour which does not depend on screen size neither on GPU.

With your orginal code, the appearance is very sensitive on screen size. Sometimes I get a picture similar as yours, sometimes the fine lines as you seem to expect. There is not much point in making a screenshot, it would be rather random, and I do not know how to set a height of exactly 416 pixels.
Nitorami is offline   Reply With Quote
Old 17th December 2017, 18:19   #6
chrisjj
Junior Member
 
Join Date: May 2008
Posts: 6
Quote:
Originally Posted by Nitorami View Post
With the mods as suggested, you'll get a definitive behaviour which does not depend on screen size neither on GPU.
The mods as selected just reduce the sensitivity of the test.

Quote:
Originally Posted by Nitorami View Post
With your orginal code, the appearance is very sensitive on screen size.
Same here. Which is why I specified screen size.

Quote:
Originally Posted by Nitorami View Post
There is not much point in making a screenshot, it would be rather random
Not if you set the screen height, I suspect.

Quote:
Originally Posted by Nitorami View Post
I do not know how to set a height of exactly 416 pixels.
1) Press N to engage the monitor in top left
2) Resize the window until the monitor says 416.0000
chrisjj is offline   Reply With Quote
Old 17th December 2017, 19:18   #7
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 821
416 lines
Attached Thumbnails
Click image for larger version

Name:	Zwischenablage02.jpg
Views:	82
Size:	60.5 KB
ID:	53660  
Nitorami is offline   Reply With Quote
Old 5th October 2018, 21:15   #8
chrisjj
Junior Member
 
Join Date: May 2008
Posts: 6
Belatedly, thanks.
chrisjj is offline   Reply With Quote
Old 6th October 2018, 17:27   #9
arminal
Junior Member
 
Join Date: Jul 2018
Posts: 4
Quote:
Originally Posted by chrisjj View Post
Is there a Milkdrop 2 preset author who could try the attached test preset for me and post a screenshot of the result?

It's a blank preset with this one-line warp shader:

ret = (uv.y*5000)%2 < 1;

in a window 416 pixels high (as shown by the monitor at top right).

Here, the output id this:



(or a variant, depending on window height) continually changing, not a static pattern of unbroken horizontal lines as expected.
I also have a problem with the correct configuration of this.
arminal is offline   Reply With Quote
Old 7th October 2018, 08:30   #10
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 821
What "problem" with which "configuration" ?
If you want a pattern of horizontal lines in 1 pixel distance:

shader_body
{
ret = (uv_orig.y*texsize.y)%2 < 1;
}
Nitorami is offline   Reply With Quote
Old 7th October 2018, 08:55   #11
NJK
Frisian Spamfighting Mod
 
NJK's Avatar
 
Join Date: Sep 2003
Location: a real Frisian hometown
Posts: 14,738
you most likely replied to a bot, serveral posts with nothing to say except , i also have this and nice post.

Each Thursday a new show on Celtica Radio with Darkwave music.
NJK is offline   Reply With Quote
Old 11th October 2018, 17:53   #12
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 821
Agreed. I just wonder what they try to achieve without a link or some sort of other bait. Seems pointless to me
Nitorami is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Visualizations > MilkDrop

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump