Orthographic view

You think of something which could be added to TA3D post here! /
Vous pensez à quelque chose que l'on pourrait ajouter à TA3D, postez ici!
Post Reply
User avatar
AF
Administrateur - Site Admin
Posts: 139
Joined: Thu Dec 28, 2006 8:19 pm
Location: NW UK
Contact:

Orthographic view

Post by AF » Sat Dec 15, 2007 4:50 am

For lower end systems we could display the game orthographically rather than using a perspective view. Then shadows would become simpler and we could draw the ground texture flat, among other options to cater for the lower end systems.

Things such as billboarding matrices would be easy too.

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sat Dec 15, 2007 11:10 am

Well, ta3d is not so resource-demanding game, just set resolution smaller or reduce water quality. Next step - avalaibility to play TA3D on mobile phone or Palm. Kill me.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Dec 15, 2007 11:52 am

Hm, TA3D uses OpenGL to render everything, using an orthographic view instead of a perspective one won't increase much performance because even if you draw a flat map you cannot keep all the map in a single texture that can be displayed as a signle bitmap (it would require too much memory). If you do like in TA, then you simply do like TA3D but using an orthographic matrix instead of a perspective one. Rendering the map is very fast, drawing shadows won't be faster on orthographic view, the most resource demanding thing is the simulation engine itself (units, weapons, ...) because it runs more simulation steps than TA does (because we need smooth animation) and because it uses floating point data instead of integer (TA only uses integers).

Also TA uses 8bits textures ... which require less memory, whereas TA3D uses 32bits textures (ok they're compressed but the point isn't memory consumption) and render in 32bits mode (so it'll be slower on low-end systems because of this, since the video card does all the rendering (whereas TA uses only CPU & 2D accel) we cannot change this).

Also remember that at the moment lots of things are not optimized !! For example shadows are very slow to draw (even if it's hundreds of times faster than the first shadow renderer TA3D had).

Currently there is one thing I could do for low-end systems : add an option to run TA3D in 16bits mode instead of 32bits mode. It would require a bit less video memory, and render a bit faster on old video cards (even a GeForce FX 5200 won't see the difference !!).
=>;-D Penguin Powered

User avatar
AF
Administrateur - Site Admin
Posts: 139
Joined: Thu Dec 28, 2006 8:19 pm
Location: NW UK
Contact:

Post by AF » Sat Dec 15, 2007 7:30 pm

The same could be said of populous 3. It was a 3d sphere map but the engine took advantage of the camera to make lots of short cuts.

The assumption that the ground is flat and there's no perspective can lead to a slew of short cut optimisations. Shadows for one would be a simple re-rendering of the units using a squashed matrix.

While it wouldn't really matter for the current modern computer or the not so old computer, we do have an ageing legion of PCs and users running OTA who couldn't move to ta3d or spring even if they wanted to without splashing out on new hardware.

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sat Dec 15, 2007 8:25 pm

I`m voting against this idea.

Till time when TA3D reach 1.0 version - PC hardware will be able easilly handle TA3D engine.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Dec 15, 2007 10:03 pm

the point is using an orthographic view implies rewriting the MAP class (the part of the engine that load and draw the map). Because if you want to optimise something, then you'll have to change the way it handles the data. Currently it doesn't do any extra calculation that aren't required !!! I mean, once you've computed reverse calculations for TA's view, you don't need to do it again, it 's stored and used as the geometry for the drawing. Neither texturing could be optimised ... it's already working the way it works in TA, excepts that it's optimised for OpenGL textures.

I am sorry, but for now I don't really see how you want to optimise this part of the engine (which is the less resource demanding part of the engine !!!). If removing the texture filter increase performances then the computer probably won't be able to run with a few units ... deactivating particles and other effects will increase frame rate even more !!

I've just added a texture cache system to TA3D, it stores only compressed textures. And the cache it creates is more than 40Mo !! And this doesn't include map textures of course ... This means TA3D needs more memory than TA.

On my computer, with a few extra *.ufo TA3D takes ~257Mo (on a 32bits system it would take less).

As far as shadows are concerned, yes it would be faster, but I don't see why you would activate shadows in a mode that won't increase much performances.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Dec 16, 2007 9:25 am

We can greatly increase perfomance by converting TA3D maps to 2D, using orthographic projection, switching 3d models with unit sprites. This will allow using more simple pathfinding, since only 2 plane coordinates must be calculated withought height one.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Dec 16, 2007 11:03 am

Current pathfinding algorithm uses only the height map provided by TA maps ... there is no link between the renderer and the internal simulation which simulate TA behaviour (except the fact that it runs more simulation steps)
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests