performance with lots of polygons

This is my apartment:

http://staff.funnygarbage.com/colin/aptfps.html

It gets very sluggish roaming around in there, does that seem normal? Also, how can you make the FPS model able to fit through narrow gaps? I tried X and Z scaling it down, but the physics seem to still be based on the fat version of the model.

Unity does all it can to optimize rendering, but it’s constrained by two things: the graphics card, and the artwork you put it.

In your case you have a lot of polys (how many by the way?). You can get great results with a lot less (check the ZeroFractal demo in the gallery: http://unity3d.com/gallery/main/index.html ). It’s more a question of good texture work, and knowing where to burn the polygons (and where to save).

As for the PPS prefab, you could simply scale up the apartment :slight_smile:

d.

It’s also worth asking whether all these poly’s are on many different meshes, or a single large mesh. Graphics cards do better with one mesh with 20,000 poly’s than 10 meshes with 2,000 polys - if you combine meshes wherever you can, it’ll be much faster.

The report from SketchUp says it exported 24,638 triangles. That’s as 3DS format, not sure how many polygons that ends up being in Unity. This one of our new office space is below 6,000 triangles:

http://staff.funnygarbage.com/colin/fg_office.html

The apartment one is using a lot of SketchUp components, and those can be polygon heavy.

The ZeroFractal demo is certainly where it would be nice to end up, though I’m not sure the web player is quite ready for a 90 MB download!

I see a lot of small streaks along the borders of polygons - it seems to me that your polygons are two-sided. Is it a two-sided shader or are they actually duplicated with normals pointing both ways?

If you have 2-way pointing normals, you are probably confusing the hell out of the physics system, too :wink:

As for the 90MB download: It can be done a LOT smaller by separate lightmaps and diffuse textures. ZeroFractal does unique texturing of everything, including lighting.

The export from SketchUp settings were set to export two sided faces as geometry, I tuned that off. The apartment is now only about 12,000 triangles, but still drops to a very low frame rate from time to time. The office one is now below 3,000 triangles, and zip along nicely.

What’s the object count in Unity? You could try putting on a MeshCombiner at the root of your imported assets. That will gather all triangles into one mesh

That one does run much better. Also keep in mind that Sketchup Components are each exported as a separate mesh. Consider putting all these in a group and then adding the “combine children” script from the Unity Standard Assets to that group.

I can’t see where the object count appears. Also, where do I drag the meshcombiner to? When I try dragging it onto my model I get an error saying that it needs to derive from the MonoBehaviour. I’m sure that means something…

It’s strange that you would get that on the MeshCombiner script - it usually means that you’ve attempted to drag a script onto an object before it’s had a chance to compile, but I don’t see how that would be possible with one of the builtin scripts.

Object count is just the number of objects you see in the heirarchy panel that have meshes. (Unless your exporter has a way to find/specify it)

Isnt the mesh combiner an editor script that is used via the component menu?
AC

parent your objects to an empty and select the parent (or just select the parent if you already have one) then ->component menu->mesh->combine children and that’s it. double check that you have the MeshCombineUtility.cs in your assets folder (should be in scripts i believe) but you don’t drag it on to anything. there’s a 64k (i think) poly limit to it. it won’t work with more than that. as was mentioned you won’t gain anything if your objects have different materials. each material causes a render pass. or something like that…

The confusion arises because there’s two scripts, onely one which can be attached to a GameObject (and therefore that’s the only one in the Components menu). The one that’s not in the components menu is a “utility script” which is used by the other one.

You’re almost there :slight_smile:

d.