Forum Discussion
UlteriorMotif
13 years agoHonored Guest
Help optimizing my project?
Some friends and I have been working on a simple Unity project. We're all total newbies (downloaded Unity 1.5 weeks ago and no other game dev experience).
Right now we have a room that is ~ 18' x 40' that has about ~40 (mostly boxy) models in it. Each of these models has a low res video texture and sound file associated with it (isolated sound from video as it was the only way we could get them to act as 3d audio sources). Each of these models also has a light associated with it.
Shadows are off.
Three models have on-use triggers that play sound.
The models are fbx that were converted from .skp (a mix of Google 3D Warehouse and custom models).
This project is running on a Haswell 4770k, 32GB RAM and a top of the line Nvidia card ( I forget the model but it is new and ~$600).
Our problem is that we're only able to run at 7 - 40 fps. Much of the time the scene hovers around 15-25 fps. This occurs in editor as well as when running the build and appears to be a CPU load issue as reducing the resolution to 800x600 doesn't have much impact.
When standing in the far corner, looking into the room, we get ~25k CPU calls; another corner gets us 12k CPU calls. Performance is very low from both of these locations.
We're in the process of undoing some newbie error, I'm certain. We'll spend the day googling and tweaking but I was hoping that folks here might have an idea or two that could speed us along.
Anyone have a hunch?
Right now we have a room that is ~ 18' x 40' that has about ~40 (mostly boxy) models in it. Each of these models has a low res video texture and sound file associated with it (isolated sound from video as it was the only way we could get them to act as 3d audio sources). Each of these models also has a light associated with it.
Shadows are off.
Three models have on-use triggers that play sound.
The models are fbx that were converted from .skp (a mix of Google 3D Warehouse and custom models).
This project is running on a Haswell 4770k, 32GB RAM and a top of the line Nvidia card ( I forget the model but it is new and ~$600).
Our problem is that we're only able to run at 7 - 40 fps. Much of the time the scene hovers around 15-25 fps. This occurs in editor as well as when running the build and appears to be a CPU load issue as reducing the resolution to 800x600 doesn't have much impact.
When standing in the far corner, looking into the room, we get ~25k CPU calls; another corner gets us 12k CPU calls. Performance is very low from both of these locations.
We're in the process of undoing some newbie error, I'm certain. We'll spend the day googling and tweaking but I was hoping that folks here might have an idea or two that could speed us along.
Anyone have a hunch?
3 Replies
Replies have been turned off for this discussion
- CaineHonored GuestI'm a few months in to learning Unity/game dev so I don't know enough to say whether the sheer amount of the video and audio things you have going on is a deal breaker. But for optimizing in general can suggest the following:
1) For any static objects, select under 'static' - 'occluder', 'occludee', and 'batching' (you might not want to worry about selecting 'occluder' if the subject object is fairly small.
2) To manage occlusion culling, and particularly for any dynamic objects (it also does LOD) - I'd strongly suggest getting InstantOC - viewtopic.php?f=37&t=3572. I haven't bothered much with Unity's culling system, which I don't believe works with dynamic objects anyhow.
3) Checking to see if any of your models has a disproportionate amount of faces, I find this by using the 'profiler' tool when running my project and if there is a crazy high amount of faces being drawn I will delete/disable objects until I find the ones that are having the most impact. Then depending on the type of model I use blender or sketchup to reduce the number of faces as needed. I have found a number of surprising examples - in one scene I had a pair of sunglasses I didn't think much about, but it turns out it had about 800k tris; I was able to lower the number to a few hundred and largely keep the quality of its appearance.
4) Baking lights: I have yet to learn this but apparently for static lights this has a good impact.
Hope that helps. - virrorExplorerFirst, don't use models from Google 3D Warehouse, they are badly optimized and not at all good for using in a computer game. Also, you have any models with very high triangle count? Very hard to know whats wrong without having the scene to look at.
- kryptopathHonored Guestyou could start by turning some stuff off and on again, to have a clue where this drawcalls come from. first thing, turn off all of the lights except one. you have 40 lightsources in there? try switching between defered and forward rendering (playersettings). for fun, try vertexlighting to see, how the drawcalls change.
http://docs.unity3d.com/Documentation/Manual/OptimizingGraphicsPerformance.html
this should give you a quick overview to some ideas how to check your scene.
ah, forgot one thing. don't just throw geometry into unity. use prefabs. this might not be the biggest savour, but it is always worth it.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 10 months ago