How to write fire effects in VC? Can you give me some advice?

Updated on culture 2024-05-07
6 answers
  1. Anonymous users2024-02-09

    There is not much difference between OpenGL and D3D in terms of functionality, and D3D that OpenGL can make can also be.

    I learned OpenGL, I don't understand the specific implementation of D3D, but let me tell you about the method of doing fire effects in OpenGL, because the concept of 3D is the same, so this production method is not limited to OpenGL, and it can definitely be made with D3D.

    Commonly used fire effects are divided into Burning and **.

    How to burn: Generate a series of particles (which are actually a square face with a pre-patterned particle texture) at the center of the combustion, which looks like particles. Particles are rendered using alpha blending, where the color of the source is multiplied by alpha and the color of the background is multiplied by 1 - alpha, and then blended together to become the final color.

    Each particle decreases alpha as it rises, until it is completely transparent (alpha = 0). At regular intervals (e.g. new particles are generated, the newly generated particles appear at random locations near the center, and then the alpha decreases as they rise, as described earlier). In this way, many particles rise and fade, and together they become like flames.

    **Method: The principle is similar to that of fire, but the particles do not fly in the direction of upwards, but in all directions, and gravitational acceleration can also be added.

    Here are a few examples for you:

    This is a typical particle texture. The particle is done by pasting the texture onto a small rectangle and rendering it using alpha blending. Note that when generating this texture, the alpha value of each pixel should be consistent with the color value, and the farther away from the center, the smaller the alpha.

    Here's a screenshot of a well-made fire effect. Here you can also vaguely distinguish the individual particles. Fire and other special effects are basically made by particles, and multiple particles can be combined in different ways to create various effects.

    The color in this fire effect can be achieved by setting the color of the particles, such as giving the particles a high red value, a low green value, and a very low blue value, so that a single particle is red or orange, multiple particles are yellow when stacked, and if enough particles are stacked, it is white. This is perfectly consistent with the flames.

  2. Anonymous users2024-02-08

    There's a lot of talk upstairs, come and learn.

  3. Anonymous users2024-02-07

    First of all, we must correct one of your misconceptions: VC can be eaten during the day, and VC taken internally will not see the light and will be absorbed by the body. Skincare products containing VC used externally are used at night because photooxidation occurs during the day, which is different from internal use.

    However, taking VC internally requires long-term persistence to be effective, and it will take at least a year to see the effect, and the effect is not very obvious, but if you take VC for a long time, you need to go through the doctor's advice first, because any VC product has additives in it, and long-term use is a certain amount. And it must be natural VC, synthetic VC can cause stones when taken for a long time, which is harmful to the body.

    Many people have taken the VC of Yangshengtang and Fancl, but they have not heard that they have particularly good effects, and most of them are also psychological. In fact, don't blindly believe in advertising, the so-called additive-free, pure natural, are just the selling point of the business, just imagine, if it is additive-free, pure natural products, just like the oranges and lemons we usually eat, are not generally spoiled after a few days? If you think about it, you understand.

    Taking these things for a long time is definitely ***.

    In addition, I would like to remind you that the key step in whitening is not to take it internally, nor to whiten skin care products, but to protect against the sun! Only by doing a good job of sun protection can we achieve the premise of all whitening. If you are always exposed to the sun, no matter how much you rub the product, it will be useless, and the effect of internal administration is very weak.

  4. Anonymous users2024-02-06

    1. Transition animation scaling: used to display special effects and animation effects. For example, the zoom effect when the window is opened and closed, and the fade effect of window switching.

    2. Functional application:

    1. If mobile phone users pay attention to the hidden bridge function of the mobile phone instead of the picture effect, they can turn off this option to reduce the power consumption of the mobile phone and improve the smoothness of the mobile phone.

    2. The option configuration item is adjusted to be the fastest transition speed of the animation effect, and it will be stuck when the stove skin is opened, and the time of the card is shorter than the fade animation time, so the speed of eliminating the collapse is relatively faster.

  5. Anonymous users2024-02-05

    Not necessarily, but MFC is more convenient for interface design.

  6. Anonymous users2024-02-04

    If the landlord uses VC++, it is better to learn MFC

Related questions
6 answers2024-05-07

Want to promote the first to suppress, want to suppress the first to promote, before and after the formation of a sharp contrast, highlight the key points, make the article more exciting, to leave a deep impression on the reader, today we walk into the narrative expression of the combination of the combination of inhibition.

12 answers2024-05-07

()"update_result").innerhtml=;

updatedb").disabled=true; >>>More

11 answers2024-05-07

Check, folder or file, right-click, select Properties, tick Hide, refresh, if, you are in the folder options, it is the default, the hidden file or folder, will be hidden because of the refresh, if the folder is selected, show all files, then that file and folder, will be looming. >>>More

12 answers2024-05-07

A must-do for bread beginners: butter rolls.

If you're still wondering what bread would be better for bread beginners and have a low failure rate, this butter roll might be your best bet! >>>More

6 answers2024-05-07

Steps to make lemon black tea:

1.Marinate the lemon first, wash and slice the lemon, and put a layer of sugar in the bowl first. >>>More