Welcome, Guest
Username Password: Remember me

TOPIC: Aliasing in Exported Video (3D DVE?)

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158652

  • schrauber
  • OFFLINE
  • Platinum Boarder
  • Posts: 1650
  • 4 months, 1 week ago
If I test zoom and rotation effects in Lightworks, then I use an image that I import with the normal Importtool. The image itself does not have vertical lines, but it is created when the effect rotated the image.

(My GPU has problems with the negativevem zoom.)

If you also want to test the import filtering of Lightworks, then we should of course import a test video with moving objects.
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
Mainly automatically translated
--------------------------------------------
Windows 10, 64 Bit
Intel i5-4440 (3,1 GHz) ; Intel HD Graphics 4600
Last Edit: 4 months, 1 week ago by schrauber.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158714

  • schrauber
  • OFFLINE
  • Platinum Boarder
  • Posts: 1650
  • 4 months, 1 week ago
schrauber wrote:
Here's the new effect... If you need only rotation and zoom, then you only need this effect...

Here the same test version, but with optimized angle adjustment possibility:
This attachment is hidden for guests. Please log in or register to see it.
Mainly automatically translated
--------------------------------------------
Windows 10, 64 Bit
Intel i5-4440 (3,1 GHz) ; Intel HD Graphics 4600

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158759

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 8573
  • 4 months, 1 week ago
That's a nice, simple and elegant effect, schrauber. I'm jealous.

I have a couple of suggestions about the parameters section to make them more consistent with common usage. Would it be possible to change "Pos. rotation" to "Rotation centre" and change "Zoom target" to "Zoom centre"? I think that would be more in line with Lightworks wording, too.

I also have a somewhat more complicated suggestion about the rotation settings. What you have works, but the following might be better from a user's point of view, at the slight cost of an additional multiplication.

float Angle
<
   string Group = "Rotation";
   string Description = "Revolutions";
   float MinVal = -10.0;
   float MaxVal = 10.0;
> = 0.0;

float AngleFine
<
   string Group = "Rotation";
   string Description = "Angle";
   float MinVal = -180.0;
   float MaxVal = 180.0;
> = 0.0;

   ...

#define ANGLE radians((Angle * 360) + AngleFine)

As I said, the effect works as you have it, and I think that it should be put in the library in any case. But do you think those suggestions have merit? My suggestion gives a 44% increase in total revolutions. If that doesn't appeal, making Angle run from -7.0 to 7.0 would result in an effective range of -2520.0 to 2520.0, not far off your original values.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158761

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 8573
  • 4 months, 1 week ago
One other thing: have you given any thought to preserving the alpha channel? Doesn't a border addressing mode kill that? I must check when I get the chance.

I can see a real need for doing that because I suspect that its sheer simplicity will motivate users to use this effect and a blend rather than a 3D DVE.

As I said above, I like it. I'm jealous.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158765

  • schrauber
  • OFFLINE
  • Platinum Boarder
  • Posts: 1650
  • 4 months, 1 week ago
Thanks for the tips, I will test.
Later I would also like to test whether I can use the optimized zoom code, which I used in other test effects.

On my system, the black border is transparent (the "Blend" effect can add a background). I hope this is so on all systems... ?

First I'm curious if @errolthomas with the effect has fewer aliasing problems.... ?
Mainly automatically translated
--------------------------------------------
Windows 10, 64 Bit
Intel i5-4440 (3,1 GHz) ; Intel HD Graphics 4600
Last Edit: 4 months, 1 week ago by schrauber.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158766

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 8573
  • 4 months, 1 week ago
schrauber wrote:
On my system, the black border is transparent (the "Blend" effect can add a background). I hope this is so on all systems... ?

I'm not in a position to check at the moment, but I will later today. I thought that I encountered a problem with Linux when developing my triple DVE effect using border addressing. I could be wrong.
Last Edit: 4 months, 1 week ago by jwrl.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158774

  • errolthomas
  • Pro User
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • 4 months, 1 week ago
Really appreciate all the updates here! Going to have some time to dig into another pass tomorrow (day job keeping me busy).

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158814

  • errolthomas
  • Pro User
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • 4 months, 1 week ago
Good results with the new SpinZoom effect so far. I'm using it to perform the necessary rotation and then a slight zoom to hide the slanted edges. Then applying a simple DVE effect to crop the whole image in to my desired 4:3 aspect ratio. I've been able to discard the 3D DVE altogether. Run a few exports so far (even some relatively high compression ones) and no longer seeing the aliasing Will keep testing a little while longer...

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158815

  • schrauber
  • OFFLINE
  • Platinum Boarder
  • Posts: 1650
  • 4 months, 1 week ago
Ok, thanks for the feedback.
Are in the exported Sequence also included segments with the 3D DVE effects to have a direct comparison possibility?

errolthomas wrote:
... Then applying a simple DVE effect to crop the whole image in to my desired 4:3 aspect ratio ...
Hmm ...
Is there in the Pro version the export format 1080p 4: 3, or is the image in a different background used, or side black bars?
Project settings? (Output format, conversion)
Mainly automatically translated
--------------------------------------------
Windows 10, 64 Bit
Intel i5-4440 (3,1 GHz) ; Intel HD Graphics 4600
Last Edit: 4 months, 1 week ago by schrauber.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158819

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 8573
  • 4 months, 1 week ago
schrauber wrote:
Is there in the Pro version the export format 1080p 4: 3

While I was checking the alpha channel support I also checked that. The answer is no, or at least, not that I could find.

You're also quite correct about border addressing mode, and on all platforms. However the behaviour of mirror addressing differs between Windows and Linux. On Windows the alpha channel is mirrored along with the image. It isn't in Linux - the alpha channel is set to zero in exactly the same way as with the border setting. I think that you can safely assume that it would be the same on the Mac.

I can't think of a simple technique for fixing that problem without doing a second pass just to process the alpha channel.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158820

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 8573
  • 4 months, 1 week ago
Having thought some more about it, I have a comparatively simple technique for addressing the problem. I've included my suggestions in the code block below.

texture AlphaChannel : RenderColorTarget;       // New texture declaration
   ...

sampler AlphaSampler = sampler_state            // New sampler declaration
{
   Texture = <AlphaChannel>;
   AddressU = Mirror;
   AddressV = Mirror;
   MinFilter = Linear;
   MagFilter = Linear;
   MipFilter = Linear;
};

   ...

float4 ps_alpha (float2 uv : TEXCOORD1) : COLOR       // New shader to set up the alpha channel
{
   return float (tex2D (FgSampler, uv).a).xxxx;
}

   ...

   // Replace original return code with this version

   return float4 (tex2D (FgSampler, xy4).rgb, tex2D (AlphaSampler, xy4).x); 
} 

   ...

   // New pass to set up alpha channel for use in ps_main()

   pass one
   <
      string Script = "RenderColorTarget0 = AlphaChannel;";
   > 
   {
      PixelShader = compile PROFILE ps_alpha ();
   }

That seems to work with anything that I've thrown at it.

[EDIT] Just checked in Linux - no it doesn't!!! More work needed.

[EDIT 2] And the reason that it doesn't work in Linux is that mirror addressing doesn't seem to work at all in my altered version. Since I have just done a massive amount of work checking cross platform compatibility, this surprises me.

[EDIT 3] An d it turns out that I was wrong about mirror addressing. There was an ambiguity with the way that Linux assigns multiple shaders to the same input. Full details of the diagnostic work and fixes implemented can be found here for those interested.
Last Edit: 4 months ago by jwrl.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158822

  • schrauber
  • OFFLINE
  • Platinum Boarder
  • Posts: 1650
  • 4 months, 1 week ago
Thanks for investigation.
I wonder if transparency is still necessary with mirroring enabled?

Idea:
Rename the button description:
"Flip edge and remove all transparency"
and set the alpha channel to 1.0. (for the entire texture, but only if mirroring is enabled).
Mainly automatically translated
--------------------------------------------
Windows 10, 64 Bit
Intel i5-4440 (3,1 GHz) ; Intel HD Graphics 4600

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158823

  • schrauber
  • OFFLINE
  • Platinum Boarder
  • Posts: 1650
  • 4 months, 1 week ago
jwrl wrote:
I can see a real need for doing that because I suspect that its sheer simplicity will motivate users to use this effect and a blend...

Do you mean because of the adjustability of the position of the axis of rotation?
During the programming I noticed that it might look interesting, which is why I made it adjustable.

I played something with the effect (with transparency, without mirroring)
Here's an example:
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Mainly automatically translated
--------------------------------------------
Windows 10, 64 Bit
Intel i5-4440 (3,1 GHz) ; Intel HD Graphics 4600
Last Edit: 4 months, 1 week ago by schrauber.

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158825

  • gr00by
  • Pro User
  • OFFLINE
  • Platinum Boarder
  • Posts: 1012
  • 4 months, 1 week ago
I just noticed that mine latest projects are affected, too. I must finish them tomorrow. It would by impossible without your work, schrauber&jwrl.

BTW: SpinZoom is not only quick fix, but it has better UI for my needs (zoom/pan/rotate). I must redefine whole keyframes, of course, but it's easy-peasy with SpinZoom.

youtu.be/OcfqDPAy7zc?t=7s
Canon C100 -- Manjaro Linux User

Re: Aliasing in Exported Video (3D DVE?) 4 months, 1 week ago #158827

  • jwrl
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 8573
  • 4 months, 1 week ago
schrauber wrote:
Do you mean because of the adjustability of the position of the axis of rotation?

gr00by wrote:
SpinZoom is not only quick fix, but it has better UI for my needs (zoom/pan/rotate). I must redefine whole keyframes, of course, but it's easy-peasy with SpinZoom.

That's what I meant!
Time to create page: 0.68 seconds
Scroll To Top