Home Technical Talk

Do you connect meshes or not?

YellowYeti
vertex
Offline / Send Message
YellowYeti vertex
Sorry if i worded the title incorrectly, but lets see if i can word it better here. What i'm trying to say is that if you were making 1 object and needed to use 2 different polygons would you try to connect their meshes ? Or just combine them to be 1 object? I want to know because i don't know if that would screw up in animation or not. Thanks for any replies!

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    It depends. You can leave them split at a lot of cases, and it wont mess up the anim, depending on how the mesh is skinned. But sometimes it will...It really depends. The usual viewpoint is to split meshes based on how the object would be split in the real life. But also there are cases when this isnt exactly true. lets say you have a cloth thing wrapping around something. Then you probably want a continuous lowpoly mesh, especially when baking. Without seeing the mesh, I would say try out if its ok to split.
  • JordanN
    Options
    Offline / Send Message
    JordanN interpolator
    It depends.

    Preferably, you don't want to have floating/intersecting geometry as it leads to z-fighting. I've also heard it can affect hardware performance, as more individual meshes = more draw calls.

    However, I do know some tricks were it is necessary to separate a mesh. For example, on a gun model, you would model the trigger but you would select the polygons that make up the trigger and "disconnect" it from the rest of the model. That makes it easier to animate a gun firing, so I've heard.
  • YellowYeti
    Options
    Offline / Send Message
    YellowYeti vertex
    Obscura wrote: »
    It depends. You can leave them split at a lot of cases, and it wont mess up the anim, depending on how the mesh is skinned. But sometimes it will...It really depends. The usual viewpoint is to split meshes based on how the object would be split in the real life. But also there are cases when this isnt exactly true. lets say you have a cloth thing wrapping around something. Then you probably want a continuous lowpoly mesh, especially when baking. Without seeing the mesh, I would say try out if its ok to split.

    Well let me use this as an example now, i'm making this lamp type model and i want the ends to flare out as such, but i didn't really see a way to make it with one piece without disfiguring the top piece, so would i try to connect these 2 or leave them as is?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    This could be left as split I think.

    Jordan - "more individual meshes = more draw calls." this is true, but it isn't true when we are talking about sub meshes or lets call them elements.

    "Preferably, you don't want to have floating/intersecting geometry as it leads to z-fighting." This also isn't completely true, then how you'd make decals? Also intersecting geo can be also ok. Think of when you are putting rock meshes together to get rock formation. You can get Z issues, but there are many ways to handle it. Also Z precision can be set.

    On a gun model you'd split a lot of parts so they can be animated. Still the best rule to follow is, to split the mesh based on how the real life version would be split. Its really rare to make things from one continuous mesh. Only if the real life version would be from one continuous piece too.
  • Joost
    Options
    Offline / Send Message
    Joost polycount sponsor
    If you're baking you'll benefit from welding elements together in the low poly. You also get better lightmaps with continuous meshes. For high poly meshes it's good practice to separate out as many things as possible. I.e. by using floaters. If you're modelling meshes that don't need baking or lightmaps then it probably doesn't matter.

    http://www.polycount.com/forum/showthread.php?t=117017
    https://docs.unrealengine.com/latest/INT/Engine/Content/Types/StaticMeshes/LightmapUnwrapping/index.html
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    + better bakes, easier
    + texture space saved
    - probably more verts
    - more work when starting from high poly source ;)
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Could you or someone explain to me please why and how you get "better" bakes with continuous mesh? You can use exploded bake or match mat ID method so the parts won't bake onto each other anyways. I agree with the other points though. It clearly depends on the case and needs.
  • aharmlesspie
    Options
    Offline / Send Message
    Obscura wrote: »
    Could you or someone explain to me please why and how you get "better" bakes with continuous mesh? You can use exploded bake or match mat ID method so the parts won't bake onto each other anyways. I agree with the other points though. It clearly depends on the case and needs.

    I don't think you get better bakes from continuous meshes. I intersect geometry all the time and get fantastic bakes. The only time I worry about having a continuous mesh is for the purpose of deformation. Weight painting is much simpler on a continuous mesh.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I think the same. Also its up to the requirements. When I can work with higher poly count I don't connect them a lot of times.
  • Mant1k0re
    Options
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    On the topic of "it's better to make your lowpoly airtight for better bakes", quite some time ago I took this CG Society workshop and it's definitely something that was mentioned a few times. I didn't really understand the technicalities behind it at the time (and the trainer has not really been doing any production art himself for many years as he's an art director at some AAA atudio) but I didn't dare to question it. I think he mentioned something about intersecting geometry causing "overdraw". I tried to google it afterward but never found a satisfying answer. Maybe Obscura or someone else can shed some light on this, and it's relevant to this thread as well from the looks of it.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Intersecting geo is used a lot in games. The simplest example is when you add props onto a terrain, or combine rock meshes to get rock formation so its definitely something that is used in some causes.

    Here is a thread related to overdraw:
    http://www.polycount.com/forum/showthread.php?t=89154
    And you can read this in it:
    "Overdraw:
    It discribes the number of polygons rendered ontop of a single" pixel."


    Also here is the related wiki page:
    http://wiki.polycount.com/wiki/Overdraw

    So as I understand there can be 2 cases of overdraw:
    1. transparency, and things behind it.
    2. When you view a model from very far and there are multiple triangles on a single pixel. So then in this case you get it very often.


    So I think overdraw is not really related to baking and watertight geo.
    As for baking, and the relation of the topic. There are some cases when you do want to connect meshes, especially when you use lower poly count limits. It can also give nicer edges at the meeting points in some cases, but sometimes you want it differently, especially when you can use higher poly count. I used both methods, and both has its positive and negative side.
    This is how I see and do it.
  • Mant1k0re
    Options
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    Awesome info, thanks :)
  • Chev
    Options
    Offline / Send Message
    Chev polycounter lvl 11
    Obscura wrote: »
    "Preferably, you don't want to have floating/intersecting geometry as it leads to z-fighting." This also isn't completely true, then how you'd make decals?
    Actually this very much has been a permanent issue with decals, and various specific techniques had to be built to fight it, ranging from depth bias to using the exact same polygons as the object the decal's gonna be on (because that way the exact same z values will be output, avoiding z-fighting entirely) to deferred decals. None of those are a good fit for non-decal intersections. There's a whole range of other tricks (like logarithmic z-buffers) that are instead dedicated to twisting depth into a form where z-fighting is less immediately apparent.
  • YellowYeti
    Options
    Offline / Send Message
    YellowYeti vertex
    Sorry i haven't been on this thread in a bit to reply because i was busy, but with all this info i don't know where do start, but i guess for anyone or maybe Obscura since he seems to be replying often. Would say something like a realistic car be alright with all different pieces for baking or overdraw. And an example for something i just made, a simple street light be better as all one piece? because there was one piece i didn't really see how i could make it into the lamp. Thanks again for all the replies!
    Also sorry if my questions are a little hard to understand it's hard to put into words what i'm trying to say.
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    Obscura wrote: »
    Could you or someone explain to me please why and how you get "better" bakes with continuous mesh?

    Raycast errors on cage intersects, for me.

    - left low poly is merged, right low poly is intersecting
    - 20 vertices vs. 16 (left/right)
    - high poly is merged with beveled edge between the two primitives
    - didn't edit cage, just a simple push outwards

    uekJGau.jpg
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    @CptSwing - So its one continuos highpoly. Then you obviously want one continuous lowpoly too. This is why I said it depends on the case. If the 2 boxes wouldn't be merged and wouldn't have soft transition between them, then you could do it with 2 lowpolies without a problem.

    Thanks for taking the time, but this is just one case, and there can other ones, and then it depends.

    @YellowYeti - car would definitely be from multiple parts. Also its rare to bake a car's body :)

    In the case of your lamp, it depends. Are you planning to make highpoly? If yes, then how it would look? How much parts you would use.
  • YellowYeti
    Options
    Offline / Send Message
    YellowYeti vertex
    @Obscura Alright i had thought that that was the case with a car, just checking :) but for the lamp, i wouldn't necessarily consider it high poly for the most part but i was thinking of smoothing a certain part.
  • Amsterdam Hilton Hotel
    Options
    Offline / Send Message
    Amsterdam Hilton Hotel insane polycounter
    Obscura wrote: »
    Could you or someone explain to me please why and how you get "better" bakes with continuous mesh? You can use exploded bake or match mat ID method so the parts won't bake onto each other anyways. I agree with the other points though. It clearly depends on the case and needs.


    1. if you don't explode the separate parts you get raycast errors at the intersection

    2. if you do explode the separate parts your AO lacks contact shadows between exploded parts, leading to
    2a. the need for both "combined" and "exploded" AO bakes

    3. you waste UV space on unseen geo; downsampling can grab bad data


    i merge nearly everything that doesn't have to move
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Maybe its an only 3dsmax feature, but a thing called "hit only matching material IDs" exists, and it allows you to do combined bake without raycast errors.

    To make it clear, I also combine some things, but not everything.

    Also here is an another thing, which wasn't covered yet. When you combine, you get more verts, as its discussed. But usually you need hard edges at those transitions so it means even more extra verts.
  • Amsterdam Hilton Hotel
    Options
    Offline / Send Message
    Amsterdam Hilton Hotel insane polycounter
    Obscura wrote: »
    Maybe its an only 3dsmax feature, but a thing called "match material IDs" exists, and it allows you to do combined bake without raycast errors.

    read past point one in the explanation that you asked for
    Obscura wrote: »
    Mlso here is an another thing, which wasn't covered yet. When you combine, you get more verts, as its discussed. But usually you need hard edges at those transitions so it means even more extra verts.

    doesn't add much in practice. might be worrisome for mobile / facebook spec
  • Mant1k0re
    Options
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    2. if you do explode the separate parts your AO lacks contact shadows between exploded parts

    But do you even need ao at all if you're going for pbr? I was under the impression it was more or less obsolete. Sorry if I'm saying something stupid.
  • yaschan
    Options
    Offline / Send Message
    yaschan polycounter lvl 7
    Mant1k0re wrote: »
    But do you even need ao at all if you're going for pbr? I was under the impression it was more or less obsolete. Sorry if I'm saying something stupid.

    AO is still useful for placing dirt rust or other such things in occluded areas, even though AO itself is no longer multiplied over diffuse
  • Mant1k0re
    Options
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    yaschan wrote: »
    AO is still useful for placing dirt rust or other such things in occluded areas, even though AO itself is no longer multiplied over diffuse
    Oh right, as a mask. Thank you.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    An AO map is still / can still be used in pbr shader, but rather than being baked onto the diffuse (not physically correct) it's supplied as an individual map (so it can still be taken into account when appropriate).

    Another occasionally overlooked plus when considering merging lowpoly mesh items is that you also save UV space. There's also some good info in this thread: http://www.polycount.com/forum/showthread.php?t=117017
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    If you can afford the verts/time, make your low poly model watertight. Easier bakes. Faster cage setup. Fewer aliasing errors. Better texel density.

    There are plenty of exceptions and positives as have been noted in this thread.

    I personally make most of my low polys that are baked from high watertight.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    My last thought here is that I also don't understand how you can save uv space when actually you'll still need uv splits along hard edges so you don't save much space in my opinion.
  • Pedro Amorim
    Options
    Offline / Send Message
    Obscura wrote: »
    My last thought here is that I also don't understand how you can save uv space when actually you'll still need uv splits along hard edges so you don't save much space in my opinion.


    2015-09-17_15-39-26.png

    Because on example b, you need to have the whole box uved, and a big chunk of it is being hidden because it's intersecting the other box.

    example A is more sensible because even tho you have more splits, your're not wasting pixels with things that won't get visible.

    does that make sense?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    It makes yeah, but why would anyone do it like the B. I mean the highpoly is one continuous thing in this case.

    Here is my example:
    Lets say you have a box, and there are some modeled screws on the lp of it too. Would you still connect them to the box? I obviously wouldn't.
  • Pedro Amorim
    Options
    Offline / Send Message
    you will need to make an example for it since i didnt' understand what you said.

    and also, i prefer method A, i was just explaying how method b is more prone to wasted pixels.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Okay here it is. Would you connect the bolts to the box on the lowpoly? So would you make the lp as 1 object? I wouldn't.
    yqkfnMQ.jpg

    I still think this "to connect or not to connect" thing depends on the case. It isn't always the best option in my opinion.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    If there's a huge difference in scale between the bolts and the main object it'd probably be better to leave them separate; otherwise you might have difficulties with the cage (not that the example above is complex enough for these issues to occur). Because if they're connected and you need a large push for the main body's cage, you can't do so because the upper limit is set by the smallest piece. If they're connected you won't be able to have a different push value for the small pieces without the projecting getting distorted.

    Taking the above example at face value; I probably wouldn't merge the screws because it'd be easier while working to have 3 of them an instance of 1, so they'd share UV's. This could still be done when merged but the texture space saved isn't significant so I'd spend the time elsewhere.
Sign In or Register to comment.