Page 1 of 2

Partially hidden faces

Posted: 14 Jul 2008, 06:02
by Zpock
Say you want to model something like this:

Image

There are two ways to do this:

Image

On the left it's done by having one object including all the visible edges modeled directly. The one on the right is made of two intersecting objects. Obviously the latter saves on polygons, in this case 32 triangles vs 24. But there's a lot of additional pros and cons for doing this that I will try to list:

+fewer polygons
+easier to model

-more fill rate, the hidden pixels still have to be processed.
-rendering artifacts, the depth sorting will sometimes fail:

Image

For example here the top and underlying faces are close together and have been colored, and when zooming out it starts to glitch like this:

Image

There's a lot of situations when modeling when this is applicable, for example when adding details, do you stick them on as separate objects or try to model them from the main body? Armor plating, or clothes, is another area where this comes in.

Thoughts?

Re: Partially hidden faces

Posted: 14 Jul 2008, 06:18
by smoth
if the geometry is too small to see I say draw it on as texture.

if polycount is not an issue I say one mesh.

if it isn't and you have the uv space to spare or the sides of your plate can use a solid color I'd say use two meshes.

I hope this helps.

Re: Partially hidden faces

Posted: 14 Jul 2008, 06:31
by Zpock
Yes, although it would be nice for peace of mind to just conclude one method as better and stick to it, I think you will probably want to mix it up.

I think it's kind of like the modeling theory of going no-pole, quads only, etc except that I can't really find any discussion of it on the internets. Information on low polygon and mechanical objects modeling in general is very hard to come by I think. Sadly the only thing people seem to write about is how to model high polygon human faces.

Re: Partially hidden faces

Posted: 14 Jul 2008, 06:37
by Snipawolf
Hmm, I keep hearing of these glitches with faces that are close together, yet I haven't seen it on anything I model. I never make two meshes that intersect if I can avoid it, I generally tailor the objects to fit like a glove.

My Wolf model hasn't had the issue with depth fighting and I use the multiple objects method excessively.

Heh, I still have that funny looking display on the missile launcher. I should remove it.

Re: Partially hidden faces

Posted: 14 Jul 2008, 07:18
by Zpock
Take a look at this:

Image
See how the wings opengl alredy fails at the edges in this situation?

It's not always a problem, and depends on a lot of factors both in your model and the way it's rendered. Also you might not see it directly when looking at your model, but it might look slightly worse then it would if you had done otherwise from certain angles and distances.

I didn't know the term for it is "depth fighting", which is useful for googling, altough I still didn't find that much. If you have any links to articles or discussions on the subject, please post them.

Re: Partially hidden faces

Posted: 14 Jul 2008, 07:51
by Snipawolf
I would suppose that Z-fighting is the correct term, since it's in the wiki. I can't really find many discussions or articles either.

Re: Partially hidden faces

Posted: 14 Jul 2008, 11:53
by rattle
Turn materials off in view, then wings won't show what material a face would have along an edge (useful for screenshots). If that's what you are referring to. Anyway, what smoth said. Conserve UV where you can.

Re: Partially hidden faces

Posted: 14 Jul 2008, 16:31
by smoth
Zpock wrote:Yes, although it would be nice for peace of mind to just conclude one method as better and stick to it, I think you will probably want to mix it up.
I told you the situations and what is best for them. It all depends on your concern. In modeling this sort of thing you have 3 things to consider, Uvspace, Polycount and z-fighting.

if the detail is too small do not model it and just texture it. In you long distance shot where the red is showing through that is z-fighting.

I gave you the answers you need and part of good modeling is using the right technique for the right situation. That is the key take away from my earlier post.

Re: Partially hidden faces

Posted: 14 Jul 2008, 17:14
by [Krogoth86]
That's why you'd want different LOD levels for you models... :wink:

Re: Partially hidden faces

Posted: 14 Jul 2008, 17:59
by smoth
NO WAI! Really?

Yes, we know about using LOD... yes we know spring supports it through some code that one of the devs posted..


it also adds a lot onto our workload and I think zpock is just focused on a single model per unit.

*edits* a bit off topic and perhaps there should be a split for lod discussion but does the lod system exist yet? how do we use it and MORE IMPORTANTLY does it work on features?

Re: Partially hidden faces

Posted: 14 Jul 2008, 18:10
by [Krogoth86]
Seriously - don't take everything as personal attack and look out for smilies. It actually was a poke to bring the LOD discussion up again... :roll:

Returning to Zpock's presentation:
I'm not 100% sure but that "faked" method with less polygons might give you an open mesh and that would be bad for some shaders / shadow techniques and that stuff...

Re: Partially hidden faces

Posted: 14 Jul 2008, 19:24
by smoth
I know why you posted it but honestly that wasn't what zpock was asking about. Start a new lod thread if you want to talk about lod rather then hijacking a thread...

Re: Partially hidden faces

Posted: 14 Jul 2008, 20:01
by [Krogoth86]
Well imo it was more about modelling methods in general and not just modelling for Spring - maybe I was wrong. Also don't make yourself sound like the forum police - OT division... :wink:

Re: Partially hidden faces

Posted: 14 Jul 2008, 20:30
by smoth
I didn't mean to come across like that.

Re: Partially hidden faces

Posted: 14 Jul 2008, 22:28
by [Krogoth86]
Allright, I'm sorry then... :-)
Let's get back to topic...

I still think that the method where you save some polies leaves you with an open mesh...

Re: Partially hidden faces

Posted: 14 Jul 2008, 22:40
by smoth
how would it leave you with an open mesh? you have two cubes sitting on/in the other.

Re: Partially hidden faces

Posted: 14 Jul 2008, 23:08
by Zpock
Well, the intersection edges can't be smooth shaded of course.

Re: Partially hidden faces

Posted: 15 Jul 2008, 00:31
by smoth
ummm yeah they can still be sharp.

Re: Partially hidden faces

Posted: 15 Jul 2008, 06:45
by Warlord Zsinj
I remember having a big discussion with flozi about this a long time ago on the TAU forums. Can't seem to find the thread though.

Re: Partially hidden faces

Posted: 15 Jul 2008, 10:01
by [Krogoth86]
smoth wrote:how would it leave you with an open mesh? you have two cubes sitting on/in the other.
Ah - damn you're right. Forgot what Zpock wrote and thought of having that additional geometry to that cube being done on top of it... :wink:

I still came up with another disadvantage: Texturing. Putting a texture on just that little seam that pops out of the first cube results in sort of a waste of your UV and texture space...