View Full Version : Where is 3d Stereo?
29th April 2009, 16:56
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?
30th April 2009, 08:33
use redi-jedi's latest beta :D
1st May 2009, 15:42
what versions that? i have 2.1d from xmas, thats it isnt it?
nope, i mean the 1.05beta6 --> http://milkdrop.us/dev.aspx
1st May 2009, 20:03
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?
1st May 2009, 22:03
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,
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.
2nd May 2009, 17:07
hey flexi, thanks :)
can i do it with the comp shader and sample uv twice, once green once red and overlay them?
3rd May 2009, 08:57
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.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.