Old 11th February 2017, 17:54   #1
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
How do I make this preset look right?

So, I've got these floating pics in the background of my comp shader, lookin halfway good behind another pic. Anyways, the image is kinda transparent looking. I would like it opaque much like the pic in the front.

I will probably appreciate your help. Probably.
Attached Thumbnails
Click image for larger version

Name:	knockknock.jpg
Views:	138
Size:	637.4 KB
ID:	53009   Click image for larger version

Name:	rosebackground.jpg
Views:	171
Size:	727.1 KB
ID:	53010   Click image for larger version

Name:	rosebackgroundwithframe.jpg
Views:	109
Size:	659.3 KB
ID:	53011  
Attached Files
File Type: milk !!!!!!!!!butterbeaster needs help!!!!!!!!!.milk (17.3 KB, 114 views)
File Type: zip butterbeaster.zip (1.98 MB, 164 views)

Last edited by butterbeaster; 11th February 2017 at 18:54. Reason: added a zip file with textures
butterbeaster is offline   Reply With Quote
Old 11th February 2017, 18:35   #2
Fumbling_Foo
Senior Member
 
Fumbling_Foo's Avatar
 
Join Date: May 2016
Location: Mississippi, USA
Posts: 285
You'll need to upload the original textures that the preset uses as well, all I'm getting is a black screen with "could not load texture: r.j", "could not load texture: k.j".

Creativity turned into madness. And then back again.
Fumbling_Foo is offline   Reply With Quote
Old 11th February 2017, 18:58   #3
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
It should be in a zip file now
butterbeaster is offline   Reply With Quote
Old 11th February 2017, 21:47   #4
Fumbling_Foo
Senior Member
 
Fumbling_Foo's Avatar
 
Join Date: May 2016
Location: Mississippi, USA
Posts: 285
Ok thanks, didn't know by the err msg that the above screenshots were the textures,sorry bout the confusion .

I tried taking a crack at the problem but unfortunately I'm hitting a dead end as well. I see the problem but I can't figure out how to convert the blend mode of that bit of code you pointed out in the preset to opaque. There's others here on the boards though that probably know though. Very nice preset btw .

Creativity turned into madness. And then back again.
Fumbling_Foo is offline   Reply With Quote
Old 12th February 2017, 10:31   #5
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 883
Simply adding textures obviously makes them appear transparent. To avoid that, use masking, and add background textures only where there foreground is zero or dark:

tex1 := tex2D (sampler_whatever, uv); // foreground
tex2 := tex2D (sampler_whatever, uv*3); //background
ret = tex1 + tex2 * (lum(tex1) < 0.01);

You have already done something like that with use_tex but not consequently. I don't want to get into details as I find the code too messy, doing an addition here, lerp something in later, multiply with some factor, lerp again... it takes me too long to grind through this.

Note - In some cases, max (tex1,tex2) may also produce good results.

To complicate things, you are using "tex2D( sampler_fc_main, uv )" which is the content of the previous frame of the warp shader. You can use this to create endless screen copies to "infinite" depth as in my "open machinery hazard" preset, but in your case this should not be necessary, as you are using an external texture which you can address directly (as you did also). Get rid of tex2D(sampler_fc_main, uv) if you do not exactly know what it does, and re-write your code clean and from scratch.
Nitorami is offline   Reply With Quote
Old 12th February 2017, 20:40   #6
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
Thanks!

Quote:
Originally Posted by Nitorami View Post
Simply adding textures obviously makes them appear transparent. To avoid that, use masking, and add background textures only where there foreground is zero or dark:

tex1 := tex2D (sampler_whatever, uv); // foreground
tex2 := tex2D (sampler_whatever, uv*3); //background
ret = tex1 + tex2 * (lum(tex1) < 0.01);

You have already done something like that with use_tex but not consequently. I don't want to get into details as I find the code too messy, doing an addition here, lerp something in later, multiply with some factor, lerp again... it takes me too long to grind through this.

Note - In some cases, max (tex1,tex2) may also produce good results.

To complicate things, you are using "tex2D( sampler_fc_main, uv )" which is the content of the previous frame of the warp shader. You can use this to create endless screen copies to "infinite" depth as in my "open machinery hazard" preset, but in your case this should not be necessary, as you are using an external texture which you can address directly (as you did also). Get rid of tex2D(sampler_fc_main, uv) if you do not exactly know what it does, and re-write your code clean and from scratch.
I kinda, sorta did some of what you said and it appears the original issue is fixed. Thank you Nitorami! Below is the updated preset if anybody wants to play with it more. It sure would be nice if shadows appeared on the floating pics, and I don't know why the faster moving floating image looks kinda pixelated. Anyways, the help is very much appreciated. Thank you Nitorami!
butterbeaster is offline   Reply With Quote
Old 13th February 2017, 17:18   #7
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 883
Reduce the grainy appearance in the comp shader by multiplying either ver and hor, or dz, or both, by a factor. 0.2 to 0.5 looks ok to me.

dz is used to create the profiled look. Essentially what it does is substracting two slightly displaced pictures (from the warp shader), and using the difference to modulate light source "dots". Actually it uses the red channel only, but does not matter as your roses are mainly red. ver and hor are the vertical / horizontal displacement.

Hint: You might get a nice effect by changing the position of the light source, given by the 1.7 in this line:

uv1 = .3*cos(uv1*2+1.7) -2*dz;
Nitorami is offline   Reply With Quote
Old 13th February 2017, 18:17   #8
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
Quote:
Originally Posted by Nitorami View Post
Reduce the grainy appearance in the comp shader by multiplying either ver and hor, or dz, or both, by a factor. 0.2 to 0.5 looks ok to me.

dz is used to create the profiled look. Essentially what it does is substracting two slightly displaced pictures (from the warp shader), and using the difference to modulate light source "dots". Actually it uses the red channel only, but does not matter as your roses are mainly red. ver and hor are the vertical / horizontal displacement.

Hint: You might get a nice effect by changing the position of the light source, given by the 1.7 in this line:

uv1 = .3*cos(uv1*2+1.7) -2*dz;
Nice! Very Nice! Multiplying that dz really brings out the detail in those rose leaves. I'll have to play around with that uv1, as the light source in the pic I normally use in the warp shader is closer to the top right.

I have a big question. You probably figured it was imminent. You probably noticed that I used shapes to keep the center of the picture frame clear of the moving roses. Happen to know of a way to make that clear without shapes? I spent a lot of time today making samples, in various colors, of the empty space in the picture frame, adding more texture floats with masking, but I can't seem to clear that area.
butterbeaster is offline   Reply With Quote
Old 13th February 2017, 18:57   #9
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 883
Suggest you create a simple mask in the comp shader by something like

float2 uv2 = uv-0.5;
ret *= (abs(uv2.x) > 0.15) || (abs(uv2.y) > 0.3);

The code sets ret to zero within a rectangular region around the screen centre. If the compiler complains that it need to many arithmetic slots, simply switch to shader model 2 (in the milkdrop main menu, upgrade pixel shader).

Anyway, you will find the problem that the mask does not exactly fit your roseframe which is only approximately centered. I leave it to you to find out how to centre the frame... and please don't fiddle with experimental shifts which will go wrong as soon as you change the milkdrop window size. Find a proper solution.
Nitorami is offline   Reply With Quote
Old 13th February 2017, 19:29   #10
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
Quote:
Originally Posted by Nitorami View Post
Suggest you create a simple mask in the comp shader by something like

float2 uv2 = uv-0.5;
ret *= (abs(uv2.x) > 0.15) || (abs(uv2.y) > 0.3);

The code sets ret to zero within a rectangular region around the screen centre. If the compiler complains that it need to many arithmetic slots, simply switch to shader model 2 (in the milkdrop main menu, upgrade pixel shader).

Anyway, you will find the problem that the mask does not exactly fit your roseframe which is only approximately centered. I leave it to you to find out how to centre the frame... and please don't fiddle with experimental shifts which will go wrong as soon as you change the milkdrop window size. Find a proper solution.
I'm speechless. Thank you.

What are these experimental shifts?

Last edited by butterbeaster; 13th February 2017 at 19:40. Reason: another question popped up
butterbeaster is offline   Reply With Quote
Old 14th February 2017, 14:18   #11
Sabine Klare
Forum Queen
 
Sabine Klare's Avatar
 
Join Date: Nov 2010
Location: Berlin, Germany
Posts: 2,492
I will check out the presets and textures this week after I have saved the downloads into 2 new subfolders.

I myself prefer especially the Lonely Landscapes and Peaceful Worlds, without humans, far away from all the problems on Planet Earth, and currently I have in use 4492 textures and 832 desktop wallpapers (in the extended versions, my official versions contain less images).

I will keep my eyes open for this thread...

Sabine Klare Aka Sternenmaschinebine
Music, Art, Lyrics, Videos
AMBIENT... AMBIENT music forever...
Sabine Klare is offline   Reply With Quote
Old 14th February 2017, 15:27   #12
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
I would have put this out yesterday, but the canvas suddenly became overwhelmingly bigger.
Thank you Nitorami!
butterbeaster is offline   Reply With Quote
Old 14th February 2017, 16:44   #13
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 883
Well done. Now all that remains to be done is some cleaning up, e.g. by removing all the unused code in the wave sections the filesize shrinks from 17k to 8k. That may sound ridiculous but with thousands of presets, it does matter.
Nitorami is offline   Reply With Quote
Old 14th February 2017, 18:17   #14
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
Quote:
Originally Posted by Nitorami View Post
Well done. Now all that remains to be done is some cleaning up, e.g. by removing all the unused code in the wave sections the filesize shrinks from 17k to 8k. That may sound ridiculous but with thousands of presets, it does matter.
I've got it down to 7k, but this preset hasn't taken it's final form yet, I've got lots of ideas.
Thank you very much for all of this help. I've spent so much time trying to tackle the above issues on my own. Thank you so much Nitorami!
butterbeaster is offline   Reply With Quote
Old 16th February 2017, 15:17   #15
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
So I'm trying to move away from sprite mode...

Here's an old sprite I used to use. I'm trying to accomplish that with the coghearts in the warp shader, but I don't know how to sample textures in a way so I would get just one on the x and y, sized the right way, and not tiled out, you know, positioned the way the sprite has it.
Attached Thumbnails
Click image for larger version

Name:	cogheart1.png
Views:	90
Size:	145.2 KB
ID:	53022   Click image for larger version

Name:	cogheart2.png
Views:	84
Size:	145.2 KB
ID:	53023   Click image for larger version

Name:	redheart.png
Views:	82
Size:	69.8 KB
ID:	53025  
Attached Files
File Type: txt beating heart sprite.txt (689 Bytes, 111 views)
File Type: milk !!!!!!!!!butterbeaster would also like coghearts on each side of the frame!!!!!!!!!.milk (7.7 KB, 124 views)

Last edited by butterbeaster; 16th February 2017 at 15:33. Reason: should've cleaned the warp shader first
butterbeaster is offline   Reply With Quote
Old 16th February 2017, 19:23   #16
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 883
Not quite thought through, but you should be able to do the rest.

code:

float2 uv_hearts = (uv-frac(time/6))*texsize_cogheart1.zw*texsize.xy/3;
float cogmask = (uv_hearts.x<1) * (uv_hearts.x > 0) * (uv_hearts.y > 0) * (uv_hearts.y < 1);
float3 tex9= q11*tex2D(whatever04, uv_hearts)*cogmask;
float3 tex10= q12*tex2D(whatever05,uv_hearts)*cogmask;

Nitorami is offline   Reply With Quote
Old 17th February 2017, 20:34   #17
hakanh
Member
 
hakanh's Avatar
 
Join Date: Sep 2014
Location: World
Posts: 98
This is a title I need. I would like to thank to the friend who opened this subject.
I will try Martin's ideas. I want to see development stages so I will try Martin's ideas.
hakanh is offline   Reply With Quote
Old 18th February 2017, 14:24   #18
butterbeaster
Junior Member
 
Join Date: Feb 2017
Posts: 12
coghearts are beating, thanks Nitorami

Quote:
Originally Posted by Nitorami View Post
Not quite thought through, but you should be able to do the rest.

code:

float2 uv_hearts = (uv-frac(time/6))*texsize_cogheart1.zw*texsize.xy/3;
float cogmask = (uv_hearts.x<1) * (uv_hearts.x > 0) * (uv_hearts.y > 0) * (uv_hearts.y < 1);
float3 tex9= q11*tex2D(whatever04, uv_hearts)*cogmask;
float3 tex10= q12*tex2D(whatever05,uv_hearts)*cogmask;

Here is my progress or lack thereof, in getting those coghearts to beat. I'm not sure how to set the coghearts higher up, as the center of the tiled hearts set on a line from the top left to the bottom right, and using a tile far from the center causes it to move too far toward the center when it rescales. There is probably a way to move it all from bottom left to top right, but I don't know how to do that yet.
In place of time, I used a q variable. It will take some work to get it beating smoothly. Maybe I'll find something mashing out motion equations.
Thank you Nitorami!
butterbeaster is offline   Reply With Quote
Old 18th February 2017, 14:43   #19
Sabine Klare
Forum Queen
 
Sabine Klare's Avatar
 
Join Date: Nov 2010
Location: Berlin, Germany
Posts: 2,492
Fortunately I am here in the meeting-point yet, and I will carry it home, too.

Somehow I get the feeling, that You have already the next plans with the next presets and maybe also with the next textures. And I myself finally should take a look with good music...

Sabine Klare Aka Sternenmaschinebine
Music, Art, Lyrics, Videos
AMBIENT... AMBIENT music forever...
Sabine Klare is offline   Reply With Quote
Old 18th February 2017, 18:13   #20
xmuzack
Senior Member
 
xmuzack's Avatar
 
Join Date: Sep 2016
Posts: 115
Nice preset, Butterbeaster. Love the wobble effect. Added to my favorites!
xmuzack is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > MilkDrop > MilkDrop Presets

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