x


Optimization Techniques?

So, I've got less than 5 lights, a terrain, 3 animated models with less than 3000 tris a mesh, a few low poly buildings, and a skybox.

Why is this stuttering really badly in the Web Player? We're in Firefox 3.5 on a Macbook Pro. Anyone know of anything I could be doing terribly wrong?

I've watched the Optimization video from Unite 2007, but I feel that might be a bit out dated.

Thanks

more ▼

asked Nov 16 '09 at 08:59 PM

Seantron gravatar image

Seantron
11 1 1 3

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

First, how many bones in your animated models? (in case you have a crazy number!)

Second, there are a number of settings in the Terrain engine which can affect performance. To improve performance you can:

  • Increase the pixel error. This results in more significant height-popping of terrain subsections.
  • Increase the detail distance (the distance that grass and detail meshes are visible)
  • Decrease the tree distance (the distance beyond which trees aren't drawn at all)
  • Decrease the billboard start (the distance at which tree meshes are replaced with billboards)
  • Reduce the Max Mesh Trees (the maximum number of trees which are displayed as meshes at any one time - any others will be displayed as billboards regardless of their proximity)

A screenshot or more detailed description of what your terrain is like might help solve the problem. Eg, how many splatmaps / grass textures / detail meshes etc are you using? How densely distributed are your trees?

There's a chance the above settings could solve your problem, if you have previously adjusted all these settings for maximum visual effect, and you have a lot of detailed tree meshes.

I also notice that you haven't mentioned any scripting in your post - are you using any custom written scripts, or just using built-in scripts from Unity's standard assets?

more ▼

answered Nov 16 '09 at 10:13 PM

duck gravatar image

duck ♦♦
41k 92 148 415

Much Appreciated. I'm using a few custom scripts that are in JavaScript, but I am porting over to C# for maximum speed. As for the Terrain, I have no trees, no grass. I'm going to mess with those Terrain settings, and get back.

Thanks again.

Nov 16 '09 at 10:41 PM Seantron

Porting to c# won't necessarily give you better performance (depending on how your JS was coded in the first place). It certainly wouldn't make the difference between "stuttering really badly" and good performance. What those scripts are actually doing (whether in c# or JS) could be the key though.

Nov 17 '09 at 09:40 AM duck ♦♦
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5099
x815
x472

asked: Nov 16 '09 at 08:59 PM

Seen: 4274 times

Last Updated: Nov 16 '09 at 08:59 PM