Greetings!

Welcome to Scifi-Meshes.com! Click one of these buttons to join in on the fun.

Mesh Optimization - Q/A

JeffrySGJeffrySG321 Posts: 477Member
Hey all... we were having a bit of discussion of what a good mesh is, an optimized mesh, a clean mesh, etc. in 1of33's Titan WIP, so we wanted to move it to a new thread to fully discuss.

This can just be an open thread to talk about all things relating to these topics, feel free to ask any questions and def. feel free to just jump in and try to answer any questions as well. Also maybe post your wireframes of good and bad examples, etc as well...

Please also, let's keep this thread on topic and keep it supportive!

cheers!
Post edited by JeffrySG on

Posts

  • AcemanAceman337 Posts: 269Member
    A simple warning. A constructive debate on any topic is permited on SFM. All we ask is that we keep it professional, and not personal. You can disagree, but I expect that it be conducting in a manner the is not combative. Common sense people.

    This was posted because recent events in the other thread have spilled over into situations. Let's avoid repeating that in this thread.

    Thank you.

    Let the discussion begin.
  • 1of331of330 Posts: 0Member
    I look forward to seeing how people respond to this as it could be alot of help for people in how they do their modeling so please keep it nice
  • Knight26Knight26192 Posts: 838Member
    So what exactly do we mean by mesh optimization, eliminating unneccesary faces, holes in the mesh, etc...?
  • JeffrySGJeffrySG321 Posts: 477Member
    Knight26 wrote: »
    So what exactly do we mean by mesh optimization, eliminating unneccesary faces, holes in the mesh, etc...?

    Well that question will be part of the things we will discuss... In my mind it does mean what you said, but also, if you have a large planar area(s) of a mesh, but it is made up of hundreds or thousands of polys possibly due to subdividing or smoothing the mesh you can probably delete/dissolve most of those polys to save on the complexity of the mesh without changing how it looks in the final render.

    So what is the best way to go about this? If those polys are made up of complete loops you might be able to do a loop select and then dissolve it but I find that usually part of that loop is needed somewhere in the model. So you are then required to only select the part of the loop that is not needed any more and dissolve that part.

    Or I guess you can go in manually and select any edges that you won't need and get rid of them. But that seems like it would take a really really long time.

    Also, in what case do you really not care if the mesh is not optimized. If it's not for production do you really care if it will take a bit longer to render? Will UV mapping the mesh be harder if it's not optimized?
  • citizencitizen171 Posts: 0Member
    I pretty much assume Mesh Optimisation means using the fewest poly's for the given shape, which by definition means Meshsmooth produces non-optimal results in most cases. I also like a clean mesh, i.e. smooth polygon alignment, and preferably Quads, avoiding Tris where ever possible.

    EDIT:
    Much of the time optimisations have to be done by hand, you can't just select a whole group, delete them, and expect it to look okay afterward. I tend to try and make things easy on myself, by splitting the overall model into smaller chunks that can be optimised in different ways, and doing some optimisation (though definatly not all or even most) as I go along.
  • JeffrySGJeffrySG321 Posts: 477Member
    citizen wrote: »
    I tend to try and make things easy on myself, by splitting the overall model into smaller chunks that can be optimised in different ways, and doing some optimisation (though definatly not all or even most) as I go along.
    I like that idea, as I think if you look at the entire mesh and think about cleaning it up it can seem daunting... but looking at a smaller section at at time may make that part of the task seem much easier.
  • [Deleted User][Deleted User]2 Posts: 3Member
    I think part of the confusion over what is meant by "mesh optimization" is that there are different types of optimizations. Optimization of a mesh for subdivisions is a different category than optimization for LOD or STL for example.

    For subdivision modeling you want to keep a uniform mesh density and make sure you are using quads as much as possible and tris if you absolutely must. 5+ sides is a no no.

    Game optimization is generally concerned with using as few polys as possible to get the model to read as a desired form. Here optimization means reducing the mesh to the point where every vert/edge/face is essential to the shape and no more than necessary are used. No chamfered edges or planer surfaces with 8 faces. Then this optimization goes into producing models for LOD. Here you go and rebuild the mesh for viewing at stepped distances from the camera by reducing the complexity of the model to remove details that don't show up when the model is viewed at given ranges. Details like part lines and greebles don't need to be represented when a mesh will be 20 pixels big on the screen. So when you are worried about keeping FPS up these types of details are removed or represented by other means, like bump, diffuse, and normal maps. These maps can also be optimized for LOD using MIP mapping.

    Stereolithography has it's own set of optimization parameters which I haven't dealt with personally. From what I gather it deals with insuring the surfaces represent a solid form by closing holes and maintaining single sided surfaces (no klein bottles allowed).

    The optimization list goes on and on. You can have a mesh that is optimized for one situation, but not for another. What you can't have have is a mesh optimized for every possible use.

    I could be wrong here, but I would guess folks discussing optimization on SF Meshes would primarily be concerned with the balance between detail versus processor killing poly counts and maybe developing clean meshes to insure no render or shadow artifacts. It might be good to determine what type of optimization(s) should be discussed to cut down on confusion and minimize any potential misunderstandings.
  • JeffrySGJeffrySG321 Posts: 477Member
    Ndege wrote: »
    I could be wrong here, but I would guess folks discussing optimization on SF Meshes would primarily be concerned with the balance between detail versus processor killing poly counts and maybe developing clean meshes to insure no render or shadow artifacts. It might be good to determine what type of optimization(s) should be discussed to cut down on confusion and minimize any potential misunderstandings.

    Yes, I would generally thing this is the type of optimization we are talking about here. While I personally use Subdivision modeling quite a bit (for work, mostly) many of the models I work on here are simply poly modeling. There are some WIP here that use nurbs (like in Rhino) but not many.

    I would think that if people have questions about optim. for other types of modeling they could ask away here as well though. :)
  • [Deleted User][Deleted User]2 Posts: 3Member
    I would think that if people have questions about optim. for other types of modeling they could ask away here as well though. :)

    Oh sure, ask away ;)

    I was just trying to say that maybe specifying what you want to optimize for might be a good idea for better discussion. For example instead of saying "Hey guys, how do I optimize my mesh?" You could get a better discussion if you ask "Hey guys, how do I optimize my mesh (or NURBS) for for X?" where X = subdivisions, polycount, fur, deformations, splitting, etc.
  • [Deleted User][Deleted User]2 Posts: 3Member
    Assuming the object is to reduce poly count in a complex model so that the model is still very detailed but less "heavy":

    * I think it's true that breaking (or building) a mesh as components that can be optimised seperately can make a model easier to optimise.

    * For raytracing, if I halved a mesh's triangle count, I'd only save about 5% of the render time if I started with 1,000,000 triangles. Might be worth doing if memory is limited, though.
  • citizencitizen171 Posts: 0Member
    ClaysGhost wrote: »
    * I think it's true that breaking (or building) a mesh as components that can be optimised seperately can make a model easier to optimise.
    It seemed completely natural to me when I first started modeling. I was educated in more 'classical' art forms prior to 3D modelling, and often shown the advantages of breaking something down in both sketching and sculpting. I tend to see models now as a collection of geometric shapes, and too some degree break them down along those lines. It also makes them easier to work on, especially when polycounts start getting higher, as you can easilly hide sections of the mesh you aren't working on.
  • NightShadowNightShadow10 Posts: 0Member
    As someone who likes to keep his meshes on the low side of poly counts, I'd say that the PRIMARY technique for mesh optimization is... thinking ahead (mind you, this is NOT to imply that people don't think ahead, so I'm not actively stepping on toes here).

    Thinking ahead is defined, in my world, as such: making the basic shape or object as minimalist as humanly possible. Instead of making a box with 4 faces on each side, I make a box with 1 face on each side. When it comes time to chamfer specific edges or corners, I select the individual edges/lines while in Poly Mode and manually apply my chamfers there.

    Another thing to consider is, when using primitives and advanced primitives (I JUST now, after 6 years of doing this, realized what an oxymoron "advanced primitives" is), the modeller should consider just how complex he/she is going to make that specific object in the long-run. Will he/she be doing chamfer work? Will he/she be applying a meshsmooth modifier? Will he/she be using a boolean function (which can often create more polys than it deletes)? If a regular primitive can be used in favor of something a little snazzier looking, I'll usually go with the regular primitive.

    Another idea for keeping poly counts low from the get-go is learning how to make spline cages. While box modelling and FFD modelling are extremely useful, they can sometimes create tons of unwanted polys, most especially if you apply a meshsmooth modifier. Spline cages, IMHO, tend to have a little more control and flexibility where poly counts are concerned.

    Grouping, too, can save a modeller a lot of headaches when it comes to optimizing one's mesh. For instance, let's say you're building a ship that has an interior. Grouping the interior pieces/objects and hiding them while they're not in use will definitely help to cut down render times because, don't forget, the computer will often spend the CPU power to render EVERYTHING in a scene, even if it's obscured by other objects or polys.

    Optimization is more than just cutting polys from an existing mesh or object. It's maximizing your potential during rendering, which is the end-goal and ultimate reason for optimization in the first place. Planning your project out and anticipating your needs in terms of polygon counts will help immensely. Many project leaders in the industry will set polygon budgets. Set one for yourself, keep it reasonable and constantly check your overall count during the entire modelling process. I check mine just before I close down a file that I'm working on, when I'm done with working on it for the day. It serves as a guideline and keeps me in check.
  • MadKoiFishMadKoiFish9834 Posts: 5,333Member
    Optimisation of sub d objects in poly edit. Max


    For me mesh optimisation is the removal of edges, verts or polys that do nothing for the model at all. More into it it ias also planning a object say in sub-d ( I use turbosmooth vs meshsmooth so things may differ)
    These 2 objects for instance, still turbosmoothed objects and both render the same visualy and really close up. But ones heavier than the other.
    Image A = 1980 poly
    op-01.png
    Image B = 4064
    op-02.png
    Even as collapsed objects and cleaned up the second one has a higher poly count due to the edges controlling the arch of the object. The curves those edges detail are very slight and unoticeable with the lower poly ones. This has happened because I need 2 iterations on turbo to smooth the nose. I just doubled up the edges on the nose to not get segmentation. This involved me cutting the nose off and adding turbo to it then reattaching it since I was working off of a existing object. I also avoid having any mesh behind other meshes, no reason to have polys under another object where youll never see them.
    As well least in max and some wires I seen in Lightwave if a surface is flat you can often safely yank all edges crossing it. Some places like windows stencils or modeled details on a flat surface you can have just one edge connecting it to a nearby object. Sometimes the poly "skin" will fold over a rounded corner or ovrlap causing a error in render. In max you can deleted that face then cap the hole that will usualy reset things so its not folding all over. BUT this only accounts for if the hole is planar if theres a doubled vert or edge youll have to fix that first.
    example of some "floating" objects on a flat surface.
    onibridge-B.gif

    My reasons for optimisations differ from the others so far in the fact I am doing this as a hobby. So Im after VP performance. Larger the mesh the slower the VP the less likely Ill do anything with the mesh. Render times I have found will drasticly change with the addition of texturemaps. Lots of them the render slows. So being frugal there will help in render time much more than say yanking 200k of polygons off of a 1million poly ship.


    Others will have diffrent techniques and Im eager to see them. Most of what I do is either trial and error or picking up from other modelers.
    Each day we draw closer to the end.
  • SastreiSastrei171 Posts: 0Member
    I use Blender, so no fancy modifiers like that Turbo smooth thingy for me. I just make sure there's no useless edges, make sure the mesh has a nice clean flow if possible, and depending on what I'm using it for, cheat with as much non manifold geometry as I can. Without freaking out the normal calcs, of course.

    -Stefan-
  • JeffrySGJeffrySG321 Posts: 477Member
    Thx for the run through and the wires MKF! nice examples....

    As I'm not a Max (lightwave and silo here) user, is the turbosmooth or the meshsmooth similar to subdividing in other apps? I hear people talk about it all the time. can someone post an example of say a cube and then a cube that has been turbosmoothed and then one that is meshsmoothed?

    cheers all for sharing so far!
  • LennOLennO5 Posts: 0Member
    JeffrySG wrote: »
    Thx for the run through and the wires MKF! nice examples....

    As I'm not a Max (lightwave and silo here) user, is the turbosmooth or the meshsmooth similar to subdividing in other apps? I hear people talk about it all the time. can someone post an example of say a cube and then a cube that has been turbosmoothed and then one that is meshsmoothed?

    cheers all for sharing so far!

    It's all Catmull-Clark(like) SubDs. There are very minor difference in algorithms between programs, but you won't be able to tell the difference without comparing absolute vertex position. Handling of n-gons can also be different. Meshsmooth/Turbosmooth=Poly Smooth(maya)=Subpatch(LW)=... Each app likes to give them different, often very odd, names such as the infamous "Hypernurbs" in Cinema4d, but in the end it's all the same. Some apps allow different subD schemes (like Doo-Sabin) but Catmull-Clark's (or rather: alogorithms similar to CC) are what we are used to work with.
  • JeffrySGJeffrySG321 Posts: 477Member
    ^cheers LennO

    I had a feeling that was the case but it's nice to hear it... :)
  • [Deleted User][Deleted User]2 Posts: 3Member
    you beat me to it Lenno! I'm using the blender equvialent of turbosmooth in my current mesh.

    @MAdkoifish. i agree completly with how you explained that. When ever you have a straight edge with tons of edges crossing it, they are pointless so scrap them!
  • mattcmattc181 Perth, AuPosts: 322Member
    LennO wrote: »
    It's all Catmull-Clark(like) SubDs. There are very minor difference in algorithms between programs, but you won't be able to tell the difference without comparing absolute vertex position. Handling of n-gons can also be different. Meshsmooth/Turbosmooth=Poly Smooth(maya)=Subpatch(LW)=... Each app likes to give them different, often very odd, names such as the infamous "Hypernurbs" in Cinema4d, but in the end it's all the same. Some apps allow different subD schemes (like Doo-Sabin) but Catmull-Clark's (or rather: alogorithms similar to CC) are what we are used to work with.

    LW will allow both Subpatches and CC's in v9.0+ (and probably others down the track).

    M
  • JeffrySGJeffrySG321 Posts: 477Member
    OK, so getting back to some optimization questions... :D

    Does anyone have any general guidelines that they use for different object based on how small they'll be on a model?

    For example, if you're doing a cylindrical object that will be pretty small, like a small greeble, how many sides do you put on it?

    Or what if it was a much larger object, such as an engine?
    Do you try to limit the angle of each side to a specific angle? like 12.5deg? or 15deg? 30deg.?, etc. for larger objects? smaller ones?

    What about putting bevels on objects? do you just add one small bevel to smaller ones? how many edges do you add to chamfered corners that should render smooth? etc...

    let's discuss... (kind of like coffee talk) :lol:
  • SastreiSastrei171 Posts: 0Member
    I'd love to hear stuff like this from the others here. I do mostly game modeling, so my stuff is usually lopoly.

    I tend to use 6 verts for a small item like a pipe or hose. Anything highly visible gets an 8 vert circle, to me it looks more balanced and less like a hexagon on edge. If it's a big object I'll go to 12 or 16 verts.

    Using Blender, so chamfer's aren't always easy for me to implement, no experience there yet. Did use 4 vert quarter circles on Infinity's valk when I rebuilt it for the BSG HW2 mod though.

    -Stefan-
  • [Deleted User][Deleted User]2 Posts: 3Member
    well in blender you never really need more than 64 sides for much of anything, unless its huge. but most small detail pipes range from 12 to even 4 if they are small enough. ALso when ever you have faces that are not showing in the final render, delete them. Even if it means your pipes arent actually closed all the way around
Sign In or Register to comment.