Home Technical Talk

"clean" topology?

polycounter lvl 8
Offline / Send Message
Olli. polycounter lvl 8
hey ive been wondering what this "clean" topology everyone has been talking about is.

So far every time i have made a low-poly model for realtime use, ive followed a simple optimization plan of having every single vertice commit to the silhouette of the model in some way (basically, no verts on straight edges)
sometimes this forces me to have elongated polygons on my models, which i have gotten the impression here that is a bad thing.
The thing is i've never had any problems with long polygons or "bad" topologies.

heres an example i made to illustrate my point:
topology.jpg
the RIS rail is just an example, so dont get caught in explaining the best way to do RIS rails, i know them all.

Like i said i've never had any problems with "bad" topology but im just wondering if there are hidden downsides or something, since from what i've read here everyone seems to be happy to waste a few extra polygons to keep the mesh clean..

Replies

  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
    Well, in UDK the upper one as a static lightmapped mesh would look pretty horrible. Specular reflections tends to get very distorted with really stretched topology.
  • JamesWild
    Options
    Offline / Send Message
    JamesWild polycounter lvl 8
    Under UnrealEngine, if you set the lightmap res to 0, it'll store the light level at each vertex meaning if you have any variation you'll have very visible fanning lines. And if the corners are in shadow, the whole thing will be tinted.

    I'd advise actually having the top bits as floating geometry for most use cases, if this is small.
  • Olli.
    Options
    Offline / Send Message
    Olli. polycounter lvl 8
    ok i've always used cryengine, so thats probably why i havent had any problems.. afaik CE2/3 does all lighting dynamically.

    im not really sure why people even use UDK.. seems like CE3 is superior in pretty much everyting, especially after the latest patch.

    except maybe performance, but high performance low visuals will soon be history anyway.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    I don't think the long, thin triangles are as friendly to the rendering. The wiki mentions something about them being sub-pixel ('having lots of triangles that contain very few pixels/triangles smaller than a pixel will lead to stalls in filling the pixels and thereby hits the fillrate').

    So I wouldn't be surprised if the latter might even be better, or even if you sort of zig-zagged them together (each rail come down to 1 vert each instead of two, centered between the verts you have now).
  • Olli.
    Options
    Offline / Send Message
    Olli. polycounter lvl 8
    alright that was the answer i was looking for.. i was afraid it had an impact on performance..
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    IIRC, it's not only that, triangle stripping is harder to do with these triangle fans, which could make certain vertices have to be read twice, and then there goes your savings of 56 triangles.
  • unstoppablex
    Options
    Offline / Send Message
    I always did the upper photo method. I've never had problems at all, in max or udk. although I'd say this example is pretty extreme.
  • Sandro
    Options
    Offline / Send Message
    Yeah, both examples are quite extreme, but I find models with a bit more reasonable polygon distribution easier to work with and cause less headaches later.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    It kinda irks me when people ruin the topology of their model, and make Normal/Stripping and Texture harder just to save a couple of polies.

    Unless butchering your model is to save a couple of hundred/thousand vertices in a very tight budget, 56 isn't going to be something anyone notices.
  • Olli.
    Options
    Offline / Send Message
    Olli. polycounter lvl 8
    well instead of thinking about 56 triangles, you should think about it as saving 14% polygons.
    stuff adds up fast with large models.

    also i realize the examples are really extreme, but i just made them so everyone is clear about what i meant.

    Sandro: When i optimize my models, i do it at the very end, meaning i dont really work with them after that, except for maybe UV mapping..
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    The above mesh would also run a higher risk of generating a wonky normal map in my experience..
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    The problem is that you *assume* that less polygons is better. It's just not always the case ...
    Also, considering how simple this object looks ... why don't you save yourself all that hassle and and simply split off the tiny pieces from the long beam ?
  • lloyd
    Options
    Offline / Send Message
    Olli. wrote: »

    im not really sure why people even use UDK.. seems like CE3 is superior in pretty much everyting, especially after the latest patch.

    oh my
  • Sandro
    Options
    Offline / Send Message
    @Olli
    Sandro: When i optimize my models, i do it at the very end, meaning i dont really work with them after that, except for maybe UV mapping..

    Well, it might be the end for you, but for your asset it's hardly so. Model has to be uv mapped and baked with as little smoothing groups as possible (spartan optimizations make this harder) It will be later passed down to animators for skinning and exported to engine. In engine shader artist might come up with material that relies on vertex normals for calculating certain effects.

    If you are working on static env. assets and level artist relies heavily on vertex blending then you need to provide him with cleaner topology to make it work. Sometimes assets also get vertex-lit or use vertex channels to store ambient occlusion for example (or tons of other stuff as you often don't have luxury of allocating unique texture space for everything and reuse tiling textures and rely on vertex masks to make them look unique)

    So, there are lots of different variables to consider when making optimizations.
  • Olli.
    Options
    Offline / Send Message
    Olli. polycounter lvl 8
    well i mostly make hard surface assets, and i also UV, texture, skin and animate all my assets if need be, and especially in the case of hard surface stuff, i've found its more important to have proper vertex placing, and it doesnt matter as much how the edges go between the vertices.

    also lloyd i'd appreaciate it if you explained why you think UDK stands a chance compared to CE, instead of just saying "oh my"
  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
    Olli. wrote: »
    well i mostly make hard surface assets, and i also UV, texture, skin and animate all my assets if need be, and especially in the case of hard surface stuff, i've found its more important to have proper vertex placing, and it doesnt matter as much how the edges go between the vertices.

    also lloyd i'd appreaciate it if you explained why you think UDK stands a chance compared to CE, instead of just saying "oh my"

    Oh come on stop being so defensive :P
    You never explained why Cry Engine 3 is superior in almost any way either. ;)
  • Olli.
    Options
    Offline / Send Message
    Olli. polycounter lvl 8
    im not being defensive, i just know cryengine 3 is state of the art in pretty much everything it does, and i dont know much about UDK, so it would be nice if someone explained the pros and cons instead of just making snide remarks

    edit: some reason why i think ce3 is better than UDK:
    no lightmaps, everything done dynamically.
    best skin shader out-of-the-box i've seen in any engine.
    in-engine tools like flowgraph which enable you to do pretty much anything you want without knowing any c++
    full 24 hour TOD editor with more parameters than anyone will ever need.
    dynamic destruction system, and extremely easy to set-up prebroken objects in 3ds max or whatever you use..

    thats just a start, i cant bother typing every single feature..
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    udk has all the features you listed expect for fully dynamic lighting, and the skin shader you would need to make your self, but udk provides a very good shader editor to work with.

    it can be argued per situation what is better pre-baked lighting with Global illumination, or a fully dynamic soultion.
  • Olli.
    Options
    Offline / Send Message
    Olli. polycounter lvl 8
    i've always viewed UDK as a more conventional "game" engine, for games like unreal tournament, counter strike, halo.. etc, where levels usually consist of enclosed spaces and the feel is really game-like. whereas CE is more open and lifelike.

    probably because of the games made for each engine (UT and GOW vs C1 and C2)
  • imperator_dk
    Options
    Offline / Send Message
    imperator_dk polycounter lvl 10
    Smoothing and normal issues aside that you might encounter in some engines, long thin triangles like the ones depicted in the first view also take a hard toll on your fill rate as they often have quite poor quad efficiency on the gpu.

    The modern gpu fills triangle in 2x2 areas on the screen and if too many quads fall outside of the actual triangle it is trying to fill you're largely wasting your pixel fillrate. Ideally you want to find a middle ground between the two posted examples where you are quickly eliminating your triangles without getting too many super stretched ones.

    You might also find yourself in a game scenario where fillrate is not an issue at all but your hardware is choking on vertice counts which will lead you to prefer the first example.
  • unstoppablex
    Options
    Offline / Send Message
    They both have advantages, CE3 is more easier to get setup and have a great scene that looks awesome, great for portfolio. However UE3 is a more optimized game engine, more options then most engines and very stable, which is why it is the leader in most used engine in the game industry.

    So if your a intermediate user(with UE3 or CE3), you’re more likely to produce a better scene in CE3 because of how simple they made cry engine to create a realistic scene. However, if we compare an experienced pro user of CE3 and UE3, UE3 will definitely come out on top.
  • Gestalt
    Options
    Offline / Send Message
    Gestalt polycounter lvl 11
    As I think someone said before, I wouldn't do either of those; make the beam one piece and each of the small pieces floating. With hard edges like that you might as well detach and clean up, save on performance while also keeping nice meshes that should render well.

    As far as the Cry vs UDK discussion, I've used both: Cry was super buggy and would crash regularly doing relatively standard things, had overall less control in favor of dynamic solutions (not something I like and not better in terms of bang for buck quality by any means; it's easier and better looking than if you didn't know what you were doing in UDK, but dynamic lighting is not there yet).

    If you want to throw an asset in and get something that looks pretty decent right away, without doing much of anything, then Cry is better. If you want more control, better tools, greater stability, and potentially more visual bang for the buck then UDK is the way to go imo. The notion that UDK is only for gamey fps' with small areas is completely false and shows a lack of knowledge about the sdk; UDK is highly customizable and could be used for pretty much any game.

    UDK certainly has its shortcomings and can be fickle and demanding in certain ways, but it remains my sdk of choice for good reason.
  • iniside
    Options
    Offline / Send Message
    iniside polycounter lvl 6
    CE3 never crashed and I never noticed more bugs than in UDK.
    What do you mean by dynamic solutions ?
    Dynamic Lighting ? CE3 is far superior in this terms over UDK.

    And no. It's not any secret that UDK do not handle big open areas very well. Especially with dynamic lighting only.
    But to be honest it's worth mention that CE3 open areas support were dumped down because of poor terrain solution.

    And at very end it's matter of baking lightmaps. In UDK it can take sevral hours depending on what you are doing. And at the end it may prove you have to bake again because of something.
    In CE3 you do not have such problems.

    Anyway. I'm never going back to engine to relies on lightmapping.
  • unstoppablex
    Options
    Offline / Send Message
    iniside wrote: »
    Anyway. I'm never going back to engine to relies on lightmapping.
    You could always turn off lightmaps. It's not a requirement to be used so I don't understand why it's a disadvantage.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Performance wise, once you start adding multiple dynamic lights, the FPS drop very quickly. UDK is designed to rely on lightpmaps for most of the lighting. The dynamic lights in CE3 look better than the dynamic lighting in UDK (they are pretty on par baked in UDK vs real time CE3).
  • Gestalt
    Options
    Offline / Send Message
    Gestalt polycounter lvl 11
    iniside wrote: »
    CE3 never crashed and I never noticed more bugs than in UDK.
    What do you mean by dynamic solutions ?
    Dynamic Lighting ? CE3 is far superior in this terms over UDK.

    And no. It's not any secret that UDK do not handle big open areas very well. Especially with dynamic lighting only.
    But to be honest it's worth mention that CE3 open areas support were dumped down because of poor terrain solution.

    And at very end it's matter of baking lightmaps. In UDK it can take sevral hours depending on what you are doing. And at the end it may prove you have to bake again because of something.
    In CE3 you do not have such problems.

    Anyway. I'm never going back to engine to relies on lightmapping.

    The CE3 sdk would crash ALL the time (enough so that after a week or two of solid work I abandoned a project because I felt I was just wasting my time), and I wasn't alone with that, but perhaps more recent releases are better about it.

    Yes the lighting was what I primarily meant by 'dynamic solutions' but there's is also a difference in the approach toward other areas and the general mentality of the sdk, whether that be setting up some type of 'ecosystem' or day/night cycle, cry sort of has its own approach to things while UDK is more of a blank slate. This may go back to the op's idea that CE3 is 'living', but the difference I see is that for actual functionality UDK is much more about scripting while CE3 has its interpretation of things.

    As for handling large environments, UDK used to be poor in that regard, but I wouldn't say so anymore. It's actually a very active area in its development right now; there are a lot of good features and approaches.

    I will prefer baking lightmaps until dynamic lighting is actually good, which is a tall order to say the least.
  • iniside
    Options
    Offline / Send Message
    iniside polycounter lvl 6
    You could always turn off lightmaps. It's not a requirement to be used so I don't understand why it's a disadvantage.
    In UDK ? You can't. You will alawyas get some sort of artifacts, perfomance issues or so on. Because of poor real-time lighting implementation.
    And it is disadvantage because I have to rebuild them each time I change something. And I like change something a lot.
    Yes the lighting was what I primarily meant by 'dynamic solutions' but there's is also a difference in the approach toward other areas and the general mentality of the sdk, whether that be setting up some type of 'ecosystem' or day/night cycle, cry sort of has its own approach to things while UDK is more of a blank slate. This may go back to the op's idea that CE3 is 'living', but the difference I see is that for actual functionality UDK is much more about scripting while CE3 has its interpretation of things.
    I disagree. Entirely. In UDK you will end up with ToD solution similiar to the one in CE3 anyway. Because I don't really see how diffrently Night-Day system may work, even on most fancy planet in universe.

    And it depends what are you doing, but overall FreeSDK is much more modable than UDK. You can essentialy get rid of everything except engine, and do it from scratch. That insluding custom server if you want to make 100% online game.

    And what do you mean by ecosystem ? You can setup in CE3 anything you want (game wise).
    As for handling large environments, UDK used to be poor in that regard, but I wouldn't say so anymore. It's actually a very active area in its development right now; there are a lot of good features and approaches.
    Still is. Yeah Landscape is very good. But try to setup large level without lightmapping and look at perfomance. Yeah. Now it probably wouldn't be much of the problem for Radeon 7850, but on my old GeForce 9600 it was. While CE3 had over 30 fps.
    And for that matter I can't do large lightmapped levels in UDK. 12GB ram is not enough to build them.
    I will prefer baking lightmaps until dynamic lighting is actually good, which is a tall order to say the least.
    I 100% disagree. Dynamic Lighting from CE3 look far better than Lightmaps in any engine. Not to mention CE3 do not need bazzylion of hd space nad RAM to look better.


    What I can agree that for most of the time Editor tools are better in UDK. But at the end is not that big advantage.
  • Sandro
    Options
    Offline / Send Message
    It's not about which one is better. Both have their strong and weak points, arguing over them is pointless. Single artist rarely gets to choose engine anyways, unless it's for personal project.

    Fact is, Unreal has rock solid position in the industry. Making SDK free was right step towards making Cryengine more widespread, but it's nowhere close to Unreal yet. Chances are on your next job you'll be using Unreal or some sort of modification of it. So, why neglect it? Learn both.
  • Millenia
    Options
    Offline / Send Message
    Millenia polycount sponsor
    I would collapse some of those loops, but not all of them. Maybe half-2/3rds?
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    iniside wrote: »
    What I can agree that for most of the time Editor tools are better in UDK. But at the end is not that big advantage.


    I would disagree. UDK's material editor alone is well worth dealing with some of the more obvious failings of the engine.
  • iniside
    Options
    Offline / Send Message
    iniside polycounter lvl 6
    cptSwing wrote: »
    I would disagree. UDK's material editor alone is well worth dealing with some of the more obvious failings of the engine.
    I agree. But.. Only if you know how to make shaders. I for example have no idea. My usage of Material Editor was dumped down to using multiply and lerp nodes.
    And on other hand if you know how really make shader you can write in HLSL anyway.
  • JamesWild
    Options
    Offline / Send Message
    JamesWild polycounter lvl 8
    And on other hand if you know how really make shader you can write in HLSL anyway.
    Even when working in other engines I often use UDK to test ideas, as you can see what's coming out of any node at any point in the pipeline.

    Writing raw HLSL using text based code is NOTHING like using the material editor even if the end result is a HLSL shader either way.
  • Olli.
    Options
    Offline / Send Message
    Olli. polycounter lvl 8
    perna wrote: »
    If you never had a problem with it... then what exactly is the issue here?

    I never had a problem with ketchup until someone on polycount told me it tasted bad. Now I am plagued by doubts and insecurities as regards condiments.

    Just because i havent had a problem with it so far doesnt mean i wont in the future.

    Some of the pointers in this thread have already made me realize that even though i didnt know, the long triangles were having a negative effect on my performance.

    I find it very hard to measure microperformance of single assets, since the effect on the only performance indicator i know (FPS count) is extremely minimal with just a single asset and basically unmeasurable.

    Now even though i havent dont so before, im now using my work in a larger scale production meaning the small performance losses of my seperate assets would build up, meaning that something that wasnt a problem before would become a problem.

    anyways this thread has helped a lot and i can avoid those long triangles in the future.
Sign In or Register to comment.