Home Technical Talk

When is it ok to have intersecting polygons?

JordanN
interpolator
Offline / Send Message
JordanN interpolator
So for a while now, I've been trying to keep all my polygons separate from each other. However, now that I need to start creating more complex scenes, this task is going to prove more challenging.

I've been looking at a lot of professional models and I've noticed they have have a lot of polygons packed in front of each other, sometimes clipping through each other.

Are there any inherent risks from doing this? I'm aware this can lead to z-fighting but from the above example, developers seem to have no problem getting very close to this in games.

Replies

  • Kurt Russell Fan Club
    Offline / Send Message
    Kurt Russell Fan Club polycounter lvl 9
    If it's a skinned mesh and you have intersecting geometry, you can get sliding. So e.g. an eye that's meant to look attached to a fixed location can seem to slide over the surface.
  • Eric Chadwick
    Also it's harder to hide shading seams at intersections. You can bend normals and whatnot, but it's easier to smooth things when the mesh is contiguous. Depends on what you need of course.

    Another issue I've seen is when the hardware is lower-end (mobile) then the z-buffer can be lower precision, so I've had to pull things further apart to avoid z-fighting.
  • EarthQuake
    For an individual asset, generally it is best to avoid too many intersections or floating elements, and instead merge everything together in the low poly. This may mean a slightly higher poly count, but it will be more efficient uvs (less space devoted to areas that are hidden inside intersections, etc) and less aliasing (everywhere you have an intersection or floating mesh). It also makes it more complicated to set up normal map bakes when you have an excessive amount of individual mesh chunks.

    Generally, I only use separate mesh chunks when:
    A. Something needs to animate or can be swapped out
    B. It will otherwise cause bake errors because of some complex intersection, and the part needs to be exploded when baking

    Some engines will require you do this for shadow casting, but this isn't very common these days.

    For general scene building, eg from multiple props/assets/etc, some clipping is generally unavoidable and not really something you should worry too much.
Sign In or Register to comment.