Terrain, Maths and hills

Blitz3D Forums/Blitz3D Beginners Area/Terrain, Maths and hills

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thanks Steve but all that does (Before and after adding to MinHeight) is make a spikey point on the terrian.

I have come up with this:-

radius = radius + (TerrainHeight(terra,x,z));+0.3
For xx=-radius*5 To radius*5
		For zz=-radius*5 To radius*5
 			x1=xx+x
 			z1=zz+z
 			e#=Sqr(xx*xx+zz*zz)
 			
			
			h#=(radius#/10)-(e/Sqr( (radius)*(radius) + (radius)*(radius) ) )
			If h# > TerrainHeight(terra,x1,z1)
 				h1#=-Cos(h*180.0)/2.0+0.5

 			        If h1<0.0 Then h1=0.0 
 			        If h1>1.0 Then h1=1.0 
	 
			
 			ModifyTerrain terra,x1,z1,h1
			End If 
		Next
	Next


Which grows the hill, but when it begins to sprout from the ground its more of a upside down funnel than a hill until it gets half way before forming a nice roll, then when the top of the hill hits the 1.0 ceiling it then expands into a craggy mess!?!


I'll plug away, it'll come eventually, but I was just hoping someone would have something on hand...

Dabz