Old 29th April 2009, 16:56   #1
ShadowHarlequin
Senior Member
 
ShadowHarlequin's Avatar
 
Join Date: Sep 2004
Posts: 171
Where is 3d Stereo?

Had a look with the 2.1d beta and its not there, and its also not in the latest version of winamp

Which MD version has the 3d stereo options?

"human is the music, natural is the static..." - john updike
[Set Zero] [themilkFACTORY]
ShadowHarlequin is offline   Reply With Quote
Old 30th April 2009, 08:33   #2
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
use redi-jedi's latest beta
Flexi is offline   Reply With Quote
Old 1st May 2009, 15:42   #3
ShadowHarlequin
Senior Member
 
ShadowHarlequin's Avatar
 
Join Date: Sep 2004
Posts: 171
what versions that? i have 2.1d from xmas, thats it isnt it?

"human is the music, natural is the static..." - john updike
[Set Zero] [themilkFACTORY]
ShadowHarlequin is offline   Reply With Quote
Old 1st May 2009, 17:32   #4
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
nope, i mean the 1.05beta6 --> http://milkdrop.us/dev.aspx
(before pixelshader)
Flexi is offline   Reply With Quote
Old 1st May 2009, 20:03   #5
ShadowHarlequin
Senior Member
 
ShadowHarlequin's Avatar
 
Join Date: Sep 2004
Posts: 171
download link wont work

so i take it that wont work with PS p.X presets? is there a shader method to do the same thing?

"human is the music, natural is the static..." - john updike
[Set Zero] [themilkFACTORY]
ShadowHarlequin is offline   Reply With Quote
Old 1st May 2009, 22:03   #6
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 852
ShadowHarlequin

It's trivial to generate a 3D impression, all you need to do is to separate two color channels, say red and green. This can be done in the wave or frame equations and does not require any shader support.

For any object you want to show: draw it twice, one in red and one in green, horizontally displaced (NOT vertically !!!) The displacement between red and green determines the depth. It's as simple as that. For distant objects, the displacement is zero. Displacement increases the closer the object is meant to be perceived. A displacement of 1cm or so should not be exceeded otherwise the image may fall apart - which is painful.

Obviously you don't need any particular milkdrop version to do that.

The 3D feature in MD1 was meant to work with common presets, none of which however bothered to draw a separate red and green channel... Therefore (I guess) MD1 used the zoom effect, based on the idea that most presets use zoom to simulate a movement towards the screen: MD1 manipulated the zoom, and moved the red channel red slightly to the right hand, and green to the left hand side. Imagine dx positive for red and negative for green. This would slowly draw red and green apart as the picture moves (is zoomed) towards you.

Concluding: To create 3D or "anaglyph" presets in MD2, you have two choices:

1. Use only white for the wave/shape equations. Emulate the stereo function of MD1 by code in the warp shader, separating red and greeen by something like

uv = uv - .5;
float2 dis = float2 (.0004,0);
float myzoom = .99;
ret = float3 (
GetPixel(uv*myzoom +.5+ dis).r,
GetPixel(uv*myzoom +.5- dis).g,
0)*.9;

or

2. Duplicate your wave or shape functions, use red for one copy, greeen for the other (NO color mix, no blue !!!) and displace the copies horizontally by a constant proportional to the inverse of the depth (z). For instance, dis =1/infinity = 0 for the background, dis = 1cm for the objects meant to "stick out" of the screen... not sure if I could make this clear. I can provide an example preset, but I need glasses first to make sure it works.
This method does not depend on the zoom and should deliver much better results.

Either way, you'll need red-green glasses and you will perceive the preset, although stereo, in grayscale. Colors are not feasible.
And, obviously, any tricky functions in the comp shader, which change the colors or mix red and green channel, will destroy the effect.
Nitorami is offline   Reply With Quote
Old 2nd May 2009, 17:07   #8
ShadowHarlequin
Senior Member
 
ShadowHarlequin's Avatar
 
Join Date: Sep 2004
Posts: 171
hey flexi, thanks
can i do it with the comp shader and sample uv twice, once green once red and overlay them?

"human is the music, natural is the static..." - john updike
[Set Zero] [themilkFACTORY]
ShadowHarlequin is offline   Reply With Quote
Old 3rd May 2009, 08:57   #9
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 852
in principle yes but then you need to need to generate the depth in the comp shader and it will be linked to the screen (uv) rather than the picture content

Say you draw a dice by wave equations, then you can readily draw it in 3D because you know the coordinates x,y,z of all corners.

The comp shader does not know this so what will you do? A uniform rg-separation will just move the whole screen towards you. Make the separation dependant on uv - this might give interesting effects, you might for instance get a globe shape when you make the separation proportional to rad. However the picture content - i.e. the cube - will just appear to be painted on that globe, and not look itself spatial.
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