War Thunder gaming - leden RSS

neděle 16. července 2017

Thermal stream solution

Introduction

Instead of creating and placing arrows to describe thermal stream as suggested in general suggestion about Winds and Thermal flow I suggest new way - using thermal planes. To place arrows would be too hard and slow



In the text bellow I suggest to create work space which would be box or cube. This work space would be a group of horizontal planes used to describe thermal stream. Last of all, there will be wind descriptors, which would be the vertical planes.



The horizontal planes would contain a hidden texture with a descriptive value of stream direction and power.
Boxes with thermal planes around mountains.


This suggestion describes the idea of thermal planes, wind planes and how to automate the job that it could be auto-created by program. Also I suggest to create edit tool, which would enable to made small modifications like rotation of the planes or change it's values.

Description of the generation of thermal planes

First of all a tool would be needed to calculate surfaces parallel to sea level.
To give you an idea, I have created mesh terrain in Sketchup. Then I have created 24x24m face/plane parallel to x/z axis. From the face I have created a cube (I just duplicated the top of the cube and move it down). The blue cube is space cca 24x24x25m (width x depth x height). This is space where I want to create faces which should be parallel to the map plane.



To give you idea I have added yak added into the cube.


What I need to do now is to hide or delete the faces, because this only limits the space for the job.

Now when we have the edges only (Perspective View):


I will draw small faces into the cube to give you idea what I am going to do.

I start drawing the face with 3m offset from left edge. The resulting face has 8x24m.


Now I need more faces like this. I duplicate the faces with 5m offset.


Now I need to duplicated the faces again, but in depth axis direction:


Almost done. Now I need to create Black and white texture (one byte channel). The texture will be defined by shadows direction and other factors which the creator of thermal streams should specify.

To give you idea, I set sun position to 7/18th 17:30 (UTC-7:00) and turn shadows on.




Now you see that the planes are covered with the shadows. The shadow must be projected to the plane to generate texture. The only problem is that every plane needs to have individual texture. You would be able to calculate the shadow and create a texture for the surface, but the creator of thermal streams can need to adjust the texture later.

The texture will accept these rules:

Value:
0-125 - air flows downwards (y-axis down)
126-127 - no stream up nor down
128-254 air flows upwards (y-axis up)

Note that the value does not mean temperature but a speed of the air stream.

Hence when you would create black or dark gray lines for shadows then this is right the air streams downwards because it is warm. When you would create white light gray lines for shadows then this is right the air flows upwards because it is hot

You could calculate how heavy or how warm the air is depending on air temperature and height of the terrain. There is more factors of the terrain what could have effect on the value of the shadow or light.

The size of the texture in this example is 8x24px where 1px is 1m in the 3D space.

Now I edited texture of terrain and textures of the two planes in the cube.


 So you see the texture which where the shadow of the mountain is projected. Once again, this should be made automatically by program. This was 1st plane from top.

Now the second plane from top:



Because when I turn off the textures and turn on the shadows you can see this:


Another planes (3th):


Notice that the borders of my texture are not perfect... There are mistakes but this doesn't mind.

Next plane all all back because they are completely in shadow. I would skip editing so far, but there could be gentle differences in the intensity of the shadow pixels.

When the program would generate these textures we have something like this:



Explanation

These values should indicate intensity of the air stream in the area.
Dark means the air goes down.
Light means the air goes up.

Further adjustments of the textures

Another adjustment and calculations are needed.


We need to find out how far is the side of the hill, by other words what is the distance between the horizontal plane and the mesh 1) in the same level 2) 2,5 above the plane 3) 2,5 bellow the plane. This will give us an idea about the direction of the thermal stream. This can be later used to rotate the plane.

Now we can apply this rule:

The air goes down slowly if it is close to the steep mesh terrain (mountain).
The air goes up faster if it is far away from the steep mesh terrain (mountain).

This will result in a gradient texture.


All these steps should be made by program will we get these textures which we can edit manually.


How the thermal stream would work



When the aircraft will fly through these planes which should be invisible, the wings will fly via the B/W pixels. In the place where the wing meets the pixel it works like indicator of current stream.


Intensity of the planes and resolution

In this example I used very dense planes. It is not needed to be so dense. In this particular case it would be enough if there would be only one plate in the top instead of two. The resolution here is 8x24, but I think smaller resolution like 3x8 could be enough.

There are spaces between the planes because it is not needed to collect the information "continuously". The gap between planes is 4m so the selected resolution could be 1px=4m.

These planes should be around the mountains and hills.

Vertical planes

Think about vertical planes to measure horizontal speed and direction of wind.




Manual editor of the textures

Manual editor to manipulate with the boxes or with the planes would be useful. The creator or the thermal stream should edit the textures if he needs to improve the stream to be more exact. Basic tools like rotate or move would be helpful. Also a possibility to select texture, scale it or position it would be useful. Also consider separate the thermal textures to neutral: average value 126-127, calm: average value 0-125 and warm: average value 128-254 to make simple orientation in the textures.

Every plane would have a texture. But if the textures are similar, no need to use unique texture. There are just gentle differences in the values.

Dynamical planes

It should be possible to adjust all the planes automatically to create suitable textures for every season or various extreme temperatures. The main organisation for thermal textures could be like this:

Hard Winter Textures: a) night b) morning c) noon d) afternoon e) evening
Ease Winter Textures: a) night b) morning c) noon d) afternoon e) evening
Spring Textures: a) night b) morning c) noon d) afternoon e) evening
Hard Summer Textures: a) night b) morning c) noon d) afternoon e) evening
Ease Summer Textures: a) night b) morning c) noon d) afternoon e) evening
Autumn Textures: a) night b) morning c) noon d) afternoon e) evening
* Easy / Hard - describes normal vs extreme conditions

When a map would load it would load the appropriate textures + modify them depending on current air temperature. I admit loading dynamical change of weather would be harder because at least 3 sets/scenarios of textures would be needed to be loaded into memory. For example when the sun rise up the air stream in mountains would change dramatically. Same with sunset.



Less resolution

8x24px  => 40x14,5m





Possible simplification 1kmx1km square

Another possibility would be to create very simple planes for whole map. I created 26 planes with a gap 2,5m. You can see the shadows. The animation shows them from bottom to top. The last one contains no shadows.


Size of the map: 1x1km => 414x414 px. Sufficient.

In next step I have blured the shadows (Gaussian Blur distance 4px):

It needs to correct levels yet.

Disadvantage of this method is that there are big white areas which are not used. However in next step we could use them too.

Hot flat surface

Another thing we could calculate with is flat surface which is hot from noon or afternoon sun. This could be affected by mesh (the areas which are flat and horizontal) or by the texture of terrain. Because the dry grass, desert or city would be hot areas so the color here should be brighter.

I use the light area of the terrain (the area at sea level where the shadows are not present). In the  mask I have dark water surface (not in a shadow), grass and towns.

Notice that water is cooler than the land surface.



I have desaturated the image (without shadows) and made balance of the lights.


Now I will add this texture to the base (1st plane) and I will project the shadows onto it. This is what I have:


So you see that the brighter areas are warm air which will flow upwards.

Wrong example

I believe the mask could affect all the planes. The shadows on the planes should be untouched but the white areas should be changed to reflect the mask. Yet I admit this mask is not perfect, because the road and city should be warmer (lighter) than the grass.

Corrected version:
Good example. You can adjust the brightness balance as needed.

So you can see this solution would be pretty simple. All you need to do is to consider the colors (or type) )of the terrain and add it to the original texture.

The next step is to affect the planes above by to hot air which is rising.

My idea is to use Gaussian Blur 4px and add it to the layer above. And repeat this for every plane (but I must increase the blur effect). It may not be that accurate as calculating more precisely but the idea is simple. Instead of Gaussian Blur you could use simple image resize to reduce resolution and convert it back to original resolution then.


The higher the plane is the blured the texture is.





Shadows of the Clouds


Now I have added clouds to my model. I have projected the clouds on the first plane. I will do this for every plane to get textures.


Note: These shadows are too light so I have to adjust them to be darker, hence there will be bigger contrast between light and shadow on my photos. If I would not do it, the air stream would not be downwards orientated.

I will add the textures to the textures which I already have, but instead darkening (adding) I will use multiply. This mean that the shadows of the clouds will make the calm/dark places darker. Whilst the non shadow areas will stay untouched.

Here is what I get: planes from 2,5m ASL to 65m ASL.




On a final I have decided to improve levels to the light gray areas, which are not bright enough.






Lacks of the approach

1) There is a problem with places which are in shadow but just few meters above terain. You can imagine that the aircraft flying in low altitude e.g 10m above water surface could experience drag down. In real the air would probably stay in the level it is. There could be some breeze over the water. This is described on Wikipedia in article Sea breeze.

https://upload.wikimedia.org/wikipedia/en/thumb/5/54/LAKE_BREEZE.gif/800px-LAKE_BREEZE.gif

I am not sure how to correct this problem. In a program you would probably need to establish the bottom texture on 126 px to prevent drag down. But you would need to build winds in that location where the shadows and dark areas should be present.


2) There is problem that during the bluring of the texture with shadows of terrain - the areas which are on planes higher than 10m AGL start to be too dark because of the brightness we averaged.

Solution for this would be to use different levels for different altitudes.

I tried to fixed these two problems slightly with manual edit. This is just approximation. It should be possible to get better results in program that would calculate with the AGL (altitude Above Ground Level).

Phone lines



Ability to control tank formation in Air Battles



Ability to control tank formation in Air Battles

Introduction

I would like to suggest pilots to have possibility to control group of AI tanks via leading tank in the moment when they are landed on ground. This suggestion does not include possibility to shoot from tank, but affect the direction where tanks are going, the formation and the possibility to change speed of the tank group. The possibility to control group of tanks is limited by time.

First of all, I have borrowed all this beautiful images in this post are from this blog, they are not my property and they are loaded directly from that blog. I hope the guy will not mind I show them here.



Assumption

- pilot is landed on team airfield and his aircraft is not damaged
- pilot has exited his plane and switched to headquarters room.

Headquarters room

In the headquarters room he will see a map, where team tanks groups are present. Maybe AA vehicles too. He will select a group of tanks he want to give orders. After he clicks on the group of vehicles, the game starts in a leading tank. This is the first tank which is in a group, usually defined internally by his ID

Assumptions:
- the group of tanks which you try to select is not under control of different player

The leading tank

He starts in 3D person’s view (AB) or in the commanders view from top of the tank (RB,SB). The time to control the group is limited. He can give orders, redirect the group to go different way or stay in position and then he leaves back to his aircraft to continue flying.

Limitations

The pilot could not shoot from the tank because he only gives commands to tank battalion. However he could drive them if he would like to direct the group. He could change a way the tanks are going. The tank group has it's task which they should perform in time limit, which should be big enough not to hurry. The good thing is you could lead them to go through forest instead over a road. But you could to change direction of the group to go away from the main direction completely. You could do just small modifications of speed and directions.


Time limit:
- AB: 2 minutes
- RB: 3 minutes
- SB: 4 minutes

Basic list of orders:
Basic list of orders should be implemented first it is the minimum.
1) Follow me - the group of vehicles will follow you where you go

This animation is made by me.


2) Cover yourself. The tanks should hide themselves behind the building or rock to be found.



3) Cover yourself in forest shadows. The tanks should cover among the trees.


4) Change speed - go faster or slower

5) Maintain distance among the members of the tank group - and specify if they should be close together or spread apart.

Extended list of orders:

Later when the above would be implemented formations could be added. You would select a formation and the tanks should use it.

1) Platoon Formation


2) Line Formation - there should be possibility to set distance to the line formation
- distance 20m
- distance 50m
- distance 100m
- distance 200m



3) Column Formation - there should be possibility to set distance to the column formation
- distance 10m
- distance 20m
- distance 50m
- distance 100m
- distance 200m


4) Wedge Formation


5) Herringbore Formation - with a possibility to set diameter or distance between the tanks



5) Coil Formation - with a possibility to set distance between the pairs of tanks




6) Echelon formation (This image is from TaleWorlds.com)
7) Next formations which you can find

To inform team players about commands

Every group of tanks or ground vehicles should have it's own calling sign like "Group Charlie" or similar. So when you gave an order to group of the tanks, there could be some information printed in on the screen bottom right. Something like:

Ramirez_24 commanded Tank Group Charlie to Line Formation (100m)
Ramirez_24 commanded Tank Group Charlie to hide in shadows
Ramirez_24 commanded Tank Group Charlie to Column Formation (50m)
Ramirez_24 commanded Tank Group Charlie to go forward (45 hmh)

This should prevent other players to enter the same tank group to re-command it.

Also the group on the map could be highlighted after the command has been applied.

To leave the leading tank

To leave the leading tank just press J and you should go back to your airplane or main screen.


Another assumptions

To improve the playability the tanks must not go through buildings but around them.

The buildings should discrease effect of explosions.

The marks of the tanks should not be visible when the tanks are hidden behind buildings or behind the trees.

It would be great if tree textures of some old maps would be improved, fire of trees and houses added to the air battle maps, so here we could more enjoy the ground scenery effects!


Conclusion


The ability to control the movements of group of AI tanks would be more realistic. The tanks would not sit like ducks waiting till some bomber will destroy them, but would gain an ability to defend them-self when the leader/commander would tell them that they should hide and stay in the position or go via a forest.


Resources:

The Tactics PostAll you need to know when going into the battle

Basic Tank Platoon Tactics