Hi.

My post will be choleric, sorry for this in advance.

First of all I should tell you about problems in textures.
Many textures have dimentions of size NOT power of two.
They are
Quote
camo\AH64_RHS.bmp
camo\AH64_STINGER.bmp
camo\CHROME.bmp
camo\flag BMF.tga
camo\HIP_WHEEL.bmp
camo\LEFT_MFD_KNOB.bmp
camo\LOW_EYE.bmp
camo\RAH66_LIGHT.bmp
camo\RIGHT_MFD_KNOB.bmp
camo\SW_EYE.bmp
camo\SW_MOUNT.bmp
camo\SW_MOUNT_RT.bmp
camo\VIPER_GRILL2.bmp
camo\VIPER_LIGHT.tga
camo\VIPER_R_PANEL.bmp
cockpit\ah-1z-cockpit\LEFT_V_IP.bmp
cockpit\ah-1z-cockpit\VIPER_CKPT_FRAME_II.bmp
cockpit\ah-1z-cockpit\Z_CKPT_SIDE_PANEL.bmp
cockpit\ah-1z-cockpit\Z_CKPT_SIDE_PANELII.bmp
cockpit\ah-1z-cockpit\Z_PEDAL.bmp
cockpit\ah-64d-cockpit\AVCKPT_HELMET_TOP.bmp
cockpit\ah-64d-cockpit\AVCKPT_TWISTKNOB_BASE.bmp
general\RUSSIAN_PILOT_V1_MAP_2.bmp
general\US_PILOT_V1_MAP_2.bmp
I think they must be resized.

Some BMP files are 32-bit, while EE uses only 24 of them. It leads to problem when these files are used outside of EE (in Lightwave, for example).
Quote
camo\66_ANTI_RADAR_PAINT-D.bmp
camo\66_BAY_DOOR-D.bmp
camo\66_FUSELAGE_GRILLE-D.bmp
camo\66_GENERIC_PAINT-D.bmp
camo\66_HATCH1-D.bmp
camo\66_HUB_HOLES-D.bmp
camo\66_ROTORHUB_BLUR-D.bmp
camo\HIP_UNDER_MK1-D.bmp
camo\HIP_UNDER_MK1.bmp
cockpit\ah-64d-cockpit\AVCKPT_CPG_DOOR_KNOB.bmp
cockpit\ah-64d-cockpit\AVCKPT_THROTTLE_GRIP.bmp
cockpit\mi-24v-cockpit\HINDCKPT_BLACK_RUBBER_PIPE.bmp
cockpit\mi-24v-cockpit\HINDCKPT_COMPASS_HOUSE.bmp
cockpit\mi-24v-cockpit\HINDCKPT_FANBLADE.bmp
cockpit\mi-24v-cockpit\HINDCKPT_FRONT_COVER.bmp
cockpit\mi-24v-cockpit\HINDCKPT_GLARE_SHIELD_RUBBER_EDGE.bmp
cockpit\mi-24v-cockpit\HINDCKPT_VERICAL_VELOCITY_INDICATOR.bmp
cockpit\mi-24v-cockpit\HINDCKPT_WAYPOINT_LETTERS.bmp
cockpit\mi-24v-cockpit\HINDCKPT_WIRE_CLAMP.bmp
terrain\thailand\TERRAIN_THAI_TRACK.bmp
I think they must be re-saved in BMP or TGA 24-bit.

I think EE should check for unexpected file formats on textures load.

The more serious question is alpha channel values. textures.bin have that value inverted and that's why all external files became to use it inverted too. Why? Again, when we use that file outside of EE (in Lightwave, for example) it's impossible to use ordinary.
TGAs can be converted with "dir /s /b *.tga | inv_alph.exe" in "textures" directory where inv_alph.exe in made from the following
Code
#include <stdio.h>
#include <string.h>
#include <assert.h>

char filename[1024];
unsigned width, height;
unsigned char data[4 * 4096 * 4096];

int load(void)
{
	unsigned char header[18];
	unsigned size, i, j;
	FILE* f = fopen(filename, "rb");
	assert(f);
	fread(header, sizeof(header), 1, f);
	assert(!(header[1] || (header[2] != 2 && header[2] != 10) || (header[16] != 24 && header[16] != 32) || (header[17] & 0xD0)));
	if (header[16] != 32)
	{
		fclose(f);
		return 0;
	}
	width = ((unsigned)header[13] << 8) | header[12];
	height = ((unsigned)header[15] << 8) | header[14];
	size = width * height * 4;
	if (header[2] == 2)
		fread(data, size, 1, f);
	else
	{
		unsigned char count, offset = 0;
		unsigned char buf[4];
		do
		{
			fread(&count, 1, 1, f);
			if (count++ & 0x80)
			{
				count -= 0x80;
				fread(buf, 4, 1, f);
				while (count--)
				{
					memcpy(&data[offset], buf, 4);
					offset += 4;
				}
			}
			else
			{
				unsigned size;
				size = count * 4;
				fread(&data[offset], size, 1, f);
				offset += size;
			}
		}
		while (offset < size);
	}
	fclose(f);
	if (!(header[17] & 0x20))
		for (i = 0; i < height / 2; i++)
		{
			unsigned char* a = &data[i * height * 4];
			unsigned char* b = &data[(height - i - 1) * width * 4];
			for (j = width * 4; j--; a++, b++)
			{
      			unsigned char c = *a;
				*a = *b;
				*b = c;
 			}
		}
	return 1;
}

void save(void)
{
	FILE* file = fopen(filename, "wb");
	assert(file);
	fwrite("\0\0\002\0\0\0\0\0\0\0\0\0", 12, 1, file);
	fwrite(&width, 2, 1, file);
	fwrite(&height, 2, 1, file);
	fwrite("\040\040", 2, 1, file);
	fwrite(data, width * height * 4, 1, file);
	fclose(file);
}

int main(void)
{
	while (fgets(filename, sizeof(filename), stdin))
	{
		filename[strlen(filename) - 1] = '\0';
		if (load())
		{
			unsigned char* data = &data[3];
			unsigned size;
			for (size = width * height; size--; data += 4)
				*data = ~*data;
			save();
		}
	}
	return 0;
}


Now back to topic.
I made some fixes comparing to the previous version http://SimHQ.com/forum/ubbthreads.php/topics/4196627/
Fixed alpha handling, improved material conversion (it's still not perfect). Enabled muzzles and smoke, improved terrain support (noise).
Both small utilities can now change ambient light with U, I, O, P with and without Left Shift.
Terrain utility now uses custom true colour textures.

https://ufile.io/sxjlf

Unpack the archive into "cohokum" directory. Executables are in "ogre3d" directory.
Run them, choose either OpenGL or Direct3D9 renderer.
When choosing Direct3D9 please also choose "Floating point: consistent".

If your system supports nVidia 3D Vision, running with Direct3D renderer in Full-Screen mode will use that feature. Someone asked about VR support - as you can see it's a leap in that direction.

In game the most usable thing is "Combat/Demo" still.

FireBird