Home Technical Talk

Mobile Asset and Optimization. Tips Please

polycounter lvl 8
Offline / Send Message
Shadow2Matrix polycounter lvl 8
Alright so I will provide reference pics. I am making assets for mobile in Unity. I have this asset in which I made a Low and High. However, I wanted to keep my low under 1.5k I really dont know what a good poly goal is so I tried to keep it as low as I possibly could.

However, when I try to bake these cylindrical objects my normals look like they have sine waves running accross. FYI I was going to clean up bakes in photoshop. That is not final of course but I know I need to keep adjusting. I just dont know how properly get those cylinder edges to bake right. I read on a thread to bevel those areas but it still did not look quite right. Does anyone have suggestions? A buddy said to make those cylinders high on the low and bake THEN remove some polys while preserving UV's?
I really want to bake my objects but all this constant adjusting is so frustrating and time consuming? Almost forgot, I do have my objects exploded in a seperate scene.

If anyone has links or advice on a faster workflow that gets me equal or better results please throw them at me! THANK YOU GUYS!

Alright so after that issue, my other is, why are Indented "Extrusions" not showing up? Not sure if I should bevel everything to get that info or extrude out and invert normals?

Replies

  • mikhga
    Options
    Offline / Send Message
    mikhga polycounter lvl 8
    I would recommend having a read through these threads:

    http://www.polycount.com/forum/showthread.php?t=81154

    http://www.polycount.com/forum/showthread.php?t=107196

    The reason you get waviness in your normal-map is because you have discrepancy between your low-poly and high-poly mesh; the cylindrical parts on the high-poly mesh are almost perfectly circular, whereas on the low-poly they are not. Adding more geometry would most likely help to reduce the issues.

    Just a really quick example I did:

    01.jpg

    02.jpg

    On the left I used 16 sides on my low-poly, and it works fairly well, with a regular high-poly mesh. On the right I used 8 sides and a different approach for my high-poly. I made a copy of the low-poly and added in some support edges and then set all edges to soft. I usually use this method for small low-poly objects that don't require too much detail.

    I also wouldn't recommend editing your normal-maps in Adobe Photoshop to fix baking artifacts, as its an inefficient way of working.
  • Shadow2Matrix
    Options
    Offline / Send Message
    Shadow2Matrix polycounter lvl 8
    @mikhga I read through the forum several times. The technical details are hard to grasp. What I did take was obvisouly match your low with your high as much as possible in terms of shape. Ive been transferring normals from a super high to an almost too low poly low version and causes that extreme waviness.

    Some of the confusing matters. Bevels were popularly recommended at some point and then suggested that if your low is wll crafted, a bevel should not be a quick fix for waviness.

    Also, an averaged cage means?? Is that like not manually pushing verts? If I do push verts Id have to push them all together?

    Another thing is, the cage ignores all smoothing groups, but in ur uv, split anything that has hard 90 degree angles? Does this account for smoothing groups as well?

    Should 90 degree eges by angled out?

    At the end of your low poly cylinders, you should have an extra edge loop to negate that bad skew?

    I might be overthinking it but I really want to get this right. Ive been baking and re baking and retopo(ing) for two weeks on this simple model and its so frustrating. If I have this clarified, I will be golden. Its hard to not quit which is why I am here I am just having a hard time understanding on how to properly do this step by step.
    Generally I dont mind the poly count tpp much but being that this is for mobile, I was trying to go really low and that is when the errors were extremely noticeable and not negligible.

    EQ said he doesnt manually like to adjust cage by verts so how is the cage adjusted? Do both his models match so well that the cage is automatically perfect?

    How do I average a cage?

    If anyone can clarify just a bit more, thatd be great. Thanks
  • mikhga
    Options
    Offline / Send Message
    mikhga polycounter lvl 8
    An averaged cage basically means that the baker (xNormal, Maya, 3DS Max, etc.) will not take into account the normals of your low-poly mesh when casting the rays that catch any of the detail that differs between your low-poly and high-poly.

    If you don't use an averaged cage then wherever you have a hard edge / different smoothing group the cage will physically split at that edge, and cause artifacts along those edges in your normal-map.

    In my experience you should always be using an averaged cage, because there is not really any reason not to.

    The easiest way to use an averaged cage in xNormal, is to simply make a copy of your low-poly in 3DS Max or Maya and push out the vertices along their normal, to "inflate" the cage. Make sure it just about covers both your low-poly and high-poly mesh and then add it in xNormal by right clicking on your "Low definition meshes" and selecting "Browse external cage file".

    Wherever you have a hard edge or a smoothing group split you also need a split in your UV's, but not necessarily the other way around. Otherwise you will get seams along those edges. This is because the baker will be unable to account for the massive difference in normal angle without the proper edge padding, meaning you need to split the UV's to allow for that to happen.

    You can add in geometry in certain areas to reduce skewed details, but that will only be necessary if you actually have any detail that will otherwise be skewed.

    I can't speak for EarthQuake, but I would assume that what he means is that since his low-poly and high-poly meshes are generally so well aligned by default, he only needs to push out his cage uniformly to get good results, and not go into certain areas and manually tweak portions of the cage to make it fit better.

    I hope that gives you some clarification. If I made any mistakes or errors in my explanations I hope someone will correct me.

    I really recommend you to read through this part of the Polycount wiki:

    http://wiki.polycount.com/wiki/Normal_Map_Modeling
  • Shadow2Matrix
    Options
    Offline / Send Message
    Shadow2Matrix polycounter lvl 8
    @mikhga
    http://www.polycount.com/forum/showthread.php?t=81154&page=8
    I hopped into your post and then this one later but all the technical details are hard to cram and understand in one sitting and I can understand how inifinitely frustratuing it is for everyone to explain.


    So to sum it up in a nut shell, having an "averaged caged" mesh is referring to my low poly having cuts in the uv whervere there is a hard edge or difference in smoothing group??
  • mikhga
    Options
    Offline / Send Message
    mikhga polycounter lvl 8
    No, the need for UV splits wherever you have a hard edge is something completely different. An averaged cage simply means the cage disregards the normals of your low-poly mesh, as they are averaged over the entire cage mesh. I can't speak for 3DS Max, but as far as I am aware xNormal does not use an averaged cage by default, whereas Maya does.
  • Shadow2Matrix
    Options
    Offline / Send Message
    Shadow2Matrix polycounter lvl 8
    Okay, Im understanding that averaged cage means normals are disregarded, but do I need to do anything to make sure the cage is "Averaged" or is it already set up that way?

    I do use 3ds max so we might be thinking differently.

    In other words, how do I know if I have an average cage or how to set one up in max?

    All im understanding is that the low poly normals is disregarded but I dont understand how that helps? I mean I figured once I bake, all my normals will be reconfigured anyways so anything before that doesnt matter normals wise.
  • mikhga
    Options
    Offline / Send Message
    mikhga polycounter lvl 8
    After a quick Google I found these tutorials, but I don't know how accurate or actual they are.

    [ame]https://www.youtube.com/watch?v=D16uE0IBuLo[/ame]

    [ame]https://www.youtube.com/watch?v=ZFSXtjFI9ig[/ame]
  • Shadow2Matrix
    Options
    Offline / Send Message
    Shadow2Matrix polycounter lvl 8
    Hmm Ive been watching the first tutorial vid several times. I remeber the first day it was like reading a foreign language. The more I researched, the more everything seemed to make sense. According to this video in part I have been doing most things right. The only thing I was not aware of was cutting seams on hard edges and not matching the low as close as possible to the high, which was a bit confusing because after all you are doing this to reduce as much as you can. It does explain the super waviness issue. Im trying to bake a full 20 sided plus into a 6 sided cylinder and that is a major diference. I also extruded in sharp 90 degress. I will start to make the high poly a bit "beveled in" instead of harsh extrusions so the rays can capture those angles. I will try again and post results.

    Assuming an averaged cage is standing for something not regarding to max? Usually I just epxlode my meshes and I do have to manually adjust verts here and there and usually clean in photoshop which is what EQ is trying to say in an avoidable workflow. Which is what im trying to learn to avoid.

    I will probably just watch both vids thoroughly once more and then try to match poly's better and make those "hard edge cuts" and post results.

    @mikhga I Highly appreciate you having a response for me btw. You have no idea how grateful I am. It seems like a repetitive lost cause topic in here but Im really trying to get nice at this it just hasn't been easy to fully undestand with all the tech talk, software differences, and preferences in workflow.

    FYI for everyone, I know some tools have become industry standard but my focus is strictly max and photoshop for now. I cannot add more to my workflow if I still yet to grasp the fundamentals... I know if I get this right, my model quality will skyrocket and I will begin to experment with other software immediately. Keep the suggestions and explanations coming please and pretend I dont know a damn thing. Its cool.
  • mikhga
    Options
    Offline / Send Message
    mikhga polycounter lvl 8
    Yeah, just try to keep your low-poly and high-poly meshes as close as possible while still being as optimized as possible.

    No worries, I'm glad to help. Let me know if there's anything else you have questions about. :)
  • Ged
    Options
    Offline / Send Message
    Ged interpolator
    its worth noting that most mobiles can handle a lot more polys than people realise these days, you could easily double your triangle count and most likely see no difference to your games performance. For mobile game development I think a good rule is go for quality first while keeping it relatively low poly then if your game is struggling to run well, do an optimisation pass on your assets.

    You can always easily optimise an asset that is too high quality at any point and your game will look good. Its really difficult to take a heavily optimised asset or game and make it higher quality.
  • pixeldamage
    Options
    Offline / Send Message
    pixeldamage polycounter lvl 14
    I'm constantly shocked at how much it's possible to push current smart phones (up to the last four-five years eg. S3 and above). In our game my characters are around 6k tris and perhaps most surprisingly (for me) was it's not the GPU that will bottleneck first but the CPU when it has to move those verts on a skinned mesh during animation. Even so, with LODs and carefully assigning max bones per vert etc you can get away with a good amount of detail (though still envious of what would be possible without mobile limits). Perhaps what's been the most surprising is the shader quality it's possible to use now. I worked on a mobile game 5-6 years ago and we couldn't use normal maps. Now I'm using really complex shaders (comparatively - fresnel, gloss, spec, uv2, IBL wraps, extra texture lookups etc) and mobile GPUs are handling it fairly well.
  • pixeldamage
    Options
    Offline / Send Message
    pixeldamage polycounter lvl 14
    duplicate sorry
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    Ged wrote: »
    its worth noting that most mobiles can handle a lot more polys than people realise these days, you could easily double your triangle count and most likely see no difference to your games performance. For mobile game development I think a good rule is go for quality first while keeping it relatively low poly then if your game is struggling to run well, do an optimisation pass on your assets.

    You can always easily optimise an asset that is too high quality at any point and your game will look good. Its really difficult to take a heavily optimised asset or game and make it higher quality.

    This++

    You can shove a decent amount of polys down the pipe. The problem we have at work is with overdraw. We are actually getting better performance using 2 to 4 times the amount of verts on our foliage so I can reduce the amount of translucent pixels and over draw by having my leaf cards be higher poly and fit the alpha mask more tightly.

    Also skinend mesh renderers are evil on mobile. You should work to reduce the amount of joints that influence a skinned vert.

    This is why it is good to profile your games performance often since optimization isn't a 1 size fits all type thing.
  • Shadow2Matrix
    Options
    Offline / Send Message
    Shadow2Matrix polycounter lvl 8
    WOW guys thanks for the feedback. The asset im working on is just to test my skills on a small complete game in Unity. I have coded all of the programming functionality. The assets shown above will be duplicated 4 times and will I hate to admit play somewhat like guitar hero. I just did not want to have really low quality models for a static camera without normal maps and such. I managed to bring them down to 1500polys', I should start getting more familiar with verts or tri's terminology instead. Howvwer when at 1500 I could not bake out the high poly detail to the low due to the large difference in cylindrical polys. So I will aim for hopefully less than 3.5k at most. At least you guys gave me the peace of mind that I can still bring the count up and it be industry standard. I will keep the shaders simple to unity's standard shaders. That is just way out of my abilities to script shaders but they usually have normals, spec, and opacity support. The hard part is trying to figure out what is more expensive now... Draw calls from textures or polys. I have to seprate my mesh, and the seprate pieces will be geo supported by alpha's. I also have to split those three large chunks of base pieces so that if I bake I can get nice resolution for small details like screws. Otherwise if I keep that all in one sheet, the density of pixels for small details is small, it gets super distorted even at 2048x2048, which I DONT INTEND on using.

    All in all, Three seperate meshes for one model at 1024 texture sheets, so three sheets of diffuse, a normal, and spec for the two divided non alpha models. All at roughly 3k polys, Does that sound resaonable to you guys for a mobile model? I am still asking due to draw calls and this will be 4 of those assets on screen. Some will also change textures sheets based on in game choices with colors and such. I might or will have to make that seperate as well..

    Thanks Everyone!

    One more thing for @mikhga, would you recomment making all of my smoothing groups 1 or sperating them as they should? Both videos due it differently, just wanted to see if anyone's tested it and see what results they got.
  • mikhga
    Options
    Offline / Send Message
    mikhga polycounter lvl 8
    It depends on a lot of things. However, I would probably advice you to separate your smoothing groups wherever you will otherwise get weird shading on your model, on sharp corners and such.

    Have a look at this video as it explains it quite well:

    [ame]https://www.youtube.com/watch?v=ciXTyOOnBZQ[/ame]
  • Shadow2Matrix
    Options
    Offline / Send Message
    Shadow2Matrix polycounter lvl 8
    Okay so I have provided pics of my new low poly. It is >>almost<< finished. However, I stopped because as I am splitting UV's to where I have smoothing group hard edges, the unwrap seams are exponentially growing and this workflow seems (no pun intended) to be extremely destructive for any tileable textures or just any seamless texturing in the future. I have cut where all my hard egdes are and it just looks like too much and that I may be doing this wrong.

    I am referencing the thread because by default and I am using max, the averaged cage projection method is apparently in use. Does this mean that my model can just be unwrapped normally and I do not have to be wary of smoothing groups? If thats right then I dont see why anyone would use any other method, you skip extra steps and seamless texturing becomes infinitely easier thanks to them stitched UV's.
    But wouldn't that create weird shading? I've baked some models where the shading is fine and then there were some where the light would just be ridiculously dark in some areas and wayyyy lighter on others. If that is what the weird shading is.

    If this is not applicable to a proper method that works.... ^^
    Then,

    Is it possible to unwrap my model and add those freebie splits where they are applicable and keep the rest smooth or would it be best to have a hard edge wherever there is a UV Seam?

    If this is also not an applicable to a proper method that works.... ^^
    Then,

    Do I keep doing what I have been and Unwrap LP Model > then split more UV's where hard eges are present and just have to suck it up and deal with so many UV splits in the map?
  • Shadow2Matrix
    Options
    Offline / Send Message
    Shadow2Matrix polycounter lvl 8
    I must say I got a pretty darn good bake
    There are a few mino obrvious errors in bake due to high poly trouble but I will correct those rather quickly in photoshop.

    Now I need to modify my workflow for speed. Here is what I do.

    -HighP
    -LowP
    -Smooth Groups
    -UV in Headus
    -Cut extra seams on UV splits
    -Bake

    Issue: The UV is too crazy for seamless texturing especially tileables. I want to try and cut that issue out.

    Possible Researched Solutions: One smoothing Group for Everything but that clearly is too heavy on drawcall and waste of verts.

    Maybe I can add one smoothing group per element?

    OR maybe I can add one smoothing split on Every UV seam I have and thats it?

    I could use suggestions. Thanks!

    I have been updating my results but If I get no responses I will drop it. I see the tedious never ending battle of baking between noobs and vets and understand that it can be annoying.
  • Ged
    Options
    Offline / Send Message
    Ged interpolator
    really good result, just keep at it, theres no magical formula to make your workflow faster, you just have to try things and see what works for you. If you can pre plan all your assets you can work smarter and save time, examples of this:

    1. modular assets
    2. tileable or reuseable textures
    3. decals to add small details so that you dont need massive textures eg screws, nuts, bolts, windows, doors or whatever, depends on the scale of your object on screen and the kind of game really.
    4. Clever use of vertex colours can save time, eg using vertex alpha to add fade off to objects etc
    5. efficient clever shaders that can be set up to use vertex colours to control animations or effects can save on making lots of versions of the same texture etc.

    draw calls shouldnt be an issue unless you have a lot going on behind the scenes or if you are terribly inefficient and split your assets into loads of meshes and materials! overdraw is often a killer in mobile performance, eg lens flares or full screen effects.
Sign In or Register to comment.