Hey all. I’ve been lurking on the forums for the past month as I tested out the 2.5 demo, and with the release of 2.6 I’ve decided to go ahead and pick up Unity Pro. Very impressive stuff.
As a quick test I took two days late last week to see how difficult it would be to throw together a decent-looking demo if I had to create all of the assets from scratch, and other than sneaking in a couple grass billboard textures I’m pretty happy with the result and thought I’d share:
You can also check out two different webplayer versions here: http://www.hero-shop.com/dev/islandtest/1.html
(I’d be interested to hearing what kind of framerate you guys are getting on this as well)
After learning to hate Flash with the release of ActionScript3, Unity is a pleasant surprise.
As a side note, if there’s anyone in the NY area playing around w/ Unity, I’d be interested in hearing what you’re up to.
Yeah, 5000 draw calls is probably a bit too much…either that or the 2.5M polygons.
I’m doing the graphics/dev on a quad-core workstation so I may be a bit spoiled framerate-wise. If anyone has any suggestions on how to get that lower without sacrificing too much quality, I’m all ears.
Ouch. From what I see, you should be able to reduce that to ~100K polygons without any noticeable visual quality loss. Combine objects that share the same material together to reduce draw calls; should be able to lower that to <500 no problem. (The actual number of objects will be quite a bit fewer, but realtime shadows/pixel lights/reflections increase the draw calls a lot.)
Thanks for the suggestions Eric. I’ll try grouping all of the objects w/ the same materials - I assume that’s what you mean by “combine” - and the trees/rocks are all terrain objects, so I’m not sure what I can do there.
A lot of those polys are in the car terrain, as the car wasn’t really built for a realtime 3D environment and the terrain is set at a resolution of 512x512 w/ a very low pixel error, because it was the only way I could really get the smaller details to show through in the actual terrain objects. I’ll have to see if I can get it lower.
Just turning off shadows (2 shadow-casting directional lights) drops the poly count by about 1.1M and the vertex count by 1.2M, which is interesting.
Edit: Oh, and thanks Bentley. Next time you talk to Al Lowe tell him you ran into someone who still holds and cherishes his original 5/4" floppies for the first Leisure Suit Larry :).
Runs at around 10-15 fps on my 8800 GT Mac Pro. At 5000 draw calls, I’m quite pleased by the performance I’m getting within the web player.
Regardless, 5000 draw calls with 2.5 million triangles is far too intensive for a scene as small as yours. Frankly, I’m not even sure how it’s possible. I doubt the problem stems from the shadows, but it might be the number of pixel lights or number of objects.
You could get that scene looking just as nice as it is and having it run MUCH faster. All you need to do is find out where the massive number of calls are coming from (check your visible object count first).
Here’s a screen video recorded full screen:
(I recommend you right click and “save as” or you will watch the file run in slow-mo until it is completely downloaded)
@Don: you are a gentleman and a scholar. Thanks for the video!
@theinfomercial: Thanks for the kind words and yes, it’s a very small scene, with most objects being extremely light on poly count. The car itself is clocking in at about 950K polys, so obviously that needs to change, and just dropping it out of the scene cuts out around 1500 draw calls (because of all the little model pieces maybe?). Between that and figuring out how to get the terrain detail I want with a lower poly count, I’m hoping I can get this running much smoother…terrain normal maps would help, but shader writing is out of my realm of expertise.
Managed to get the scene with the car down to 1.5M polys 3700 draw calls by reducing the pixel light shadows to 2 cascades. Reducing the shadow distance seems to have helped a bit as well.
I tried switching the light from the fire over to vertex light but it killed the light on the rear of the car, so had to switch it back. All told there are only 3 pixel lights in the scene, with two casting shadows, one high resolution, another medium resolution, and another no shadows. 3 lights doesn’t seem like very much to me, but my background is more in rendered 3D so maybe I’m expecting too much?
Next, the car. Thanks for the help guys, and I’ve updated the webplayers to reflect your advice.