Nanolathe

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
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Nanolathe

Post by Balthazar » Thu Aug 23, 2007 7:36 pm

Well, the old topic again :)
Zuzuf - nanolathe should be animated using green quads, not circles. It can be sprites or quad polygones, but not circles.

You can thinks about it when you`ll have time :D

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

Post by zuzuf » Thu Aug 23, 2007 9:29 pm

the nanolathe parts are sprites, look here: gfx/part.tga
you can change it, try with a square texture, and post a shot. I don't remember if there are other features that uses the same texture.
=>;-D Penguin Powered

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

Post by Balthazar » Fri Aug 24, 2007 9:28 am

Hm... there are some kind of limitation. If I use green box as sprite with size near 1/2 of part.tga - then in game it looks really like box.

But if I use green box with size more than 1/2 of part.tga, then it looks more like circle, and if size of box = size of part.tga - it looks like 100% circle.

I wonder why, looks like because of some kind blending option. Or maybe there are spherical mask for transparency...


I`ll post some screenshots... Any suggestions?

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

Post by zuzuf » Fri Aug 24, 2007 9:41 am

that's strange, the particles are drawn using alpha blending, so alpha channel is important in the part.tga file. Also particle textures are stored on a same texture to avoid switching between too much textures, but this has side effects, on particle sides it can merge sides of two textures but since until now all the particle sprites sides were fully transparent, there was no problem. When you draw a box with half the size of the texture it works because of mip-mapping (which might blur a bit the particle texture when it is far from the cam)
=>;-D Penguin Powered

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

Post by Balthazar » Fri Aug 24, 2007 10:21 am

Well, yes, I suppose it`s because of mip-mapping effect. Anyway, square particles looks pretty nice, but there are to few of them, so if you`ll set particle generation three times faster it will make very similar to TA effect.

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

Post by zuzuf » Fri Aug 24, 2007 10:25 am

well the problem is that currently the particle engine is too slow and it's very difficult to optimise it because it handles very complex particle behaviours like particle size variations (you can set even the second derivative!!), rotation, colors, ...

Currently I am replacing, everything using colors as GL_FLOAT with GL_UNSIGNED_BYTE which won't change graphical aspect but will reduce bandwidth requirements since we only work with 8bits color channels.
=>;-D Penguin Powered

theotherhiveking
Posts: 56
Joined: Sat Aug 18, 2007 6:32 pm

Post by theotherhiveking » Fri Aug 24, 2007 11:37 am

yeah optimization!!

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

Post by Balthazar » Fri Aug 24, 2007 3:50 pm

In that case maybe we should use more simple particle engine ? Yes, smoke is nice, but perfomance is more important. I`m not aware well enought in particles, so it`s up to you :)

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

Post by zuzuf » Fri Aug 24, 2007 4:13 pm

well you cannot imagine having all the particles of the same size ... so we can't use point sprites which would have greatly increased performances. On GLSL cards we could use that but with lots of modifications to current particle engine.

Maybe you're right we should have a much simpler particle engine. But currently it's not what is reducing performances, it's drawing features, which is very slow ...
=>;-D Penguin Powered

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

Post by Balthazar » Sat Aug 25, 2007 6:39 am

We cannot do all at once, so there are always something, that can be done later :)

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

Post by AF » Wed Aug 29, 2007 12:13 pm

A major optimization could be a second particle system running alongside that is much more lightweight with a smaller featureset.

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

Post by Balthazar » Wed Aug 29, 2007 3:53 pm

Bingo ! :D

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

Post by zuzuf » Wed Aug 29, 2007 4:22 pm

good idea, that should greatly speed things up!
=>;-D Penguin Powered

Joram
Posts: 3
Joined: Thu Nov 22, 2007 12:46 pm

Post by Joram » Thu Nov 22, 2007 1:42 pm

Concerning Nanolathe, I think they are too much spread across the unit, so it looks rather silly
(like if the commander was spilling nanolathe without aiming)

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

Post by Balthazar » Thu Nov 22, 2007 1:50 pm

Well, maybe you right... Maybe we shoul reduce size of nanolathing box to 70% of original size? (0,7*width 0,7*height 0,7*depth)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests