madster's Forum Posts

  • thirded

  • Okay.

    Turns out the horizontal and vertical blurs are in fact 13-tap gaussian kernels and gaussian is separable, so it's much better to do in two-pass where you end up with 13^2 taps.

    So, I present thee Vertical and Horizontal blur plus. All I did was normalize the size then multiply the kernel by a size.

    http://www.udec.cl/~jfuente_alba/Blur%20Horizontal%20Plus.fx

    http://www.udec.cl/~jfuente_alba/Blur%20Vertical%20Plus.fx

    Also, I made a 13-tap Poisson disc blur kernel. You can see how it looks less smooth. Apply twice and it looks just like gaussian (but distributed as Poisson, natch). Weights are the same as Gaussian right now, I need to do some research and get the right coefficients for a Poisson distribution.

    Meanwhile, the unfinished Poisson disc:

    http://www.udec.cl/~jfuente_alba/Blur%20Disc.fx

  • I checked the horizontal and vertical blur and they're 12-tap. I thought they were 3-tap :O

    so anyways, that means I should go with a 12-tap poisson disc filter.

  • I'd go for it only if we manage to define clear roles and responsabilities, a short and clear design doc and a timeline with milestones.

  • Photoshopped.

    I can tell from the pixels and from having seen quite a few shops in my time.

    Actually that's pretty funny. I guess morals do change a lot in a hundred years.

  • correction: opacity should be percent instead of float.

  • Hello!

    Made an effect. This here is the first draft, will be *vastly* improved soon.

    Things I'm looking into:

    choosing number of samples.

    Proper placement of samples.

    Time-based randomization of samples.

    Size of effect (don't understand it yet).

    Things that are working:

    -blur amount

    Blur.fx:

    // Variable Blur
    // Jorge Fuente-Alba
    // PS 2.0
    
    //#CROSS-SAMPLING : reads pixels it may be writing.
    //#BORDER-MODE : samples pixels outside bounding box
    //#PARAM float blur 2.5 : Blur : amount of blur.
    
    // Foreground texture
    texture ForegroundTexture;
    
    // Foreground sampler
    sampler2D foreground = sampler_state {
        Texture = (ForegroundTexture);
        MinFilter = Linear;
        MagFilter = Linear;
        MipFilter = Linear;
    };
    
    // Parameter variables
    float pixelWidth;
    float pixelHeight;
    float blur;
    
    // Effect function
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
        // Add the front and back pixels
        float4 here = tex2D(foreground, Tex.xy)*0.25;
        float4 left = tex2D(foreground, float2(Tex.x - (pixelWidth*blur), Tex.y))*0.1875;
        float4 right = tex2D(foreground, float2(Tex.x + (pixelWidth*blur), Tex.y))*0.1875;
        float4 top = tex2D(foreground, float2(Tex.x, Tex.y - (pixelHeight*blur)))*0.1875;
        float4 bottom = tex2D(foreground, float2(Tex.x, Tex.y + (pixelHeight*blur)))*0.1875;
    
        return here + left + right + top + bottom;
        //float4 src = tex2D(foreground, Tex.xy);
        
        //return result * (1-src.a) + src;
    
    }
    
    // ConstructEffect
    technique ConstructEffect
    {
        pass p0
        {
            VertexShader = null;
            PixelShader = compile ps_2_0 EffectProcess();
        }
    }
    [/code:dlvy8o5v]
    
    Example .cap using it: [url]http://www.udec.cl/~jfuente_alba/blur_example.cap[/url]
  • That's the first psx version of the game, not concept video.

    It has bits of video that never made it into the final game, with yorda lying down... my guess is those are from the concept video. Of course they could also be scrapped FMV for the PSX game.

    Doesn't really matter. If this Trico video is real (and it seems to be, judging by your comparison) there's gonna be a bunch of giddy people upon release, me included.

  • Awesome!

    At first it bugged me that blur is actually the opacity of the shadow and thought it could be a mistake.

    Then I looked at the code and realized it's within my capacities, so I fixed it. I kept opacity, so now it's a drop shadow effect with opacity AND 5-tap variable-size blur:

    // Dropshadow blurred
    // David Clark (edited by Louis Ferina, Jorge Fuente-Alba)
    // PS 2.0
    
    //#CROSS-SAMPLING : reads pixels it may be writing.
    //#BORDER-MODE : samples pixels outside bounding box
    //#PARAM float offsetX 5.0 : X Offset: X offset of dropshadow.
    //#PARAM float offsetY 5.0 : Y Offset: Y offset of dropshadow.
    //#PARAM float blur 2.5 : Blur : Blur amount of dropshadow.
    //#PARAM float opacity 0.5 : Opacity : Opacity of dropshadow.
    
    // Foreground texture
    texture ForegroundTexture;
    
    // Foreground sampler
    sampler2D foreground = sampler_state {
        Texture = (ForegroundTexture);
        MinFilter = Point;
        MagFilter = Point;
        MipFilter = Point;
    };
    
    // Parameter variables
    float offsetX;
    float offsetY;
    float pixelWidth;
    float pixelHeight;
    float blur;
    float opacity;
    
    // Effect function
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
        // Add the front and back pixels
        float2 Tex2 = Tex;
        Tex2.x -= offsetX * pixelWidth;
        Tex2.y -= offsetY * pixelHeight;
        float4 here = tex2D(foreground, Tex2.xy)*0.25;
        float4 left = tex2D(foreground, float2(Tex2.x - (pixelWidth*blur), Tex2.y))*0.1875;
        float4 right = tex2D(foreground, float2(Tex2.x + (pixelWidth*blur), Tex2.y))*0.1875;
        float4 top = tex2D(foreground, float2(Tex2.x, Tex2.y - (pixelHeight*blur)))*0.1875;
        float4 bottom = tex2D(foreground, float2(Tex2.x, Tex2.y + (pixelHeight*blur)))*0.1875;
    
        float4 result = (here + left + right + top + bottom )* opacity;
        float4 src = tex2D(foreground, Tex.xy);
        
        result.rgb = 0;
        
        return result * (1-src.a) + src;
    
    }
    
    // ConstructEffect
    technique ConstructEffect
    {
        pass p0
        {
            VertexShader = null;
            PixelShader = compile ps_2_0 EffectProcess();
        }
    }
    [/code:wt3j76il]
    
    This wouldn't have been possible without the original shader OR the edit. Props to David and Louis.
    Also, the opacities were somewhat arbitrarily chosen, they're not mathematically correct (but they look good enough for me). Positions too are axis-aligned, which is bad. I'll update all of that once I read up on blur kernels.
    Also: 5 tap only so don't go over 10 on blur size or you'll see banding. At size 2 it looks beYaootiful!
    
    Now, this knowledge enables me to do that variable kernel-size blur I've been wanting. Coming soon!
    Oh, example cap for dropshadow blurred:
    [url]http://www.udec.cl/~jfuente_alba/dropshadow_blurred.cap[/url]
  • I'm not sure if all cards can do that.

    It's a standard feature on current generation 3D hardware. I believe you can check for support on runtime. They do run a bit slower though, but in cases like this it's probably worth it.

    At least, I know it's avaiable on OpenGL as an extension, which in DX would be a caps bit.

  • Concept video for ICO:

    Concept video for Shadow of the Colossus:

    I'd say its pretty feasible. However one thing bugs me: Shadow of the Colossus was called Nico.

    Ich, Ni, San

    Ico, Nico... Trico?

  • I think it should be fairly easy using arrays and their storage/retrieval actions.

    So no one has considered alternatives to conversation in games? wow

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • A dialog-heavy game doesn't mean it has to be a lot of reading.

    Just look at Mass Effect's conversation system. Pretty sleek.

    Also, The Sims talk a lot among themselves, that's a nice system too. Only it makes almost no sense.

    I played this game once that had you queuing up things to say and the other guy would react. It was a game about politics, forgot the name. It was kind of random if you won or not, and what was said didn't make much sense, kinda like The Sims.

    What I'd like to see (or make) is a system that allows for conversational ninja skillz. Like... quick redirections and tricks. You know, when you talk to someone and afterwards you're like "WTF was that".

    Problem is when you talk about conversation system, everyone assumes you mean dialog trees (because of the Lucasarts legacy) and no one really wants to go back there. What I mean is a new gameplay idea that works as dialog.

  • I started using boxes as dummies, but then found out they are very limited. They don't even rotate their collision boxes. Which could be a bug. Which I will report.

    Yes.

    Sprites are more useful, but you wind up wasting VRAM on them. A dummy object would be awesome if it had everything sprite has and you could draw an icon on it... and it would be a Sprite, essentially.

    So... just group them in a family and hide them on startup. Use a tiny pow2 texture (32x32 for example).

  • I'm not certain how the effect works, but it looks a bit like the red, green and blue channels have been separately offset in different directions, as if the R, G and B electron beams in a TV were misaligned.

    :O you mean we could use Separate on a layer and then over that set a 1x4 scanline pattern inside a tiled background set to multiply and over that a tiled background with noise, scaled and randomly offset and get the same effect?

    Genius! I didn't think of that!