Using Prefabs in Unity / Jibe: A few things to keep in mind

393 views
Skip to first unread message

Jon Brouchoud

unread,
Mar 26, 2011, 12:27:15 PM3/26/11
to Jibe and Unity3d
This is somewhat related to the 'Good Places to Find Content' thread,
but I want to address some key points about using prefabs in Unity /
Jibe builds.

Using prefabs is a great way to save time and development budget, and
to get a project up and running very quickly without having to spend
the time and money developing a custom environment. I personally use
prefabs in almost every project, and generally use Turbosquid, which
works really well. However, there are a few things to keep in mind
when building a scene with prefabs.

First, not every prefab available on sites like Turbosquid is feasible
for using in a Unity / Jibe project. In fact, the vast majority of
those models are designed to be used in complex renderings or
architectural illustrations where realism is the priority, and using
high-poly models only results in a longer render time. They aren't
all designed to be used in 'realtime' engines, which has very
different requirements. A large number of the models found on Google
3D Warehouse are also very high poly, and don't work well in a Unity /
Jibe environment for this reason.

Here's why 'realtime-ready' prefabs matter. As you move through a
space in Unity, the scene is generating 'draw calls' determined by a
variety of factors including poly count, realtime shadows, etc. You
can see your scene's Draw Call count by looking at 'stats' (I think
that's it... I don't have it open at the moment). If your scene is
exceeding 300 or 400 Draw Calls at any point as you test the
environment, you may want to consider optimizing the scene so users
don't experience decreased performance / lag. The reason I mention
this, is because as you browse for prefabs, being mindful of polygon
counts can really help optimize your Unity / Jibe scene. For example,
you might be able to use a really fantastic model of a robot in your
scene, which generates Draw Calls in the 400 range. This might be
fine, as long as it's the only thing in your scene... If you intend
to populate the scene with other objects, they will also generate draw
calls, and the scene could start to perform poorly. Knowing what to
look for in a prefab search and/or purchase is key.

One way to vet the prefabs you're reviewing is to add the keywords
"low poly" "game ready" and/or "realtime" to your searches. In sites
like Turbosquid, this will narrow the results to prefabs that are more
likely to work well in your scene. Some will have screenshots showing
the mesh of the prefab, and by reviewing that image you can get a
sense of how complex it is. (btw, adding a single light with
'realtime' shadows doubles the number of draw calls. each new
realtime light doubles it again... so, the key to optimizing your
scene is baking shadows, or avoiding / limiting the use of realtime
shadows).

Even if the prefab says its realtime / game ready or low poly, there's
a chance it still may not work well for your scene. With prefabs, you
never really know how well it will work until it's in your scene.
I've purchased *lots* of models that looked great in the screenshots,
but turned out to be almost useless in Unity / Maya. Trial and error
is the way to go.

Another thing to consider when using prefabs is design consistency.
If you purchase a variety of prefab models that were each created by a
different artist, with a different modeling style, your scene can
quickly become somewhat eclectic and lack design / quality
consistency. For this reason, you can often recognize a build created
exclusively with prefabs. You may wish to hire a custom designer to
create the 'shell' or main concept of your build, then utilize prefabs
work best for context and entourage. This strategy takes the best of
both worlds, by enabling you to enjoy a custom-built environment,
specifically designed around your organization and design goals, but
you also get to save considerable development cost by populating the
scene with prefab entourage and contextual elements instead of hiring
someone to design all of the content from scratch.

It's also important to keep licensing considerations in mind when
purchasing prefabs. Read the license carefully! If you ever intend
to release or resell your project, you'll need to be very careful
about the prefabs you purchase and employ. Again, if the project is
simply a prototype or pilot demo, then prefabs are a perfect way to
get a quick start. But if you're developing something you intend to
be longer lasting, and to grow over time, just be mindful of the
license and prefabs you make use of.

Another point related to licensing is to keep track of who you want to
hold the license. Since many licenses are non-transferable, you will
want to be careful about who makes the purchase and holds the
license. This isn't an issue for most projects. But if, for example,
you're representing a university and hire a contractor to create a
Unity / Jibe scene for you and they make use of some prefabs in the
project, it might be best if you purchase the assets yourself. If
your contractor makes the purchase, they technically own the model and
hold the license. This may be fine, and every license is different,
but it's something to be aware of.

I hope this helps! Prefabs can be a huge time and budget saver, and
hopefully this info will help save even more time and money in your
project's development.

Good luck!
Jon Brouchoud

http://www.jonbrouchoud.com




Neil Canham

unread,
Mar 26, 2011, 4:36:42 PM3/26/11
to jibe-and...@googlegroups.com, Jon Brouchoud
Wow - Jon thanks for that - very enlightening - this group is proving an excellent resource already!

John "Pathfinder" Lester

unread,
Mar 26, 2011, 4:49:04 PM3/26/11
to jibe-and...@googlegroups.com, Jon Brouchoud, Neil Canham
Outstanding info, Jon.  Thank you so much for sharing it.

I've pinned this thread to the top of our Google Group so folks will always see it. 

Eric Hackathorn

unread,
Mar 28, 2011, 6:00:14 PM3/28/11
to Jibe and Unity3d
If you use a program like 3DS Max for your modeling the "ProOptimizer"
modifier can quickly take a high polygon asset and make it much more
game friendly.

Jake Goldberg

unread,
Jun 27, 2011, 10:59:54 AM6/27/11
to jibe-and...@googlegroups.com
Can an object created using another program, such as Google SketchUp, be imported to 3DS Max and there simply "Optimized"?

Jake

Kyle G

unread,
Jun 27, 2011, 11:04:11 AM6/27/11
to jibe-and...@googlegroups.com
Yes!

On Mon, Jun 27, 2011 at 10:59 AM, Jake Goldberg <jak...@gmail.com> wrote:
Can an object created using another program, such as Google SketchUp, be imported to 3DS Max and there simply "Optimized"?

Jake

--
You received this message because you are subscribed to the Google Groups "Jibe and Unity3d" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jibe-and-unity3d/-/VV4jlV4k0Y8J.

To post to this group, send email to jibe-and...@googlegroups.com.
To unsubscribe from this group, send email to jibe-and-unity...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jibe-and-unity3d?hl=en.

Doug Danforth

unread,
Aug 16, 2011, 9:56:01 AM8/16/11
to Jibe and Unity3d
I have a basic question about fidelity in Unity.

If I have a building with one room that has very high quality objects
and a neighboring room with objects more suited for, say a web player,
will the high fidelity room affect game performance while I am in the
normal room?

Thanks,

Doug Danforth

Peter Bengtson

unread,
Aug 16, 2011, 10:01:24 AM8/16/11
to jibe-and...@googlegroups.com
Not if you set up occlusion culling correctly. Otherwise, the complex objects behind the wall will be drawn anyway, unless you point your camera in a direction where frustum culling kicks in.

/ Peter

> --
> You received this message because you are subscribed to the Google Groups "Jibe and Unity3d" group.

Kyle G

unread,
Aug 16, 2011, 5:25:20 PM8/16/11
to jibe-and...@googlegroups.com
Absolutely correct and well stated Peter.  One thing you might consider is level of detail models.  For example make a low poly version of the high fidelity room then trigger a higher quality version to instantiate when users approach the entrance of the high fidelity room or when any users enter the room etc.  This may not work for your particular use case but is a good option overall for balancing your level design.
Reply all
Reply to author
Forward
0 new messages