How do I fix my workflow for trying to make real-time clothes?

JustinT
null
Creating real-time clothes has always been my weakness, and I'm not sure if I have the proper workflow down for creating UV's for clothes with thickness. My current process is
1) Create a base in Marvelous Designer
2) Export out obj with thickness rendered
3) Retopo using quad-draw in Maya
4) Extrude result slightly inward until I get desired thickness for clothes (outer and inner UV's are stacked on top of each other)
5) UV the edge "rims" (the thick parts aka the sleeve area, the bottom-most area, and the hood opening) so they're not undefined in UV space
 6) Bake in Substance Painter, XNormal, or Marvelous Toolbag 3
7) fail every time?????????????

In the SP shot the normals for ONLY the front half of the sweater are seemingly reversed, and I also get these strange shading artifacts on the sleeve. Idk which stage my problem is coming from, I could really use the help!





Replies

  • CarlCraft
    Offline / Send Message
    CarlCraft polycounter lvl 6
    You shouldn't stack the UVs then bake. The outside/inside will fight for what part is getting baked, poorly explained maybe but basically both parts are "kind of" getting baked and that's a problem. Try to only have the outside in your lowpoly, bake, then extrude the inside in lowpoly. This will result in your inside having flipped normals as outside and won't be correct, but it's probably fine as you won't see the inside that clearly I'm guessing.
  • Eric Chadwick
    Better to not add the inside surface at all. Only extrude at the openings, after you bake, and only what you can see. Unseen vertices are a big waste, runtime memory is precious.
  • Mark Dygert
    Agreed, you shouldn't shell the geometry unless you really need to but if you do, move those inner pieces to their own space or offset them exactly 1 unit to the right or left outside of the 0-1 space. That way they still pick up the right texture but they aren't rendering on top of the other UV shells.


  • JustinT
    If I'm getting this right from all of your replies, the correct method is to 
    1) bake outer shell of clothes
    2) extrude inward
    3) (if the inner clothes geo is needed) offset inward shell 1 unit right of UV space for unique normals

    That makes sense, I'll try it after work tonight. However, what if the clothes has a clear visible inside, like the head part of a hoodie, or the inside of the skirt? 
    If I'm making a full real-time character and am using a multi-tile workflow for texture maps, is it correct to just offset all the visible inside shells from all objects into one UV map? Or is it better to abandon multi-tile texturing completely and restrict each object to the 0-1 space (and offset inside parts over as necessary)?

  • Eric Chadwick
    If this is a portfolio piece, and not for an actual use in a game, then just use a reasonable number of separate textures. For a portfolio piece, 3-4 is probably a realistic limit, at 2048 each. Use smaller if it makes sense, but don't over think it. Quality is more important than optimization, when making portfolio work.
  • slosh
    Offline / Send Message
    slosh polycounter
    Am I to believe you are using whatever comes out of marvelous and going straight to bake?
  • JustinT
    If this is a portfolio piece, and not for an actual use in a game, then just use a reasonable number of separate textures. For a portfolio piece, 3-4 is probably a realistic limit, at 2048 each. Use smaller if it makes sense, but don't over think it. Quality is more important than optimization, when making portfolio work.
    It is just for personal work, but my goal is to produce game assets, so good to know!

    slosh said:
    Am I to believe you are using whatever comes out of marvelous and going straight to bake?
    I'm aware that MD doesn't give the cleanest/most realistic geometry, but I try to get the basic form as close as possible to the final look so there isn't as much sculpting involved in Zbrush. I know I need improvement in both areas, so it's a work in progress!
  • Mark Dygert
    Most games and all of the major 3D packages support 2 side materials so unless your cloth has actual thickness that must be represented it's fine to not shell the geometry and just tick a box in the shader. you might want to shell something so it doesn't look like it's floating above the character but again that's a very specific decision.

    I agree, only shelling or capping the areas that matter will save you a bunch of tris and precious UV space.

    2 sided mats, do come at a slightly higher rendering cost because it will render that geometry twice, first to get the lighting on the outer shell then to get the inner shell, so keep that in mind. It's not something you want to do on all objects, but if it allows you to shave out a bunch of triangles or keeps you from having to curate specific areas, then it might offset the cost. I don't want to make it sound like it's an expensive shader trick, It is less expensive than opacity and only slightly more expensive than the cheapest shader. I doubt you would see it affect your FPS, especially if it's a portfolio piece. 

    I agree, optimization is important but the question of weather you shell it, or use a shader will be pretty specific to the game, the engine and the model. It's also not hard to change so hardly anyone is going to freak out and use it as an excuse to not hire you.

    Your technical decisions will come up in an interview, if they don't bring them up you probably should. It will help if you can explain the other routes you can take and why you choose this route for this piece but that you can easily modify it to suit other needs. Being flexible and offering your higher ups different avenues is important to getting something that looks good, in game.
Sign In or Register to comment.