project-navigation
Personal tools

Author Topic: Animated Textures for UFOs [CODING HELP NEEDED !!!]  (Read 61992 times)

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #135 on: April 10, 2010, 11:55:42 am »
i just don't like to the idea to add content to the game which can be computed (very cheap)

i will look into the animation system of the material subsystem...
I knew that you would say something like that, because I have the same opinion on this  ;D.
That is why I wrote this feature request:

https://sourceforge.net/tracker/?func=detail&aid=2975344&group_id=157793&atid=805245

Quote from 03-28:
I had to make so many to keep repetition @ a minimum, but I could reduce
the size of most animations by factor 2 if I would have the ability to play
forwards & then backwards again. I will look @ the code after I have
finished this stuff ;)
Also there is room for optimization in better usage of the different
blendmodes & I am sure there is some kind of automation tool which will
analyze the frames & save only the differences between them, that will
reduce size drastically also, but I had no time to look for that (yet)...
I also made different color-versions of many of the animations, because
this will make the mappers work easy in 'programming' the material files &
also made animations that are just reverse to their originals. This also
would not be necessary with some code optimization... ;)
Quote end.

Or here:
    
Re: Animated Textures for UFOs [WIP]
« Reply #80 on: March 30, 2010, 08:16:15 pm »
   
Mattn, in the long term we should think about expanding the material system.
I think for someone who knows the code here like you do this would rather be easy & the effects would be minimizing the need for additional frames Wink
I would like to have some more commands:

animb - play backwards
animr - play forwards, after reaching last frame play backwards, then begin again
animp - pause the animation for x time @ frame y (animp a15 3.0)

Also we should add additional flares & envmaps, I have done experiments with that & it is working, I now can use 10 different flares with a simple command like 'flare 7', but the envmapping-function seems to have some kind of error, because it does not matter @ all which envmap you use, they look all the same in-game, maybe someone could take a look @ that also, I think there might be a bug hidden somewhere...
Quote end.

Regarding the colors. I really did this on purpose, you never could adjust the colors so exactly with the 'cryptic color command' in the material system without lot of testing & time...
This color command is nice for the flares  ;)

But this is only v2 version of the animations. There is a lot to find that could be enhanced, modified & repaired, but I think before putting all this stuff in trunk you maybe should check out this stuff in your personal version ?!

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #136 on: April 10, 2010, 12:06:11 pm »
I know that all this stuff adds a lot of complexity to the whole U.F.O.-system for someone who does not know the material system & its possibilities ;)

That is why I did not want to complicate stuff for mappers & decided to introduce a completely new folder with the frames & skins in it.

The mappers can create their U.F.O.s like they did before any of the animations was introduced & someone else can take care of adjusting the material file.

I thought: 'We have this great material system. Why not begin to use it a bit.  ;) :D ;D'

btw, I really think it would be useful to make subfolders in tex_ua to make surfing through the frames & skins easier...

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #137 on: April 10, 2010, 12:18:36 pm »
I also realized that I think there is only one corrupter map @ the moment.
I did more much animations for those monitors than currently needed, because I thought this will not stay that way.  ;)

We also now can design monitor-textures which would be 'compatible' with the animations, so that we could use the same animations (with different combinations & multiple different overlays) also on other monitors.

One example:
You can take the so2_17 screen-overlay-animation & program it to run on ufo2_13-16 monitors also as overlay. This accidentially 'fits'.

But for future texture-designs, we can make a definition where the screen must be for the overlays to run smoothly...

I also plan to make special skins & animations for the ufocrash levels, now we can make real cool stuff, like add scratches as overlay-skins over the existing textures or make exploded monitors or sparkle throwing displays  ;)...

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #138 on: April 10, 2010, 12:33:06 pm »
Maybe you have seen also, that in the new tex_ufo textures nothing is cut out. This is the 'start configuration'.

I made this, so that there will be no problems for folks who completely want to turn off the material system.

I think from the programming-standpoint it should be really easy to implement this function to turn off the entire material system (simply tell the engine NOT to read the material file @ all when the map is loaded... ).
The current function to disable the material-system did not work as I expected.

Offline Mattn

  • CaveExpress
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4830
  • www.caveproductions.org
    • View Profile
    • CaveExpress
Re: Animated Textures for UFOs [Paused]
« Reply #139 on: April 10, 2010, 12:33:56 pm »
animp would not be needed - anim has a fps parameter already.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #140 on: April 10, 2010, 12:42:42 pm »
animp would not be needed - anim has a fps parameter already.
?
But I cannot stop @ a certain frame for x time & continue afterwards  ;)

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #141 on: April 10, 2010, 12:43:46 pm »
but this is not so important, but would allow us to make a speedy animation with 16 frames with a pause before restarting  ;)

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #142 on: April 10, 2010, 12:45:17 pm »
Now I have to add the same frame over & over to make a text stay on the screen before the 'disappearing' animation starts for example...

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #143 on: April 10, 2010, 12:46:34 pm »
@ least I added a screen flickering effect to justify the additional frames somehow  ;)

Offline Mattn

  • CaveExpress
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4830
  • www.caveproductions.org
    • View Profile
    • CaveExpress
Re: Animated Textures for UFOs [Paused]
« Reply #144 on: April 10, 2010, 12:55:10 pm »
two new animation features are done now - backward looping and alternating the frames

use anima for alternating
and animb for backwards

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #145 on: April 10, 2010, 01:07:00 pm »
What does alternating the frames mean?

Offline Mattn

  • CaveExpress
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4830
  • www.caveproductions.org
    • View Profile
    • CaveExpress
Re: Animated Textures for UFOs [Paused]
« Reply #146 on: April 10, 2010, 01:07:21 pm »

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #147 on: April 10, 2010, 01:10:00 pm »
Great !
I knew that it would no problem for you @ all  ;)

The problem is that I programmed Basic, Turbo-Pascal & Java, but have not touched C (yet). So I know basic structure & programming logic, but not the exact syntax & it would have costed me much more time to do that...
THANX AGAIN !!!
[/b]
This is what I call cooperation or teamwork !!!
I will make a new version of the frames. I am glad, that I did the coding for only one material file yet  ;)

Offline Mattn

  • CaveExpress
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4830
  • www.caveproductions.org
    • View Profile
    • CaveExpress
Re: Animated Textures for UFOs [Paused]
« Reply #148 on: April 10, 2010, 01:18:56 pm »
please also try to use the color feature. having dozens of texture whose only difference is the color isn't very nice imo.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Animated Textures for UFOs [Paused]
« Reply #149 on: April 10, 2010, 01:20:11 pm »

http://ufoai.ninex.info/wiki/index.php/Mapping/Materialsystem feel free to extend
That was my plan, but I want to finish one stuff before starting the next  ;)

btw, alternating is nice also, but what would really be important regarding the framecount would be this:
a0-a15-a0-a15-a0...

so with 4 frames it would look like that:
a0,a1,a2,a3,a2,a1,a0,a1...

This would really help a lot.