adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Fwd: [Adonthell-artwork] Another gfx question...


From: James Nash
Subject: [Adonthell-devel] Fwd: [Adonthell-artwork] Another gfx question...
Date: Sat, 5 Apr 2008 14:24:23 +0100

Hi guys,

I'm forwarding this to the developer list (it was only on artwork so far) incase ppl didn't see it. I think some of this may be related to Kai's recent thoughts on the current map implementation, since that discusses the rendering of maps.

Basically, I'd like an overview of how the in-game gfx work in 0.4 and what can and cannot be done. I need the info to help me design some map gfx but also want to update the artists' documentation on the wiki since it looks a bit out of date. (As I start making some gfx I could perhaps do some tutorials for other Adonthell artists too)

Regards,
                        - James

Begin forwarded message:
From: James Nash <address@hidden>
Date: 28 March 2008 20:27:51 GMT
To: Artists playground <address@hidden>
Subject: [Adonthell-artwork] Another gfx question...
Reply-To: Artists playground <address@hidden>

I forgot something in my previous email:

I seem to remember some discussions about the angle at which we are looking down at the game world. This is useful for artists to make the scaling of depth and height of graphics consistent. Presumably with the 3D internals of the world this is even more important now.*

In the likely event that you have no idea what I mean, here's a diagram to explain what I mean:

PNG image



This is supposed to be a side-on view of the game world (as if we could step into Adonthell and look at things from the left). The circle thing in the top-right is supposed to be an eye looking down at the world - this is the point of view from which we actually see the game.

The orange box is some object that has a height "y" and a depth "z". The object also has a width "x" which is not visible from this angle. The width is of no interest here, since if the object is supposed to be 20 pixels wide, it will appear 20 pixels wide on the screen because we have an isometric view of the world (i.e. things don't look smaller if they're further away).

The yellow triangle is supposed to represent the angle "A" between the ground in the game world and the eye.

The distances z' and y' represent the scaled depth and height of the object as seen by the eye. The factor by which they are scaled depends on the angle "A" as follows:

z' = sin(A) * z
y' = cos(A) * z


So the question is, what should the angle A be? Furthermore, is it something that would be hard-coded in the engine or something that may vary from game to game (I'm thinking of the documentation here: Is this going to be an "Adonthell-only" thing or a general thing).

Personally, I think A = 30 degrees might be a good choice. It gives the following scaling factors:

z' = 0.5 * z
y' = 0.866 * y

Having the depth scaling being exactly a half is quite convenient IMHO.

For example, if I wanted to make a cube shaped object for the game - say a wooden crate for example - and I decide it should be 40 pixels wide - I can use the scaling factors to calculate that the vertical side should be about 35 pixels high and the top surface 20 pixels.

I can use this to my advantage when making the gfx too by starting with a flat crate texture at 40x40pixels:

PNG image



...and then scaling two copies as described above (and lightening the top one) I get a finished crate like this:

PNG image



Placed on a floor of square (in the game-world) tiles gives something like this:

PNG image




Given that NG fits in quite nicely here, I guess we must have assumed (perhaps even agreed) 30 degrees in the past. I just want to confirm this really since it's not documented as far as I can see.

Comments?

^_^

                        - James


* Regarding the engine internals. This angle stuff also impacts how characters move in each dimension. Using the 30 degree angle as above a character travelling at the same speed in each direction (in game-world terms) will travel twice as much distance on the screen horizontally than they will when walking vertically.

--
Personal site:
http://cirrus.twiddles.com/

_______________________________________________
Adonthell-artwork mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/adonthell-artwork

--
Personal site:
http://cirrus.twiddles.com/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]