I can use my terrain deformer for lodded terrain in latest non-published MapBuilder (the deformer code is the same as for non-lodded terrain).

however, it uses a vertex based system, and sets all the lod0 vertices under the given area, even if a later lod of the chunk is visible. simply getvertex / set c.v.y / setvertex. and afterwards I set the normals to be proper by a function using c-tracings.

here is one that sets a constant height:

Code:
void	 	TerEdit_He_SetArea()										// not brush based
{
	if (proc_status(TerEdit_He_SetArea) > 0) return;
	
	// manage undo array counters
	teredit_he_undostep++;
	if (teredit_he_undostep>9)
		{
			teredit_he_undostep = 0;
		}
	if (teredit_he_undostep==teredit_he_firstundo)
		{
			teredit_he_firstundo++;
			if (teredit_he_firstundo>9)
				{
					teredit_he_firstundo = 0;
				}
		}
	//---------------------------
	// determine upper left and lower right vertex corners, i.e. get x,y vertex count within cube area
	
sys_marker("R01");	
	
	// x,y vertex size of terrain
	var vert_count_x = ent_status(terrain_entity,2)+1;	
	var vert_count_y = ent_status(terrain_entity,3)+1;
	
	// upleft and downright tile corner positions
	var upleft_pos_x = teredit_placement_cube.x - integer(teredit_tilesize/2)*GetMapTileSize();
	var upleft_pos_y = teredit_placement_cube.y + integer(teredit_tilesize/2)*GetMapTileSize();
	var upleft_pos_z = teredit_placement_cube.z; // PosInfo3D(upleft_pos_x, upleft_pos_y);
	
	var dnright_pos_x = teredit_placement_cube.x + integer(teredit_tilesize/2)*GetMapTileSize();
	var dnright_pos_y = teredit_placement_cube.y - integer(teredit_tilesize/2)*GetMapTileSize();
	var dnright_pos_z = teredit_placement_cube.z; // PosInfo3D(dnright_pos_x, dnright_pos_y);
	
	// corner vertices slosest to corner tile middles
	var upleft_vert  = ent_nextvertex(terrain_entity,vector(upleft_pos_x,upleft_pos_y,upleft_pos_z));
	var dnright_vert = ent_nextvertex(terrain_entity,vector(dnright_pos_x,dnright_pos_y,dnright_pos_z));
	
	// protection - no valid vertex found by ent_nextvertex
	if ((upleft_vert==(var)0) || (dnright_vert==(var)0))
		{
			return;
		}
		
	// vertices in a row & column
	var width_vert  = abs( dnright_vert%( ent_status(terrain_entity,2)+1 ) - upleft_vert%( ent_status(terrain_entity,2)+1 ) );
	var height_vert = abs( integer( dnright_vert /( ent_status(terrain_entity,2)+1 )) - integer( upleft_vert /( ent_status(terrain_entity,2)+1 )) );

sys_marker(NULL);
sys_marker("R02");

	// do vertex moves
	int i,j,k;
	var m;
	for (i=0;i<width_vert;i++)
		{
			for (j=0;j<height_vert;j++)
				{
					// vertex number
					k = upleft_vert +j*vert_count_x +i;
					// protection
					if (k>ent_status(terrain_entity,0))
						{
							break;
						}
										
					m = teredit_set;	// temp test - okay
					CONTACT* c = ent_getvertex(terrain_entity,NULL,k);   			// vertex number begins with 1 !
					c.v.y = (float)m;
					ent_setvertex(terrain_entity,c,k);
					
					// actual
//					teredit_vertexarray[k-1].actual = (var)c.v.y;	
					// new undo step
//					teredit_vertexarray[k-1].undo[teredit_he_undostep] = (var)c.v.y;				// BAD - whole evrtex array must be copied to not to keep non-corresponding data !
				}
		}
sys_marker(NULL);
	
	TerEdit_He_StoreUndoStep();
	
//	wait(1);
//	c_updatehull(terrain_entity,0);		// works fine but slow
//	ent_fixnormals(terrain_entity,0);	// not okay for chunked terrain - cause error around 1st chunk border

	wait(1);
	TerEdit_FixNormals_Area(upleft_vert,width_vert,height_vert,vert_count_x);
}



Free world editor for 3D Gamestudio: MapBuilder Editor