x


disabling bones and meshes when not in frustrum

Can i turn off parts of a single object when they are outside of the frustrum ?

Suppose i have this one giant object, with 20k polys in order to get only one draw call (similar to zombieville USA). Is there any way that i can tell unity to ignore specific bone hierarchies and the related skinned geometry to reduce the poly count in the frustrum ?

more ▼

asked Mar 19 '10 at 08:10 PM

vanov gravatar image

vanov
17 3 3 9

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

No, an object is either visible or it's not, so either all the geometry is submitted or none of it is. However, OpenGL itself won't draw triangles that are outside the frustrum, and the PowerVR chip won't draw triangles that are fully occluded. So just because, say, 10K tris are submitted, doesn't mean 10K tris are drawn. (But there is no way to get this info...Unity can only tell you about the geometry being submitted.)

more ▼

answered Mar 19 '10 at 08:31 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

so is it better to combine as much as possible into a single object? Maybe even the entire game ? :)

Mar 19 '10 at 09:54 PM vanov

@vanov: No, because submitting the geometry still takes some time, even if not all of it is rendered. You should try to have a good balance between individual items that can be culled separately, and having low draw calls.

Mar 19 '10 at 11:21 PM Eric5h5

thank you very much, that was very helpfull!

Mar 20 '10 at 12:27 AM vanov

but i assume it is possible to atleast hide that part of geomtry, say i "group" 10 ships, i can make one invisable durting game play (explode) ?

Mar 20 '10 at 12:50 AM vanov

@vanov: if you're using dynamic or static batching in Unity iPhone, separate objects that are not in the view frustum won't be part of the combined object.

Mar 20 '10 at 01:26 AM Eric5h5
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2001
x216
x110
x28

asked: Mar 19 '10 at 08:10 PM

Seen: 1072 times

Last Updated: Mar 19 '10 at 08:10 PM