Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Animated texels or not?  (Read 289 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Animated texels or not?
« on: July 26, 2024, 02:10:01 AM »

Here's an issue about which I suffer a certain degree of confliction. And that is the employment of animated texels for certain effects. Here's the root of the problem. Any effect particle to which is tied a texel cannot vary in size. A 'static' texture does not cause this strange limitation; from first appearance to disappearance, the particle can be made to grow or shrink as desired. But texel-based effects are constrained to remain at constant size for the full duration of their existence. I know not why, but have accepted this as being some limitation in the graphics handling routines.

If an .eff file uses a texel and specifies the size to grown from, say, 5m to 10m during the period of its LiveTime, the game engine sets a fixed size midway between these limits, that being 7.5m; from first appearance until disappearance the effect particle size is stuck at 7.5m. This is unsatisfactory if the desire is to set an evolving size variation.

An example would be the fuel leak fireball effect I've expanded upon. When I first encountered this effect in an effects mod (by Western???) some years back, it used a texel. And I've continued to use a texel, as the appearance is very satisfying in its dynamic aspect. But the fixed size has always bothered me. I would rather see the fire commence at a smaller size at the origin of the leak, expanding thereafter as the fuel disperses in the slipstream and the fireball grows accordingly.

And so I'm juggling whether it's best to use the 'prettier' texels always stuck at some fixed size, or instead use non-animated textures which can be made to alter in size. It really is something of a 'Sophie's choice.' ;)

Anyone have any opinions on the matter?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23929
  • Taking a timeout
    • STFU
Re: Animated texels or not?
« Reply #1 on: July 26, 2024, 04:26:11 AM »

My Two Cents: Consider using "texels" (IL-2's pseudo animation for textures) only if it's absolutely necessary and there's no alternative way to achieve the desired outcome. The primary reason? Performance.

In OpenGL, there's no built-in texture animation feature, especially not in the version used by IL-2. Texels effectively represent a set of separate textures that are loaded and rendered in a looping sequence. While this isn't an issue when dealing with a small number of such textures drawn by the renderer, it can become problematic—especially for less powerful systems—when you're dealing with a thousand "texels" simultaneously.

So, if scaling or rotating individual textures achieves a similar effect without resorting to a sequence of pseudo-animated ones, opt for the single texture solution. It'll save your client from potential performance woes!

]cheers[
Mike
Logged
Don't split your mentality without thinking twice.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: Animated texels or not?
« Reply #2 on: July 26, 2024, 09:08:39 AM »

Mike,
Because texel looping seems to occur even while not being drawn, would this present an additional--or perhaps even the primary--performance hit?

As to the number of texels to be watchful of drawing simultaneously, I presume that this would involve not so much the repeated instances of a given texel, but more the number of unique ones. For instance, we have long been using the Guncam tracer texels, which at any moment can have a goodly number of them being drawn. And this includes the potential for a number of discrete texels for different colors (and calibres, as from the 7mm and 20mm folders.)

I can have lots of texels in operation to little or no seeming detriment (i5 @ 4.8GHz and RTX 2060). Bigger performance hits arise--BY FAR--when setting effects=2.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: Animated texels or not?
« Reply #3 on: July 30, 2024, 07:22:37 PM »

I have changed to single textures for a number of effects in which I have been using texels. In most instances the visual appearance is still fine, in spite of the less 'dynamic' action. I cannot discern any improvement in performance, but that's probably because my 'puter is reasonably capable.  ;)  I've also removed a small number completely, they making only a fairly minor contribution. I'm pondering further retrenchment to the simpler mode for some other effects, but if I do it won't be for many others as those still using texels really do benefit from them.  ;)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.036 seconds with 25 queries.