where the heck did my framerate go?

Im just sculpting a terrain that has only one text so far, and thats it. Just messing around. All of a sudden, without even having the game playing, and not even having a very large terrain (12000 x 12000), my framerate drops like a rock. I close down Unity, then restart it, but then it complains about failing to move files. From there it starts up just fine, but the framerate is still horrid… I even restarted the machine, and my framerate is still horrible. What do I do?

get a better graphic card or a reasonably sized terrain (12k x 12k is pretty large for a single terrain block) with less foliage and especially not more than 4 textures on them so you don’t take the hit from it being rendered multiple times (its rendered once per 4 textures you painted on it)

12k is pretty big…
I’d lower that and see what happens.
It would take you probably and hour with the first person controller prefab to walk that.

it helped, but the framerate is still low. I’m running a 4K terrain now…

My graphics should be ok. Im running dual core and ATI Mobility Radeon…

run it in the editor, open the stats window.
that will give you an idea whats going on

for example if your drawcalls is above 1000, I hope you have a higher mid range to high end gamer card (by dx10+ standards, so an 8800, 9800 or GTX260+ or comparable)

if you have some average card, a mobile one or 9400 - 9600 class stuff, you should ensure to remain in the 500-1000 range for your own sake :slight_smile:

Wow 12k x 12k is 56sq miles!

I know that wasn’t very helpful but just remember 1 unity unit = 1 meter

the framerate is better, but it’s still horrible when i try to modify the terrain

Have you looked at the stats window yet? If you inspect the values for drawcalls and tri/vertex count, it will give more information on where the problem lies. Also, there are other settings in the terrain besides size, that greatly affect its performance, like the size of the heightmap used or, as mentioned before, the amount of painted textures and the number of trees and details used.

All I have is one texture. There are no trees, details, just a texture. Honestly, it ran fine on my 2GB, Intel graphics laptop, it should be running just as well, if not better, on this 4GB, AMD Vision machine… it is at 1K now and i still cannot work with this…

Tomvds, i have no idea who you are but you have just made my day. Turns out, I had a spotlight in my scene (i had figured out a system for a realistic sun behaviour). I had the lighting turned on in scene view. Turned it off and bang! it’s flying faster than even my 43 mbps internet…

kind of a stupid mistake really…gotta get experience somehow…

all is not solved, though. It may be because the light is constantly moving and new shadows have to be calculated for the terrain each frame, but these are my stats…

your frametime is massive but the banner does not explain why.

I guess you have a script that does loop and never yield and thus locks the rendering out of working completely

This is my Script and hierarchy for my sun called simply “Sun”:

var RotationSpeed : float;
var isAxis : boolean;
function Update () {
	
	if(isAxis){
		transform.Rotate(0, 0, RotationSpeed * Time.deltaTime);
	}
	else{
		transform.Rotate(-transform.parent.GetComponent("Sun").RotationSpeed * Time.deltaTime, 0, 0);
	}

}

All of this is very strange. There appears to be nothing to explain your poor performance.

You don’t happen to have Unity Pro, do you? The pro-only profiler might (or might not) shed some light.

It is on trial. If i light it with a directional, i get a massive 800 fps. But it might have to do with the spotlight. That’s what cripples it to 2 fps give or take a few tenths

Now what? What is this? It’s completely stupid. This is from the Island demo (i wanted to snatch the water). It looks like some sort of patchwork quilt…

base map dist…nevermind. I found it. I feel so stupid now…