Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,618 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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