Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 1,390 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A6.6 vec_to_mesh und Terraindeformierung #207563
05/20/08 19:48
05/20/08 19:48
Joined: Jul 2002
Posts: 185
T
TheZero Offline OP
Member
TheZero  Offline OP
Member
T

Joined: Jul 2002
Posts: 185
Hallo,
Ich hab eine simple Terraindeform Funktion geschrieben, welche leider nicht richtig funktioniert: Es wird immer nur 1 viertel des Terrains deformiert - wandle ich es in ein *.mdl um klappt alles wunderbar. Hat jemand eine Idee was ich falsch gemacht hab?


*.mdl deform with a highmap



same code, same funktion, but it doesn´t work with a *.hmp file !?!?
Code:
function deform_terrain()
{
	var row_x;
	var row_y;
	var vertex_num;
	var pixel;
	var pixel_vec[3];
	var format;
	var mesh_vec[3];
	
	format = bmap_lock(hmp_map1,0);

	while(row_y < 64)
	{
		while(row_x < 64)
		{
			vertex_num 	+= 1;
			pixel = pixel_for_bmap(hmp_map1,row_x,row_y);
			pixel_to_vec(pixel_vec,0,format,pixel);
			vec_for_mesh(mesh_vec,skrall_hmp,vertex_num);
			mesh_vec.z = int(pixel_vec.x/3);
			vec_to_mesh(mesh_vec, skrall_hmp, vertex_num);
			
			row_x 		+= 1;
			
		}
		row_y +=1;
		row_x = 0;
 	}
 	bmap_unlock(hmp_map1);
 	ent_fixnormals(skrall_hmp,0);
 	c_updatehull(skrall_hmp, 1);
}


Re: A6.6 vec_to_mesh und Terraindeformierung [Re: TheZero] #207585
05/20/08 23:25
05/20/08 23:25
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
It is most probably chunked:

"# Mesh deformation and water physics can be applied to nonchunked terrain only (terrain_chunk = 0). "

Re: A6.6 vec_to_mesh und Terraindeformierung [Re: Pappenheimer] #207629
05/21/08 09:13
05/21/08 09:13
Joined: Jul 2002
Posts: 185
T
TheZero Offline OP
Member
TheZero  Offline OP
Member
T

Joined: Jul 2002
Posts: 185
Danke, das wars! Ich wusste gar nicht, dass chunked Terrain standardmäßig aktiviert ist!

mfg,
zero


Moderated by  HeelX 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1