djDecks

It is currently Sun Oct 22, 2017 9:04 am
View unanswered posts
View active topics

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Transitions (note:be aware everything still can change) PostPosted: Thu Jun 04, 2009 2:57 pm 
Elite
User avatar

Joined: Mon Jan 21, 2008 5:52 am
Posts: 371
as some of you may have noticed... latest VideoAlpha contains a folder called extra, which contains a few pixelshaders already...
I suggest you back these up before you start playing with them.. you can do amazing transition already though
the file you need to edit is the transition.ps this is the actual transition being used, if you were to change the content of this file to

Code:
sampler2D input : register(s0);
const float strength = 0.0f;


float4 transition_a(float2 uv : TEXCOORD) : COLOR
{
   float fromCenter = length(uv - float2(0.5,0.5))/0.707106781;
   float radius = saturate(strength- fromCenter);
   float4 c1 = tex2D(input, uv.xy);
   c1.a= saturate(sqrt(radius)*2.5);
   return (c1);
}

float4 transition_b(float2 uv : TEXCOORD) : COLOR
{
   float fromCenter = 1-(length(uv - float2(0.5,0.5))/0.707106781);
   float radius = saturate(strength- fromCenter);
   float4 c1 = tex2D(input, uv.xy);
   c1.a= saturate(sqrt(radius)*2.5);
   return (c1);
}


you'd get the transition I just made :p

I invite you to share your try-outs :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Fri Jun 05, 2009 6:26 pm 
Elite
User avatar

Joined: Mon Jan 21, 2008 5:52 am
Posts: 371
Ok, I guess I forgot to explain the current transition.ps system...

I'll try to explain with the transition.ps that comes with the videoalpha:

first:
Code:
sampler2D input : register(s0);
const float strength = 0.0f;

This part tells you what variables are given from the software to the HLSL (Higl Level Shader Language) pixel shader (in our case for shader model 2.0)
so the variable 'input' contains the video where 'strength' is the videocrossfader state
note:there are multiple passes for the transitions one for each player

this part declares a 'certain' subroutine :p
Code:
float4 SampleWithBorder(float4 border, sampler2D tex, float2 uv)
{
   if (any(saturate(uv) - uv)) {
      return border;
   } else {
      return tex2D(tex, uv);
   }
}

next part is for player 1 & 3 currently (normally there will be a transition_c for 3 and _d for 4)
Code:
float4 transition_a(float2 uv : TEXCOORD) : COLOR
{
    float4 Color;
    float offset = 1 + sin(uv.x*20) / 3;
    uv.y = uv.y - offset * (1-strength);
    Color = SampleWithBorder(float4(0,0,0,0), input, float2(uv.x, uv.y));
    if (uv.y < 0)
        uv.y = 0;
    if (uv.y < 0.1)
        Color.a = strength * (10*uv.y);
    else
        Color.a = strength;
    return Color;
}

for player 2 & 4 (btw.. strength passed to 2&4 will be the equivalent of (1-strength) that just got passed to 1&3
Code:
float4 transition_b(float2 uv : TEXCOORD) : COLOR
{
    float4 Color;
    float offset = 1- (1+sin(uv.x*20) / 3);
    uv.y = (uv.y - offset * (1-strength));
    Color = SampleWithBorder(float4(0,0,0,0), input, float2(uv.x, uv.y));
    if (uv.y < 0)
        uv.y = 0;
    if (uv.y < 0.1)
        Color.a = strength * (10*uv.y);
    else
        Color.a = strength;
    return Color;
}


some useful HLSL links:
http://www.neatware.com/lbstudio/web/hlsl.html
http://www.dpfiles.com/dpfileswiki/inde ... .0_Example
http://channel9.msdn.com/shows/Continuum/WPFFXDemo/


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Wed Jun 10, 2009 3:31 am 
Elite
User avatar

Joined: Mon Jan 21, 2008 5:52 am
Posts: 371
looks like with the new alpha it's no longer folder 'extras' but it's called 'support' now
to use one of the transitions in that folder you have to rename it to 'transition.ps' (you'll have to rename current 'transition.ps' to something else first though)

btw, I've improved the new default transition a little, and it's sufficient to post this code in transition.ps instead of the code currently there.
here is the new code:
Code:
sampler2D input : register(s0);
const float strength = 0.0f;


float4 transition_a(float2 uv : TEXCOORD) : COLOR
{
   float fromCenter = length(uv - float2(0.5,0.5))/0.707106781;
   float radius = saturate(strength- fromCenter);
   float4 c1 = tex2D(input, uv.xy);
   c1.a= saturate(sqrt(radius)*2.5);
   return (c1);
}

float4 transition_b(float2 uv : TEXCOORD) : COLOR
{
   float fromCenter = 1-(length(uv - float2(0.5,0.5))/0.707106781);
   float radius = saturate(strength- fromCenter);
   float4 c1 = tex2D(input, uv.xy);
   c1.a= saturate(sqrt(radius)*2.5);
   return (c1);
}


this will make the transition smoother on the start and end of the crossfader.


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Tue Jul 20, 2010 2:55 am 
Elite
User avatar

Joined: Wed May 24, 2006 5:09 pm
Posts: 487
Location: MA, USA
Hey MrBlubke,
It's been over a year now, anything new for effects/trasitions? I have just started working on some (not much luck so far :? :( ).
(It would be a lot easier if Freeframe effects worked. Then could also use the FireText plugin :))

_________________
BAllen Skins - DIY Tips
Win 7 w/NVidea - HP HDX - Dell Latitude


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Sun Dec 12, 2010 11:17 pm 
Elite
User avatar

Joined: Wed May 24, 2006 5:09 pm
Posts: 487
Location: MA, USA
Bump

Can't wait till DX (and mac) have all the functions of regular djDecks so we can get back to video stuff.
(ex. visualizers, camera input, scrolling titles, ect.)

Thanks,
B.

_________________
BAllen Skins - DIY Tips
Win 7 w/NVidea - HP HDX - Dell Latitude


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Wed Dec 15, 2010 7:41 pm 
djDecks
User avatar

Joined: Wed Oct 23, 2002 1:46 pm
Posts: 6181
Location: Belgium
The latest build now has a slide show feature too, just right-click your image folder and select 'set slideshow folder'


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Wed Dec 15, 2010 10:32 pm 
Elite
User avatar

Joined: Wed May 24, 2006 5:09 pm
Posts: 487
Location: MA, USA
Slide show will be great for weddings and anniversaries. 8)
As a enhancement maybe have a soft frame or heart shaped effect work with it?

_________________
BAllen Skins - DIY Tips
Win 7 w/NVidea - HP HDX - Dell Latitude


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Sun Sep 25, 2011 6:39 pm 
Elite
User avatar

Joined: Wed May 24, 2006 5:09 pm
Posts: 487
Location: MA, USA
BAllen wrote:
Hey MrBlubke,
It's been over a year now, anything new for effects/transitions?)



Hey MrBlubke,

It's been a very long time, anything new for transitions?

(Considering it's been over 2 years, I guess I'm not the only one that has had no luck. :? :evil: )

_________________
BAllen Skins - DIY Tips
Win 7 w/NVidea - HP HDX - Dell Latitude


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Fri Oct 07, 2011 10:21 pm 
Regular
User avatar

Joined: Mon May 08, 2006 5:51 pm
Posts: 338
I think sending a PM is a better idea. :P

_________________
Musician/DJ: Soundcloud
Designer: Serato Scratch Live Skin for djDecks :: *Download* *Topic* *Facebook*


Top
 Profile  
Reply with quote  
 Post subject: Re: Transitions (note:be aware everything still can change) PostPosted: Sat Oct 08, 2011 5:00 am 
Elite
User avatar

Joined: Mon Jan 21, 2008 5:52 am
Posts: 371
SaturnusDJ wrote:
I think sending a PM is a better idea. :P

not really... there currently isn't any news about any changes... maybe soon™


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group