About mouse pointers
- Balthazar
- Moderator
- Posts: 2055
- Joined: Wed Nov 01, 2006 4:31 pm
- Location: Russian Federation
- Contact:
About mouse pointers
Requesting size and format of mouse pointers to make new ones.
How did they animated? Is it separate images or some-kind of looping frame sequence?
Can they be switched for 3D pointers? What format?
How did they animated? Is it separate images or some-kind of looping frame sequence?
Can they be switched for 3D pointers? What format?
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
cursors are images, well animated images, so it's a sequence of frames that is looping. There is no need for 3D pointers, you can have a 3D model and then render a cursor animation from it, you'll get a 3D cursor that way.
for size information, look at anims/cursors.gaf (with HPIView for example).
Currently cursors are stored in gaf files, but gaf only supports 8bits textures, so I'll make a new format in order to have 32 bits (24bits RGB + 8bits alpha) animations stored in a gaf like format (probably a 24bits JPG for RGB components and a less compressed greyscale JPG for alpha, it's the way 3DM stores textures).
I suggest you make 32 bits frames using alpha for transparency in .tga or .png (not jpg because it doesn't support alpha channel and it's a lossy format so it's not good when creating an image)
PS: cursors are 15fps animations.
for size information, look at anims/cursors.gaf (with HPIView for example).
Currently cursors are stored in gaf files, but gaf only supports 8bits textures, so I'll make a new format in order to have 32 bits (24bits RGB + 8bits alpha) animations stored in a gaf like format (probably a 24bits JPG for RGB components and a less compressed greyscale JPG for alpha, it's the way 3DM stores textures).
I suggest you make 32 bits frames using alpha for transparency in .tga or .png (not jpg because it doesn't support alpha channel and it's a lossy format so it's not good when creating an image)
PS: cursors are 15fps animations.
=>;-D Penguin Powered
What about implementing something like APNG or MNG?
http://en.wikipedia.org/wiki/Animated_P ... k_Graphics
http://en.wikipedia.org/wiki/Animated_P ... k_Graphics
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
I've just finished support for 24/32bits GAFs (alpha channel is saved only if needed).
It's an extension of the GAF format specific to TA3D, you cannot read those HD GAFs with TA.
Currently there is only one tool to make those GAFs: hpiview
You have to use it that way:
./hpiview create_gaf gaf_descriptor
or
hpiview.exe create_gaf gaf_descriptor
where gaf_descriptor is the name of the text file that describes the file you want to create. It's made like this:
If you want an example of this syntax you can extract the content of a GAF (any GAF type is supported) with hpiview:
./hpiview extract_gaf anims\\cursors.gaf
this command will extract all the frames within anims\cursors.gaf (note the \\, if you don't want to type \\ you can type "anims\cursors.gaf"), and it'll create a anims\cursors.gaf.txt file with the above syntax so that you can modify the frames and then put them back into GAF format (but it'll be 24/32bits GAF not TA 8bits GAF).
This feature is available in current SVN, I'll make a test release soon so you can do new cursors.
Also, can you write a page in our new wiki to explain how to create and extract frames from GAFs ? since I've created this mechanism I don't know what is obvious and what isn't.
It's an extension of the GAF format specific to TA3D, you cannot read those HD GAFs with TA.
Currently there is only one tool to make those GAFs: hpiview
You have to use it that way:
./hpiview create_gaf gaf_descriptor
or
hpiview.exe create_gaf gaf_descriptor
where gaf_descriptor is the name of the text file that describes the file you want to create. It's made like this:
Code: Select all
[gadget0]
{
entries=the number of anims you want to put in the file;
filename=the destination file.gaf;
}
[gadget1] // The first animation
{
frames=number of frames;
name=the name of this animation; // has to be set otherwise you won't be able to find your animation in the resulting GAF
[frame0] // The first frame
{
XPos=the offset on the x axis;
YPos=the offets on the y axis;
filename=the image file to use as this frame;
}
[frame...]
...
}
./hpiview extract_gaf anims\\cursors.gaf
this command will extract all the frames within anims\cursors.gaf (note the \\, if you don't want to type \\ you can type "anims\cursors.gaf"), and it'll create a anims\cursors.gaf.txt file with the above syntax so that you can modify the frames and then put them back into GAF format (but it'll be 24/32bits GAF not TA 8bits GAF).
This feature is available in current SVN, I'll make a test release soon so you can do new cursors.
Also, can you write a page in our new wiki to explain how to create and extract frames from GAFs ? since I've created this mechanism I don't know what is obvious and what isn't.
=>;-D Penguin Powered
How interesting. It would be nice for someone to write a GUI frontend to hpiview, but for now it seems sufficient.
By the way, what exactly will the new GAFs be used for other than to replace the cursor animations? I'm assuming we'll have proper 3d explosions someday, so what else are we using them for?
By the way, what exactly will the new GAFs be used for other than to replace the cursor animations? I'm assuming we'll have proper 3d explosions someday, so what else are we using them for?
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
24/32bits gafs can be used for everything normal GAFs are used:
* cursors
* explosions
* unit textures
* in game GUI (build menus, ...)
* everything I forgot
hpiview will need a frontend some day, but it would be better not to write it using the TA3D API, it wouldn't be well integrated in the desktop environment.
* cursors
* explosions
* unit textures
* in game GUI (build menus, ...)
* everything I forgot
hpiview will need a frontend some day, but it would be better not to write it using the TA3D API, it wouldn't be well integrated in the desktop environment.
=>;-D Penguin Powered
Who is online
Users browsing this forum: No registered users and 21 guests