Quote:

its probably the sky entity.
Try to remove it for testing, then the "ent" and "vis" should be the same.

Tried to remove, no change.

Quote:

Hmm, You use the older A7.862 version, try to A7.866 patch it here.
But anyway better is to testing with the newer A8.2 version from here.

Happens in both versions, 8.20 and 7.86

Quote:

could be caused by another view...
Do you accidentally include any postprocessing effect? I know that free version can't use shader, but it does can create another view

Nope, I'm only attaching materials to entities. And removing those materials doesn't fix it.

Below the crucial codes:

Entity creation
Code:
ACTOR[id]->entity = ent_create(ACTOR[id]->mesh,vector(ACTOR[id]->x,ACTOR[id]->y,ACTOR[id]->z),NULL);
		ACTOR[id]->entity->scale_x = ACTOR[id]->scale.x;
		ACTOR[id]->entity->scale_y = ACTOR[id]->scale.y;
		ACTOR[id]->entity->scale_z = ACTOR[id]->scale.z;
		ACTOR[id]->entity->pan = ACTOR[id]->pan;
		ACTOR[id]->entity->tilt = ACTOR[id]->tilt;
		ACTOR[id]->entity->roll = ACTOR[id]->roll;
		ACTOR[id]->entity->flags |= SHADOW|UNLIT|CAST;
		wait(1);
		c_setminmax(ACTOR[id]->entity);
		ACTOR[id]->entity->skill1 = id;
		ACTOR[id]->entity->skill2 = 1;
		ACTOR[id]->entity->skill3 = ACTOR[id];



Material assigment function
Code:
ENTITY* ent = NULL;
	while(1)
	{
		ent = ent_next(NULL);
		while(ent)
		{
			if(ent != ent_select && ent.skill3 != NULL)
			{
				if(ent.skill2 < 3 ||ent.skill2 == 4)
				{
					if(ent_type(ent) != 4)ent.material = NULL;
					else ent.material = mtl_terraintex;
				}
				else if(ent.skill2 == 3) ent.material = NULL;
				else if(ent.skill2 == 5) ent.material = NULL ;
				else ent.material =NULL;
				
				ent.emask &=~DYNAMIC;
				ent.flags &=~LIGHT;
			}
			else 	if(ent == ent_select)
			{
				ent.material = mtl_red;
				ent.emask |=DYNAMIC;
				ent.flags |=LIGHT;
			}
			ent = ent_next(ent);
		}
		
		if(ent_select)
		{
			if(win_ent.pos_x == -1110)
			{
				win_edit_ent.pos_x =  0;
				win_ent.pos_x = screen_size.x-300;
				LBG_update_window(win_ent);
				LBG_update_window(win_edit_ent);
			}
			if(!key_ctrl && mouse_panel)
			{		
				UpdateModelFrom();
			}
		}
		else
		{
			lock_select = 0;
			if(win_ent.pos_x != -1110)
			{
				win_edit_ent.pos_x = -1110;
				win_ent.pos_x = -1110;
				LBG_update_window(win_ent);
				LBG_update_window(win_edit_ent);
			}
		}
		wait(-0.5);
	}



The struct that's linked to entity:
Code:
typedef struct MODEL
{
	var id;
	var flags;
	var use_billboard;
	VECTOR scale;
	var x;
	var y;
	var z;
	VECTOR size;
	var pan;
	var tilt;
	var roll;
	var ambient;
	var red;
	var blue;
	var green;
	var lightrange;
	STRING* mesh;
	ENTITY* entity;
}MODEL;