Pixelation

Critique => Pixel Art => Topic started by: Zizka on March 09, 2015, 05:21:01 pm

Title: A Matter of Perspective...
Post by: Zizka on March 09, 2015, 05:21:01 pm
Hello guys!

I have a question about perspective.

Here's a screenshot of my game:
(http://image.noelshack.com/fichiers/2015/11/1425920099-sahand-prototype.png)

At the moment, I'm creating new elements to decorate things but I'm really struggling with the perspective.

Normally, you would have a single or many VP. With a "static" background like here though, I don't understand according to what angle I should create new elements and this is bothering me immensely.

Normally, I would be able to use a VP to give me an idea as to how to proceed but now I can't. I could use a strict side-view perspective (like Mario) but I don't like the way it looks.

Ninja Gaiden pulled it off nicely:
(http://i.imgur.com/5UmBsuq.png)

I can see some parallel lines here.

Where would be mine in my screenshot however?

Normally I'd have a VP like so:
(http://i.imgur.com/Tvkx3py.png)

But here I obviously don't.

So yeah, I'm confused.
Title: Re: A Matter of Perspective...
Post by: dpixel on March 09, 2015, 05:46:05 pm
I don't think you would find a vp in a game like this.  I just googled Ninja Gaiden and I think your lines should be more like this:
(http://i.imgur.com/A7UKH37.png)

And the shadows should be at the same angle depending which way your light is coming from.  In Ninja Gaiden, it coming from the front left.  In my edit it's coming from the back (top) left.
Title: Re: A Matter of Perspective...
Post by: Zizka on March 09, 2015, 06:45:39 pm
Thanks for the reply, dpixel. Your edit looks cool.

Say I would want to integrate the following pipes:

(http://image.noelshack.com/fichiers/2015/11/1425926516-pipe.png)

(http://image.noelshack.com/fichiers/2015/11/1425926516-pipe-2.png)

Neither perspective would fit. What I'm trying to figure out, is at which angle I should draw stuff to make things look right and coherant.

Logically, if I base the perspective on dpixel's edit, I shouldn't be able to see the inside of the pipe, correct? I should just see its side.
Title: Re: A Matter of Perspective...
Post by: dpixel on March 09, 2015, 07:29:06 pm
Probably something like this:
(http://i.imgur.com/VKRVUqk.png)
Title: Re: A Matter of Perspective...
Post by: Cyangmou on March 09, 2015, 08:52:00 pm
IIf you are looking for the horizon line in ninja gaiden, there are various possibilities, since they don't pulled it off exactly (most probably because of limitations)

this might help:

(http://abload.de/img/2015_3_9_ninja_gaidenkjkwe.png)
Title: Re: A Matter of Perspective...
Post by: PixelPiledriver on March 09, 2015, 09:04:54 pm
Do some reading on Linear Projection and Perspective Projection.
The difference between them is where your confusion is coming from Zizka.
Title: Re: A Matter of Perspective...
Post by: Zizka on March 10, 2015, 11:33:40 am
Oops, I just realized I might not have been very clear in my request.

The reason why I posted a picture of Ninja Gaiden is because I like the way you can see the ground like that. This is what I tried to reproduce in my game. I don’t want to have a Mario-like view where you can only see the edge of the ground.

I realize there is no vanishing point in my screen. The reason why I’m seeking help is because I need to be able to determine at what angle I need to create my assets for the game.

Basically, I want to understand how I can tackle the various geometric forms in my game.
 
Say, if I had to do a cone, I’d like to know which shape it should have so everything ends up looking good. Anyways, I’ll look up the perspective mentioned by PPD and I’ll let you know if I still don’t get it.

EDIT: There's really not much out there. What's a good reference to read up about this stuff?
Title: Re: A Matter of Perspective...
Post by: Ai on March 10, 2015, 12:04:28 pm
Most linear projections are 'orthographic' projections. Some are not, though (http://en.wikipedia.org/wiki/Oblique_projection).. notably oblique projections -- which are probably what we are dealing with here.

I put everything following this together before I realized it doesn't completely apply, however, there are still a lot of similarities between orthographic and oblique projections, so hopefully it can be of some use:

----

Orthographic projections are generally very simple : the angle of a line in the 2d projection always has the exact same relation to the angle the viewer is looking at. For example, all planes that are exactly perpendicular to the angle the viewer's eyes are pointing, are always completely invisible (dpixel's pipe edit demonstrates this principle); all planes that exactly face the angle the viewer's eyes are pointing, are completely visible (unless other objects obscure them directly) and unskewed. The same principle of a given angle appearing the same no matter where it is in the viewport, applies universally.

EDIT: Here's some samples rendered with blender with a similar camera to yours:
(http://i.imgur.com/A0VtTAF.png)
This includes 4 cones, a sphere, 3 torii, and a cube. All objects of the same type are identical duplicates.

This is the same scene, but with a camera angled 22.5 degrees to the right (so the object planes and camera planes no longer align perfectly)

(http://i.imgur.com/lOR6Zw9.png)

You can see that I actually just chucked stuff in arbitrary locations to get it to fit nicely in the first camera's viewport, here ;)
But more importantly, hopefully, it gives a clear visual on what faces will always be visible, and what faces will never be visible, relative to any given camera angle.
Title: Re: A Matter of Perspective...
Post by: Zizka on March 10, 2015, 02:02:54 pm
Let me get this straight ???:

Linear projection are orthographic projections. Only, in the Ninja Gaiden screen, we're dealing with an oblique projection which is a linear projection but not an orthographic projection. Am I right so far?

dpixel's edit would be oblique projection:
(http://i.imgur.com/A7UKH37.png)

While my original screen would be... orthographic projection?:
(http://image.noelshack.com/fichiers/2015/11/1425920099-sahand-prototype.png)

Quote from: ai
Orthographic projections are generally very simple : the angle of a line in the 2d projection always has the exact same relation to the angle the viewer is looking at. For example, all planes that are exactly perpendicular to the angle the viewer's eyes are pointing, are always completely invisible (dpixel's pipe edit demonstrates this principle); all planes that exactly face the angle the viewer's eyes are pointing, are completely visible (unless other objects obscure them directly) and unskewed. The same principle of a given angle appearing the same no matter where it is in the viewport, applies universally.

Ok, I think this is the definition I was looking for. I've saved both pictures to my hardrive by the way.

So this perspective:
(http://i.imgur.com/A0VtTAF.png)

...is equivalent to this one:
(http://image.noelshack.com/fichiers/2015/11/1425920099-sahand-prototype.png)

While this one:
(http://i.imgur.com/lOR6Zw9.png)
...is equivalent to this one:
(http://i.imgur.com/A7UKH37.png)

So basically, I have to choose either an oblique or orthographic projection and then stick with it, am I getting this right?

Quote from: ai
But more importantly, hopefully, it gives a clear visual on what faces will always be visible, and what faces will never be visible, relative to any given camera angle.

Well, it does give me an idea as to what faces will always be visible if I compare both pictures. It's just the angle of those faces I need to determine based on the model of projection I end up choosing.

Here's the thing:

More specifically, I want to add toilet rolls to the stage. I need to determine how to draw the top of the toilet roll.

Correct me if I'm wrong here:

This would be orthographic:
(http://i.imgur.com/zq6Hswk.png)

My question is: based on my screen, just how much of the top should I see? What's the eye level here? Should the top ellipse be the same as the one in the cone here:

(http://i.imgur.com/ZzNIXJs.png)

Anyways, thanks for taking so much time for a thorough input!
Title: Re: A Matter of Perspective...
Post by: Kazuya Mochu on March 10, 2015, 02:25:19 pm
a circle in perspective is always an ellipse, be it orthogonal or conical perspective. only if the circle is perpendicular to the camera direction will it be shown as a perfect circle.
What changes in the orthogonal perspective is that the center of the circle is the center of the ellipse, while in conical perspective, the center of the circle wont match the center of the ellipse.

this sort of perspective is like if you had a camera VERY far from the scene and zoomed in. theres still a vanishing point, but its so far away that you can't feel the distortion.
Title: Re: A Matter of Perspective...
Post by: Ai on March 10, 2015, 02:49:13 pm
Let me get this straight ???:

Linear projection are orthographic projections.
Rather, I would say that Orthographic projections are linear projections. That makes 'oblique is linear, but not orthographic' make sense easier.

Quote
Only, in the Ninja Gaiden screen, we're dealing with an oblique projection which is a linear projection but not an orthographic projection. Am I right so far?

dpixel's edit would be oblique projection:

While my original screen would be... orthographic projection?:

dpixel's edit is definitely oblique -- the shapes described by his lines are incompatible with orthographic projection of rectangular objects. If that was an orthographic drawing, it would describe instead a series of parallelograms.

Your original could be considered as either oblique or orthographic, since no angling is involved.

Quote
Ok, I think this is the definition I was looking for. I've saved both pictures to my hardrive by the way.

So this perspective:
(http://i.imgur.com/A0VtTAF.png)

...is equivalent to this one:
(http://image.noelshack.com/fichiers/2015/11/1425920099-sahand-prototype.png)
Yes.

Quote
While this one:
(http://i.imgur.com/lOR6Zw9.png)
...is equivalent to this one:
(http://i.imgur.com/A7UKH37.png)
No. Sorry, I don't know how to render oblique projection with blender. Those two views I rendered are *both orthographic*. The first view has the object planes aligned perfectly with the camera, the second has them differing by 22.5 degrees in one axis.

Quote
So basically, I have to choose either an oblique or orthographic projection and then stick with it, am I getting this right?
.. Up to a certain point. It's pretty common to cheat perspective for gameplay purposes -- eg LOZ:LttP (http://tvtropes.org/pmwiki/pmwiki.php/Main/ThreeQuartersView) (TVTropes warning).
Oblique projection just basically says out of the gate 'There's no camera, just lies and other lies.' so it gives you an excuse for the other cheats ;)

(or to put it another way: an orthographic view is a possible perspective projection from a lense with infinite distance from the scene and infinite focal distance. Oblique just isn't a possible perspective projection, it's not something you could actually see given the shapes that are implied -- it's "forced depth".)

Quote
This would be orthographic:
(http://i.imgur.com/zq6Hswk.png)
The image isn't orthographic (it's a photo taken with a real lense, meaning it is in perspective, probably with a degree of lense distortion involved as well)
Some objects in perspective shots may be 'close enough' to orthographic, though -- remember my comment about infinite distance? The further the camera is from the object, the closer the result is to an orthographic projection. But we are talking serious distances here generally, no less than 100m just to qualify as 'getting somewhat towards ortho'. The top plane of that roll is probably still subject to perspective distortion.

Regarding oblique, as far as I know, there are no apparatus capable of taking 'oblique photos', if that concept even makes complete sense.

Quote
My question is: based on my screen, just how much of the top should I see? What's the eye level here?
Okay, I'll stop you there, because : that's up to you. Projections are not viewpoints. there are a range of possible oblique views, there are a much larger range of possible orthographic views (on a given scene).

Oh, btw, eye level is not a thing that effects projection (except clipping the image) in orthographic or oblique projections. The horizon is technically present but infinitely distant. Moving around the centre of the camera is directly equivalent to panning through the projected 2d image -- no angles or lengths ever change as a result.

The only meaningful parameters for orthographic projection are rotation (the three angles specifying the camera plane's orientation in 3d space).
For Oblique, correct me if I'm wrong, it has only two parameters: angle on the 2d plane, and ratio aka 'depth'.
Ratio describes the length of projection for a hypothetical cube of space.
Looking at dpixel's edit, we can work out the approximate ratio in use:

* One cube of space appears to be 27x27 along the front face, based on the spacing of the divisions.
* The upper face has a length of about 6. (sqrt(3*3 + 5*5) = 5.83, or sqrt(3*3 + 6*6) = 6.7, according to where you think it's correct to measure to. I took the average which is 6.26)
* Therefore the ratio is 6/27, which is 0.222222; or more precisely 6.26 / 27, which is 0.231
(http://i.imgur.com/EalAK2g.png)


However, the problem here is actually one of relative size.

You have indicated the size of a block in your existing work. What is a block's shape in 3d? Is it a cube? Is the toilet roll supposed to occupy the same amount of space as said cube, or a multiple of it (ie, be a cylinder with length equal to diameter)?

If so, the answer is simple: The ellipse that fits exactly into your existing top surface.
Here's my impression of that, with the existing colors which are rather lacking for this:
(http://i.imgur.com/7ILaoT0.png)

If this is the wrong scale, then just multiply the sizes of the top surface and re-fit the ellipse to that. That's all I can say for now, I need to get to bed.

EDIT:
So to rephrase that, you need to decide the dimensions of your base unit (assumably that platform block), and the dimensions of your toilet roll. Then you can calculate the ratios between those dimensions,  and you will have the information necessary to scale the two visible faces of your block. These scaled faces will exactly indicate the space that the toilet roll occupies, including how much of the top is visible. You can then fit the necessary ellipse onto the scaled top face and extrude a cylinder from it (assuming you want the toilet roll to be axis-aligned with other objects).

EDIT2: cleaned up some stuff and improved my understanding of oblique projection.
Title: Re: A Matter of Perspective...
Post by: dpixel on March 10, 2015, 03:11:40 pm
Interesting conversation here.

I think one of the rules should be:  If the screen will scroll (which in your case looks like it will),  than there shouldn't be a vanishing point unless rendering in 3D with openGL or something.

The rest would be up to you as how much of the top of stuff will be visible and how much of a side of stuff will be visible. And then keep it consistent.

EDIT:
Added cones in my edit:
(http://i.imgur.com/IffDwi0.png)

Also, your toast man character is almost the exact same perspective projection as my edit.  I also had the shadows backwards on the platforms in my last edit.

allowed myself to edit this mistake. ~mou
Title: Re: A Matter of Perspective...
Post by: Cyangmou on March 10, 2015, 04:08:18 pm
Let me get this straight ???:

Linear projection are orthographic projections. Only, in the Ninja Gaiden screen, we're dealing with an oblique projection which is a linear projection but not an orthographic projection. Am I right so far?

dpixel's edit would be oblique projection:
(http://i.imgur.com/A7UKH37.png)

While my original screen would be... orthographic projection?:
(http://image.noelshack.com/fichiers/2015/11/1425920099-sahand-prototype.png)


Both examples are Parallel projections (more or less - there are inconsistencies)

Dpixels is a general oblique projection,
but neither cabinet, nor cavalier - and it's unclear if the axis got scaled (since the plaform wasn't edited).
http://cs.brown.edu/stc/summer/viewing_history/viewing_history_23.html (http://cs.brown.edu/stc/summer/viewing_history/viewing_history_23.html)

yours is very close to axonometric, but the floor heights aren't consistent.

If we talk about parallel projections, we look at the scaling of the axis.

axonometry requires a proportional scaling of all axis.
(isometry usually is an axonometry)

Orthogonal means, that there are 2 unscaled lengths (usually width and height) and one arbitrary scaled length (usually depth)
Quote
In mathematics, orthogonality is the relation of two lines at right angles to one another (perpendicularity)...
http://en.wikipedia.org/wiki/Orthogonality (http://en.wikipedia.org/wiki/Orthogonality)

The ninja Gaiden screenshot actually is a mashup out of parallel projections and perspective -
I personally would refer to it as "a 2.5d case" because I lack a better term (not to confuse with game art 2.5d) 

It's not true 3d (with correct applied perspective) and neither it is a correct projection with affinely warped planes.
In fact it's a complete weird fantasy if it comes down to projection and perspective - but hey somehow it works and doesn't look too bad (wonder which actual non-artist experienced with perspective can see right away how far it's off)


Here is a chart with correct changes and notes for better understanding:
(http://abload.de/img/2015_3_10_projection-mluqp.png)
Title: Re: A Matter of Perspective...
Post by: Ai on March 11, 2015, 03:49:57 am
FWIW I've just dug up this (http://blender.stackexchange.com/questions/1888/how-can-i-get-a-cabinet-projection-camera), which seems to demonstrate that oblique projections (at least cavalier projection) are equivalent to doing orthographic projection and then skewing+stretching the resultant image.

There's also a rather interesting technique using a Lattice transform to non-destructively deform an object so that, when rendered with an orthographic projection, it appears as if it were rendered with an oblique projection. I believe this is adjustable to any oblique projection angle, not just cavalier (which is 45 degrees).
 This may be getting too Blender-specific, but it would allow you to get reference points for a range of generic solids.

EDIT: Looks like that works -- here is an album comparing oblique to ortho (http://imgur.com/a/kOYPC).
I'm a novice with oblique projection, so hopefully these results look correct to more experienced people.
I'll post the two wireframes -- oblique and ortho:

Oblique: (edit: fixed)
(http://i.imgur.com/B6DL8uH.png)

Ortho:
(http://i.imgur.com/qJQ5q9n.png)

The album also includes solid renders.
Title: Re: A Matter of Perspective...
Post by: hawken on March 11, 2015, 05:30:40 am

This would be orthographic:
(http://i.imgur.com/zq6Hswk.png)

best post on WOTP 2015  ;D

And yes it would, if taken from far enough away. It's almost Oblique, almost Isometric.

Wikipedia has tons of articles on this subject, but in a nutshell, Orthographic is simply flat projection, a camera with no perspective.
In games this is often:
Dimetric = pixel art Isometric (two px across, one px up)

In 3D, Y is often depth and Z is height, this can get confusing, because the 2d plane is laid out horizontally. In 2D co-ordinates though X is horizontal and Y is vertical, because the 2d plane is laid out vertically. Its a debate that will never end.

projections in video games (http://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art)
classical projections (http://en.wikipedia.org/wiki/Graphical_projection)

What you seem to be after is Oblique with Perspective.

But Oblique is Orthographic, and Orthographic doesn't have perspective! Quick someone call M. C. Escher!

So how did they make Ninja Gaiden then? The answer is simple:

They didn't give a flying fXXk!

Title: Re: A Matter of Perspective...
Post by: hawken on March 11, 2015, 05:59:11 am
Oblique:
(http://i.imgur.com/JVSiWBp.png)

This is something else... everything looks distorted. Your cones turn into pyramids.
Title: Re: A Matter of Perspective...
Post by: Ai on March 11, 2015, 06:07:52 am
This is something else... everything looks distorted. Your cones turn into pyramids.

Heh, that was one of the three reasons I thought that it was probably correct oblique:

☑ cubes are correctly skewed
☑ everything else is matchingly skewed
☑ rounded surfaces look pretty fucked up

Anyway, I think the lattice effect was being inappropriately clipped. Scaling it up yields this:

(http://i.imgur.com/B6DL8uH.png)

Does this seem more correct to you? It certainly makes more sense to me.
I've updated the album and my post above on the provisional assumption it is correct.
Title: Re: A Matter of Perspective...
Post by: Zizka on March 11, 2015, 07:22:45 pm
Quote from: ai
So to rephrase that, you need to decide the dimensions of your base unit (assumably that platform block), and the dimensions of your toilet roll. Then you can calculate the ratios between those dimensions, and you will have the information necessary to scale the two visible faces of your block. These scaled faces will exactly indicate the space that the toilet roll occupies, including how much of the top is visible. You can then fit the necessary ellipse onto the scaled top face and extrude a cylinder from it (assuming you want the toilet roll to be axis-aligned with other objects).

That's a good rule of thumb, thanks.

Quote from: dpixel
I think one of the rules should be:  If the screen will scroll (which in your case looks like it will),  than there shouldn't be a vanishing point unless rendering in 3D with openGL or something.

The rest would be up to you as how much of the top of stuff will be visible and how much of a side of stuff will be visible. And then keep it consistent.

That's a good pointer too.

In your edit with the cones:
(http://i.imgur.com/dyzroHD.png)
The parallel at the base of the cone are parallel to the ones of the floor.

The way I understand it, if there was a vanishing point, the cone itself wouldn't look like in your edit. If there was a VP, the cone would be standing straight. It's perspective would change depending on the location of the VP.

Am I right about this?

@Cyangmou:
Thanks for the pic, saved it on my laptop. Will come in handy.

Quote from: mou
(http://i.imgur.com/ADc6uaH.png)

To sum things up: both of those are parallel projections. More specifically, they are orthographic projections. Even more specifically, the second one is axonometric.

(http://i.imgur.com/qDNntps.png)
If I wanted to use the 2.5D to build my tileset... how would I pull it off? Since a VP is implied, this would that I would need to create many versions of the same tiles with various angles depending said tile is in relationship with the VP. Seems like a chore to me.

(if you still have the photoshop file, could you provide a black background so the text is easier to read. I tried to do so in photoshop but the font end up looking fuzzy).

(http://i.imgur.com/9xejWnm.png)

The cavalier perspective seems the best bet for my game. How can I determine at what angle I should draw the slopes like you did?

If I were to use a cylinder using that projection:
(http://i.imgur.com/dKGVxhi.png)

How can I know the shape of the top ellipse of my cylinder? Do I just need to calculate the ratio of my basic cube and then apply that ration to my cylinder to determine the shape of the ellipse? But then, how do I apply this ratio? It's not like a cube with a single straight line to separate the side from the top...  ???

Should I just put #3 on the floor, make it fit with it and use the same ellipse on the floor I would use on the top? Or should I use #1 or #2 for the top?

If the toilet roll is on its side like this:
(http://i.imgur.com/ODmmxbS.png)

Should I just draw a perfect circle and then have a 45 degrees angle at #1 and #2 to draw the rest?

@Hawken: Thanks for the links. I've downloaded both.

I need clues/pointers to know how to draw my shapes in space.

I don't know for everyone else, but I'm about as confused as I was at first.  ???
Title: Re: A Matter of Perspective...
Post by: dpixel on March 11, 2015, 07:41:32 pm
Quote
The way I understand it, if there was a vanishing point, the cone itself wouldn't look like in your edit.
Correct.
Quote
If there was a VP, the cone would be standing straight. It's perspective would change depending on the location of the VP.

Am I right about this?
I'm not sure what you mean about standing straight, but yes the shape of the cone would change if there was a VP.

Quote
I don't know for everyone else, but I'm about as confused as I was at first.
It can be confusing especially when you just want to pixel.  But it's good to learn some fundamentals if you're going to do a whole game in a certain view.
Title: Re: A Matter of Perspective...
Post by: Cyangmou on March 11, 2015, 08:39:59 pm
Image with darker text and white bg - should be uploaded at 100% size and sharp pixels, if anyone sees it differently, it#d be interesting to know why (make sure you checked your browser zoom)
(http://abload.de/img/2015_3_11_projection-5fakb.png)



@Cyangmou:
Quote from: mou
(http://i.imgur.com/ADc6uaH.png)

To sum things up: both of those are parallel projections. More specifically, they are orthographic projections. Even more specifically, the second one is axonometric.

yes, yes, yes

graphical projection < parallel projection < ortographic/orthogonal projection < axonometic projection

You start with perspective, apply certain rules to it and all those cases have a special name.

Quote
Quote from: Wikipedia, http://en.wikipedia.org/wiki/Parallel_projection
Parallel projection corresponds to a perspective projection with an infinite focal length (the distance from the image plane to the projection point), or "zoom".

Quote from: Gary R. Bertoline et al. (2002) Technical Graphics Communication. McGraw-Hill Professional, 2002. ISBN 0-07-365598-8, p.330.
Axonometric projection is a type of parallel projection used for creating a pictorial drawing of an object, where the object is rotated along one or more of its axes relative to the plane of projection.


If I wanted to use the 2.5D to build my tileset... how would I pull it off? Since a VP is implied, this would that I would need to create many versions of the same tiles with various angles depending said tile is in relationship with the VP. Seems like a chore to me.

You make decisions based on what looks alright and works well together with your tile restrictions and your gameplay.
THe outcome is not a clean projection, it's something weird and inconsistent - like Ninja Gaiden it will be "broken" in a purely technical sense.
You just don't care about "correct 3d", because your tile restrictions or time limitations are more important. 


The cavalier perspective seems the best bet for my game. How can I determine at what angle I should draw the slopes like you did?

A perspective requires perspectivical scaling - this means that you have to add vanishing points.
If you add vanishing points, it's also no longer a parallel projection.


The cavalier "perspective" is a projection.
It's the cavalier projection.

The cavalier projection is a very special case of an oblique projection with it's own rules.
THe rules are:
width and height have an angle of 90°
depth is at an angle of 45° to the horizontal line
a length which has a length of 1 in width, has a length of 1 in height and a length of 1 in depth (actually at 45°)

if you talk of "slopes" i think you mean the elevation angle and not the depth angle.
The elevation angle was just an assumption, it can be any angle.
I just went with a 2:1 clean pixel line for the slopes.


http://cs.brown.edu/stc/summer/viewing_history/viewing_history_23.html (http://cs.brown.edu/stc/summer/viewing_history/viewing_history_23.html)
(http://cs.brown.edu/stc/summer/viewing_history/viewing_history_AFrame_24.gif)

If I were to use a cylinder using that projection:
(http://i.imgur.com/dKGVxhi.png)

How can I know the shape of the top ellipse of my cylinder?

You take the ruleset of the cabinet projection and construct an ellipse.
Make sure that you don't draw a circle. The ellipse is affected by the projection as well.

look at this - that's how a circle appears at a top-plane in cavalier projection:
(http://upload.wikimedia.org/wikipedia/commons/0/04/Ellipse_dessin_indus.png)

Should I just put #3 on the floor, make it fit with it and use the same ellipse on the floor I would use on the top? Or should I use #1 or #2 for the top?

if you want to have a cavalier projection bottom and top circle are the same.
it's not #3 because the ellipse would appear differently
If you want to fake perspective, you are producing just a graphical projection and you can go with #1 or #2

If the toilet roll is on its side like this:
(http://i.imgur.com/ODmmxbS.png)
Should I just draw a perfect circle and then have a 45 degrees angle at #1 and #2 to draw the rest?

It would be a circle.
If you want to have a cavalier projection, the front plane isn't distorted (therefore a circle).
the 45° lines are also right (but that also just depends if it's a cavalier projection - keep the ruleset in mind)

Title: Re: A Matter of Perspective...
Post by: Ai on March 11, 2015, 11:29:38 pm
You take the ruleset of the cabinet projection and construct an ellipse.
Make sure that you don't draw a circle. The ellipse is affected by the projection as well.

look at this - that's how a circle appears at a top-plane in cavalier projection:
(http://upload.wikimedia.org/wikipedia/commons/0/04/Ellipse_dessin_indus.png)

I think it's worth noting, that for any given oblique projection, you can take the 'base circle' (circle as it would be plotted on front face), and turn it into a correct circle for one of the sides by scaling it and then skewing it:

(http://i.imgur.com/11fcOBI.png)

Obviously you then need to clean it up, but it makes any such process pretty easy overall.

Strongly agree with your message that a projection is not necessarily a perspective, though perspective is a type of projection. This seems to be the central issue that Zizka is struggling with here, the fact that what we are dealing with is not a perspective.
Title: Re: A Matter of Perspective...
Post by: Zizka on March 12, 2015, 01:27:45 pm
Alright, this is what I have so far:
(http://image.noelshack.com/fichiers/2015/11/1426166711-perspective-3.png)
Now, shadows nonwithstanding, does it look right to you guys?

Is this how things should look, especially "C" and "D"?

EDIT: Cyangmou: The images are hosted at noelshack and Im.gur. I don't know how long either will be in business, so there is no guarantee.

Can I post your spritorial at other places on the internet? The one about perspective? I'd mention it's from you of course.
Title: Re: A Matter of Perspective...
Post by: Cyangmou on March 12, 2015, 03:14:27 pm
Can I post your spritorial at other places on the internet? The one about perspective? I'd mention it's from you of course.

It's not a "tutorial" in a tutorial sense, since a lot of the information also depends on the critique text.

As you see some further critique were given by Hawken and AI, which also build on it.
I am neither sure if everything I wrote down is 100% exact nor formulated in the clearest way possible.
I haven't planned it out as tutorial, I just put down thoughts based on what was already there and regarding your questions.

The best would therefore be, if you post to the whole thread or directly to the message (you can get a link by clicking on the message header)



However since there seems to be a generally huge confusion about the topic it might be best to turn everything in this thread and in hawken's thread
http://wayofthepixel.net/index.php?topic=17704.msg160136#msg160136 (http://wayofthepixel.net/index.php?topic=17704.msg160136#msg160136)
in a clearly formated and easily understandable infograph.
However currently I am busy with link directories for the good reads section, so this project, despite it would help, has to wait because of time reasons.
Title: Re: A Matter of Perspective...
Post by: Ai on March 13, 2015, 02:55:59 am
Is this how things should look, especially "C" and "D"?

Hmm. Well, this is close enough, I think. Except that it isn't using cavalier projection (it's using a general oblique projection with an angle of something like -33.6 degrees (http://www.1728.org/gradient.htm)). Did you change your mind about that?

Some small issues I thought I'd better point out just in case:
* the vertical roll C is intersecting 2px with the wall (top plane of roll is 8px, top plane of blocks is 6px.) If the bright line is not actually part of the top face, then the difference is more severe (7 and 5).
* The small roll D has an elliptical (3:4) inner contour and an elliptical (7:6) outer contour. Given that the end of the roll is facing front, ideally these should both be as close to circular as possible.

I consider them small things because games often successfully get away with worse inconsistencies.

I presume you mean 'Imgur' (no dot (http://imgur.com)).
Title: Re: A Matter of Perspective...
Post by: Pinux on March 15, 2015, 11:01:20 pm
You could Look at Castle Crashers even though it isn't a pixel styled game
Title: Re: A Matter of Perspective...
Post by: Zizka on March 16, 2015, 12:28:35 am
@Ai:
Oh I haven't changed my mind, I'm just still experimenting. You're right in your observation.

@Pinux: Could be a good reference, thanks!

So we’ve talked about persepctive so far. I’m currently experimenting but I’m having some trouble still.
Let’s say I use an orthographic perspective and I want to rotate a cube in this perspective, how would I manage this?

So I took some time to really analyze this.

Suppose I want to rotate the rectangle on the “x” axis.

Would it look like this?
(http://image.noelshack.com/fichiers/2015/12/1426465597-cube-rotation.gif)

The second half of the animation looks right to me but not the first part, why is that?

Since there’s no vanishing point, it makes it more difficult to determine how the rectangle would rotate.

What if I wanted to rotate it on the y axis, how would that work?
Title: Re: A Matter of Perspective...
Post by: stevenblanc on March 16, 2015, 01:17:16 am
You need to add in one or two frames when the lighter portion reaches the bottom the angle would cause it to appear to shrink, as opposed to disappearing completely as it currently does. The same is true when it reappears on the top.

Technically with lighting though the light portion should be identically coloured when its in the center position as well.

Finally I think your proportions are a little off as the diminishing portion of the cube should never be taller than the cube at full front face. It should appear shorter.
Title: Re: A Matter of Perspective...
Post by: Ai on March 16, 2015, 07:23:31 am
So we’ve talked about persepctive so far. I’m currently experimenting but I’m having some trouble still.
Let’s say I use an orthographic perspective and I want to rotate a cube in this perspective, how would I manage this?

So I took some time to really analyze this.

Suppose I want to rotate the rectangle on the “x” axis.

Would it look like this?
(http://image.noelshack.com/fichiers/2015/12/1426465597-cube-rotation.gif)

The second half of the animation looks right to me but not the first part, why is that?

Not sure.. They're both incorrect in the way stevenblanc specified.

The more or less constant amount of movement per frame you have appears to be correct. However, you are reducing the object's volume during the rotation, which makes it seem like it's not a cube.

I'd suggest you study this, particularly how little the visible profile changes during rotation:
(http://i.imgur.com/PN9CZHV.gif)

Here's a diagram showing the limits of the profile:

(http://i.imgur.com/gZbZ1cy.png)

It indicates clearly that the profile never becomes smaller than the straight-on size of one face, and that the profile when straight on is 70% of the size when rotated by 45 degrees (the largest the profile can become). Because we are using an orthographic projection, the object does not become larger or smaller according to it's closeness to the camera.

Quote
Since there’s no vanishing point, it makes it more difficult to determine how the rectangle would rotate.
Since there is no vanishing point, you can take your square and rotate it by constant amounts. Then you can just measure the coverage of the two visible faces. My diagram above illustrates this: when rotated by 45 degrees,  the space occupied is 43px and half of this goes to the 'top' face, half to the 'bottom' face.

In orthographic, these ratios are also reversible: if you have a frame (22.5 degrees) where your top face has 13px and the bottom one has 28, then a later frame (67.5 degrees) will have your top face with 28px and the bottom with 13px. In this manner you can construct only 45 degrees of your rotation and get the other 45 degrees 'free'.


rotating y, that's mostly just a 2d transform:

(http://i.imgur.com/bBgtOUp.gif)

And heck, it's easy enough to do, may as well do Z:
(http://i.imgur.com/1tzNonm.gif)

The same set of ratios apply to all of them AFAICS. I would suggest that drawing 3 accurate frames: 0 degrees, 22.5 degrees, and 45 degrees, is enough to extrapolate any further frames correctly.