Home Technical Talk

Optimizing Models

polycounter lvl 11
Offline / Send Message
BenHenry polycounter lvl 11
I want to learn how to optimize my models. I've always just looked at other good models and grabbed techniques by just looking at other peoples models. But I think I need to ask direct help, so here is my gun that I want to optimize. Right now I'm sitting at about 3100 poly's, and 6200 tris.

sphinx_1.jpg

And the wire-frames:
wireframe.jpgwireframe_2.jpgwireframe_3.jpgwireframe_4.jpg

Replies

  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Remember when doing a LP model, all the edge loops should go towards keeping a good and smooth silhouette. All the loops that don't help the silhouette should be deleted.

    EG. all the edge loops on flat surfaces can and should go, it's ok to have a few edges meeting in the same vertex. Those parallel edges in the front part of the gun should go.
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    You can collapse many verts of the flat areas without losing detail.
    And there are many parts which could be done with the help of a normal map.
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    I hate to ask of this, but can someone do a paint-over to what they mean?
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    Here you go, you should get the gist i hope.
    wireframe.png
  • gsokol
    Options
    Offline / Send Message
    gunpaintover.jpg

    Edit:

    Whoops didn't refresh, somebody beat me to it :P. Oh well the more the merrier right?
  • Mark Dygert
    Options
    Offline / Send Message
    GunTopo.jpg

    Looking back over it, I would have made slightly different decisions but I'm not going to redraw it, this should get the point across.

    EDIT: HAHAHA I should have refreshed too... oh well.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    ahah, that was awesome! xD
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    just something I noticed...

    if this supposed to be a first person weapon from a game it'll need a bunch of moving parts for animation. Currently it's not setup right. The slide is modeled into the main body and the hammer will have to go into a slot in the back. You'd also need a hole where the ejection port is and the safety will have to move

    here's a video that shows how pistols like this move

    http://youtu.be/pz6t64_0F8E

    article on similar pistol here:
    http://largrizzlyparts.blogspot.com/2007/03/how-model-1911-works.html
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    Hey guys,
    Very very useful info, thanks!

    The slide is modeled as a separate piece.
    Now this is a first person model, so are you sure I should get rid of the rivets on the slide?
    it feels like I couldn't really achieve a realistic look if I lost those. (just look at the render at the top for ref, and I've got more renders if you want)
  • EarthQuake
    Options
    Offline / Send Message
    GunTopo.jpg

    Looking back over it, I would have made slightly different decisions but I'm not going to redraw it, this should get the point across.

    EDIT: HAHAHA I should have refreshed too... oh well.

    Grumble grumble... do not randomly detatch low-poly bits that are solid in the high, like the trigger guard and rails... Just = seams.
  • Mark Dygert
    Options
    Offline / Send Message
    He already has a smoothing break where the trigger guard meets the grip.

    You're right about the rails, he could probably keep those as one solid chunk and collapse the loops like gsokol pointed out. Detaching them wouldn't really save that many polys.
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    What exactly are the rules, or guidelines? for example stick to 3-4 sided polygons (actually answering this one could be useful)
  • gsokol
    Options
    Offline / Send Message
    Tris and Quads are both good.

    You don't want more than 4 sides though.

    Any engine will break down all of your geometry into triangles. Quads triangulate in a predictable manner, since...well a quad is 2 triangles butted up together. Whenever you have more than 4 sides though, then you leave it up to the engine to guess how to cut it into triangles. You typically don't want to leave that up to a computah, because it can mess up and cause issues...so want to kinda control that yourself. Some engines may not even accept models with more than 4 sided polygons, I know that X-normal throws a shit fit if you try to.
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    Ok, I optimized it a little, but I still need help. I've got lots of polygons with more than 4 sides.
    sphinx_cap2.jpgsphinx_cap3.jpg
  • dpaynter26
    Options
    Offline / Send Message
    dpaynter26 polycounter lvl 11
    if you have a lot of n-gons you can always try to cut them into triangles, triangles arent bad for game meshes because when they go into the engine they get tesselated as is, so try cutting down the n-gons with tris :) love this thread btw
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    I'm trying to figure out what to do here, any ideas?
    sphinx_cap4.jpg
  • Lord McMutton
    Options
    Offline / Send Message
    Lord McMutton polycounter lvl 17
    Gsokol's paintover shows how you'd do that with geometry, while Mark's suggests floating them.
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    which one do you think is a better option?
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    Gsokol´s one i would say ;)
  • Mark Dygert
    Options
    Offline / Send Message
    Gsokol's paintover shows how you'd do that with geometry, while Mark's suggests floating them.
    I would float only if it would save you a significant amount of polys and if the seams could be controlled otherwise I would go with Gsokol's method of collapsing a few edges down to some tri points.

    I lean pretty heavily toward something like this, where everything is joined together.
    GunTopo01.jpg
    Maybe even combining the point in the center like the image below, you could even combine that point to one on either side. But it will create some long thin tris.

    Keeping it all once piece, will allow you to create some nice soft bevels on the high poly around things like the upper fins and avoid seams like EQ pointed out earlier. Those bevels in addition so a slight slope, will help when the normal map is captured.


    If you're going to float due to poly count issues or because of the view angle the seams won't matter, then you can do something like this.
    GunTopo02.jpg
    Which will create minor issues around the base of each floating part but will avoid long thin triangles which can be problematic when they appear to be coplanar and will save a few more tris. However its not saving that many tris and the seams it might create can be pretty crappy. Some test bakes might be in order to work out which will work best.

    One other thing to keep in mind is if this is a First Person View weapon? Then you need to keep in mind what the silhouette looks like from that view. You can also take this into consideration when plotting out UV seams and what should be optimized.
  • EarthQuake
    Options
    Offline / Send Message
    He already has a smoothing break where the trigger guard meets the grip.

    You're right about the rails, he could probably keep those as one solid chunk and collapse the loops like gsokol pointed out. Detaching them wouldn't really save that many polys.

    Well very specifically here, in your paintover there are also verts connecting the shapes. So its just a bit nonsensical to detach that area. What benefits does it give?

    As more general advice, randomly detaching stuff isn't a good idea. With a proper baked workflow, hard edges/sgs shouldn't show up as seams in the end result either.

    I tend to only use separate mesh chunks when:
    A. A part needs to animate
    B. A part needs to be detached(silencer, scope etc)
    C. Two parts are going to give you intersecting problems if not detached/exploded or you're creating acute angles that will result in the cage folding over itself.

    Otherwise its good to keep stuff merged and solid as it:
    A. Doesn't make that much different on your triangle count
    B. Creates less seams - you get more of a seamless highpoly bake
    C. Results in less wasted uv space: IE: excessively interesecting meshes to save a few tris will end up with a lot of occluded UV space, UV space is generally at more of a premium than triangles.
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    @Mark: My slide, and main body are 2 different pieces. So, gsokol's method might be the best. (tell me if I'm wrong)


    The different colors, are different pieces of geometry (floating). I made the slide, and the main body 2 pieces on purpose so that I could animate it later.
    color.jpg
  • Mark Dygert
    Options
    Offline / Send Message
    EarthQuake wrote: »
    Well very specifically here, in your paintover there are also verts connecting the shapes. So its just a bit nonsensical to detach that area. What benefits does it give?

    As more general advice, randomly detaching stuff isn't a good idea. With a proper baked workflow, hard edges/sgs shouldn't show up as seams in the end result either.

    I tend to only use separate mesh chunks when:
    A. A part needs to animate
    B. A part needs to be detached(silencer, scope etc)
    C. Two parts are going to give you intersecting problems if not detached/exploded or you're creating acute angles that will result in the cage folding over itself.

    Otherwise its good to keep stuff merged and solid as it:
    A. Doesn't make that much different on your triangle count
    B. Creates less seams - you get more of a seamless highpoly bake
    C. Results in less wasted uv space: IE: excessively interesecting meshes to save a few tris will end up with a lot of occluded UV space, UV space is generally at more of a premium than triangles.

    I totally agree with all of those points.
    The only reason I was suggesting to detach the trigger guard was that the seams would be in a spot commonly covered and more than likely obscured from view. The polys where the guard attaches to the barrel will probably never be seen. The break along the handle landed on a pretty hard edge which, if you're going to have a seam it might be a good spot. Of course if it doesn't work out you can join it all together again. It would be something I would test, if it worked great, if not change it and move on.

    I was thinking detach the trigger, that just makes mechanical sense, then thought maybe you could get away with detaching the trigger guard also? If the specs for the weapon are generous enough leave it as joined, if not this could be a good spot to optimize given its low visibility.
    GunTopoTriggerGuard01.jpg


    This is probably ideal, if the specs support it, which is a bit of a wild card and pretty specific to the weapon, the game and the hardware it will run on.
    GunTopoTriggerGuard02.jpg
    I would keep the center seam on the trigger and trigger guard so they can be mirrored.
  • Mark Dygert
    Options
    Offline / Send Message
    BenHenry wrote: »
    @Mark: My slide, and main body are 2 different pieces. So, gsokol's method might be the best. (tell me if I'm wrong)
    Oh yea slides move... duh. This is where doing this kind of stuff through paint overs is a pain in the ass.

    In that case:
    GunTopo03.jpg
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    Thank you so much guys, this is really going to help.
    Here is the last challenge, those n-gons in the blue circles.
    slide.jpg
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    Down to a total of 1500 polys, and 3000 tris.
    I decided to do this to the slide.
    slide_2.jpg
  • Mark Dygert
    Options
    Offline / Send Message
    That works pretty well. You could merge the convergence points into one single point to drop a few more tris. Since you have two spots like that it would start to add up to some pretty good savings.

    Also I think you'll need to break off the inner part of the ejection port because I'm pretty sure that animates separately.
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
    Agreed about the ejection part. Need to figure out how to setup something like that for the inside of the gun.
  • BenHenry
    Options
    Offline / Send Message
    BenHenry polycounter lvl 11
Sign In or Register to comment.