.path of image distortion - any chance of it 'failing' more gracefully?

I’ve been doing tests in my dungeoneer demo (soon I shall call it a game, soon!).

One thing that doesn’t surprise me is that the engine doesn’t handle distorted paths very well, that is, a path on an image that is not convex and/or has edge lines crossing.

If an image was drawn as 2 triangles this would not be a problem of course, but it would make the ‘legit’ distortions look really bad (as the image would not be evenly distributed over the whole quad - each triangle half of the image would be distorted very differently).

However, look at the image below:

It is obvious that the red and green images are distorted badly (that is, they have edges crossing).

However, what I want to know is why is the red and green even showing?

Images are made up of frames from an image sheet. Each frame is bordered with red and green (so I can detect problems such as this).

However - both min and mag linear filtering is disabled, and I specifically made all the frames be ‘within’ the actual image by 2 pixels on each edge (that is to say, each frame is the central 116 pixels region within the actual 120 pixels image, and outside these 120 pixels are the red and green borders).

In other words, it isn’t even repeating the edge or adjoining pixels, but is reaching waaay outside of the frame definition (in this case, 3 pixels or more).

Any chance this can be fixed? I am used to having to repeat edge pixels to avoid mistakes generally, but it never amounts to more than a single pixel border per image / frame size, as in theory that is all that can be reached. This is a littie more extensive than that :slight_smile:

Actually I looked a bit harder and I’m more confused than before regarding the type of distortion being used.

Here is a legitimate set of image distortions:

Pay attention to the part where the two floor tiles in front of you meet.

The texture I use for these is the same, and the 8 smaller squares on the border are the same size (give or take a pixel) along each edge.

That is to say that, on the edge where the two floor tiles touch, the squares should match up.

Now I had assumed that the path distortion is a linear one, but it appears not to be.

You can clearly see how on the nearest tile, the squares start big on the left and shrink as they go right, while for the tile ahead of it, they start small and get bigger towards the right.

Where is this non-linear distortion coming from?

Are you guys trying to fake perspective distortion by chucking in a (somewhat) arbitrary depth value for the texture distortions?

If so, it could well be useful to have a means of disabling it - I think I won’t be the only person complaining if two identical images share an edge and the textures either side of said edge don’t match up.

It looks like the two tiles do not share the same vanishing point. In other words, the left edges of the tile should be on the same line (collinear) and same for the right edges. 

Or it could be you’re just at the bleeding edge of what we intended this for :slight_smile:

Actually I looked a bit harder and I’m more confused than before regarding the type of distortion being used.

Here is a legitimate set of image distortions:

Pay attention to the part where the two floor tiles in front of you meet.

The texture I use for these is the same, and the 8 smaller squares on the border are the same size (give or take a pixel) along each edge.

That is to say that, on the edge where the two floor tiles touch, the squares should match up.

Now I had assumed that the path distortion is a linear one, but it appears not to be.

You can clearly see how on the nearest tile, the squares start big on the left and shrink as they go right, while for the tile ahead of it, they start small and get bigger towards the right.

Where is this non-linear distortion coming from?

Are you guys trying to fake perspective distortion by chucking in a (somewhat) arbitrary depth value for the texture distortions?

If so, it could well be useful to have a means of disabling it - I think I won’t be the only person complaining if two identical images share an edge and the textures either side of said edge don’t match up.

It looks like the two tiles do not share the same vanishing point. In other words, the left edges of the tile should be on the same line (collinear) and same for the right edges. 

Or it could be you’re just at the bleeding edge of what we intended this for :slight_smile: