BIG lags

hello

i have been experimenting with unity for a week now. im usually a flash developer but i like the program very much. its easy and it went out best in the comparison. :smile:

you can take a look at the screenshot of my project.
i would like to know the reason for the big lags (scene and game mode, and release). the biggest model is 971kB. my assets are 5,90mb in total.

is it possible to make a construction like this work fluently. i took out all chairs and lights except of one already. didnt get much faster. what are the mistakes? help and tips much appreciate.

my system:
AMD X2 2,6 GHz
ATI HD4850 1GB
6GB RAM

we also want to publish for iphone? possible or not?

thank you.

Without the stats there is pretty little to say.

I would guess that either the code is related to it or that you have masses of detailed small objects that are actually totally flooding the card

As for the iphone usage: depends a bit on how those models are setup. On the iphone, you have a poly budget of 10k - 12k static in view, so with that room, that more or less means the whole room has too meet that as there isn’t much to gain with occlusion culling other than things like the books etc in the shelfes which you likely will have to get rid of anyway, replacing them with a texture for the whole front side of the shelf.

“masses of detailed small objects that are actually totally flooding the card” - thats a good title for my game.

im living in the past. i think of waiting some years.

Perhaps you have set the convert meshed to collider in the import from model to scene. If you have lots of small object with detailed meshes, you really can get lots and lots of colliders that need some calculation every frame.

When you view the model in the project window you have a tickbox that sais something like “Convert meshed to collider”. Perhaps you can recreate the room and uncheck that setting. Perhaps that can help a bit…

i could fix it now by replacing all keyboards with cube+texture and deleting all books. now and i get serious 6FPS. i could take out all pcs but then the room is empty. T_T

no colliders as far as i see. thanks for the tip.

there are too much light in this scene that u could replace with light maps !
:sweat_smile: i donno if that will help

could you please do as I requested in the first posting and offer the stats information?

without them its all blind guessing

sorry! where to get the stats?

You click that strange button right above the game window with the text “stats” :wink:

message

210677--7744--$1896735474_1cceaafca6_110.jpg

ok clear why it dies.
3700 distinct objects and 1.6 Million vertices on 6xx’000 triangles …
unless you have a high end system, thats a granted death

I would guess you modelled significantly too often with the subdivide modifier

the room as it looks should actually fit into 10000 - 15000 polygons by the amount of details it has and needs.

On the iphone that would never ever run. likely the app would be force quit by the os due to the loading time.

thank you very much! i just go on making all objects simple.

You have a massive number of draw calls…combine objects as much as possible. From what I see in the screenshot, with the lights and so on, it should be a couple hundred at most.

–Eric

you mean putting them in prefab? im doing it now. its total chaos in there…

if you mean something else please reply. thanks for the tip.

I mean either combine the meshes that use the same material in your 3D app, or use the CombineChildren script.

http://unity3d.com/support/documentation/Manual/Optimizing%20Graphics%20Performance.html

–Eric

Also, if you are using colliders, remove them all from all objects and create invisible game objects (cubes) with a collider on the cubes and make them fit around your collidable area’s. One thing is for sure you don’t need vertex perfect collision. Box colliders on cubes works wonders.

i added the combine children script to objects and parents but it seems to have no effect
(before 3014 draw calls after 3014). what am i doing wrong?

i got rid of the draw calls and verts by setting the light to force vertex. the light looks better but the dropshadows are gone.

is it possible to use vertex light and still have dropshadows?
for some reason i dont get the lightmap to work its always overlighted and it disappears if i click the light source once.

no, shadow casting requires pixel lights.

Your main problem are the amount of distinct models … I would assume it has to do with the way you generate the model that in the end forms them through a fair amount of sub models, because even with the current lighting etc you still have over 2700 draw calls which is massive. a room like this is possible with 200-300 pretty easily by using 1 material for a whole object for example and alike

i dont understand where the draw calls coming from. i took out all non unity models and i have 444 draw calls. its only plane, cylinder and cube. please tell me why i dont get it to 200-300?