Jump to content

Newb questions: scaling clothing; ZBrush; Marvelous Designer.


Ricky Shaftoe
 Share

You are about to reply to a thread that has been inactive for 2828 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi all,

After years of animating, I thought I'd give clothing-creation a try.  I've made a bad mesh T-shirt using ZBrush, and I have some questions.

1. First, I spent some time in ZBrush scaling up the T-shirt so that it would be slightly larger (or so I thought) than the avatar mesh I was using as a body guideline.  But when I uploaded the shirt on the beta grid, it was quite small.  Why is this?

2. Obviously I could then resize it using SL's scaling tools.  But is this the best practice?  Do people make different "sizes" of clothing by scaling it in-game, or in their 3D applications?

3. Now that I've got my bad T-shirt mesh, which makes an awesome plaster cast on my chest, I need to rig and weight it.  I need to use Blender and Avastar for this, right?  I do have an old version of 3Ds Max somewhere, but Avastar looks like a convenient tool.  I don't love Blender, but if all I have to do is rig and weight, I can live with it.  So: Blender and Avastar, right?

4. I like using ZBrush because I'm used to it: I've been using it for years in conjunction with my real-life art classes, and I just think it's fun and easy to use.  Plus, polypainting.  But I don't have much experience making clothing, as I usually sculpt busts and the figure in ZBrush.  Should I be adding something like Marvelous Designer to my workflow?

Thanks in advance.

Link to comment
Share on other sites

1.) Sounds like something with your units setup on importing/exporting is wrong. Try importing/exporting a 1 meter cube until you have that right.

2.) Once the shirt is rigged and worn, it cannot be resized in-world. It's vertices will always snap to their weighted positions. People used to make different sizes in the modeling application, and exported these. There are 5 so called "standard sizes" for female and male avatars, which were used to accomplish that. They are available on the Marketplace for free. There is a download link in the Notecard.
Fitted Mesh was meant to be to make different sizes obsolete, but it doesn't work that well. It's still recommended to hide the avatar body mesh with alpha layers, to prevent it from poking through the cloth.

3.) 3ds Max does work for rigging. However, Avastar has some tools to make skinning/rigging easier, especially for fitted mesh I guess, because of it's built-in body shape slider support. (I never used it myself though, so I can't tell much about it.)
Rigging a T-Shirt in Max is rather easy as well though.

4.) I would recommend to add at least a solid retopo workflow. Be it ZBrush, or Marvelous Designer.

Link to comment
Share on other sites

Thanks for your reply.  I'm glad I asked, as I'll now make sure to focus on getting my import/export sizes correct.

I'm curious about Marvelous Designer, but the subscription rate seems pricy.  (ZBrush was pricy too, but I bought it several years ago, for a one-time fee.)  ZBrush has retopo tools, so I suppose I can make do with those.  I do like the look of MD's snip-and-sew design UI.

Link to comment
Share on other sites

OK, I've been trying to export and re-import a 1mm cube.  ZBrush seems to be chopping my models down by half.

The cube works fine if I export to Blender, save as a new .dae file, and reimport: still a 1mm cube.  But if I instead export the cube from Blender as an .obj file, then open in ZBrush, then immediately save, then use the ZSculpty plugin to export as a .dae file, it uploads to SL at half size.  Half a meter on a side.  Now, I can fix this by doubling its size in ZBrush, or by using the upload options in SL to upload at 2x scale.  But obviously it'd be better to get it right.

Could the problem be in the ZSculpty plugin -- the .dae exporter for ZBrush?  I"ve posted in ZBrush central about that.  Or am I missing something more obvious?

(In other news: Marvelous Designer is now on Steam Greenlight.  Getting more tempting.)

Link to comment
Share on other sites


Ricky Shaftoe wrote:

OK, I've been trying to export and re-import a 1mm cube.  ZBrush seems to be chopping my models down by half.

The cube works fine if I export to Blender, save as a new .dae file, and reimport: still a 1mm cube.  But if I instead export the cube from Blender as an .obj file, then open in ZBrush, then immediately save, then use the ZSculpty plugin to export as a .dae file, it uploads to SL at half size.  Half a meter on a side.  Now, I can fix this by doubling its size in ZBrush, or by using the upload options in SL to upload at 2x scale.  But obviously it'd be better to get it right.

Could the problem be in the ZSculpty plugin -- the .dae exporter for ZBrush?  I"ve posted in ZBrush central about that.  Or am I missing something more obvious?

(In other news: Marvelous Designer is now on Steam Greenlight.  Getting more tempting.)

It's common practice to do the final exports (things that go into the game engine) all with the same program. That would be 3ds Max, Maya, or Blender in most cases. So I would stick with the OBJ Import/Export with ZBrush. Usually ZBrush doesn't produce game ready models anyway. They will have to be retopologized, and/or rigged in another program. So that's no big deal. Zeroing out rotation and scale before exporting and rigging is your friend, too. (Reset XForm in Max, Apply Rotation & Scale in Blender for example)

And yes, seems like the ZSculpty dae exporter is cutting the size of the models in halve.

I don't have any experience with Marvelous Designer, but I do know that it has it's place in game production pipelines these days.

Link to comment
Share on other sites

Thanks for your further replies.  I successfully exported a 1-meter cube from SL to Blender, then from Blender to ZBrush as an obj, then exported out of ZBrush as an .obj back to Blender, then back to SL -- and it remained a 1m cube.  So yeah, the problem was in ZBrush's .dae-export plugin.  As you say, it's not critical to use that; I will be using Blender for rigging and weighting anyway.  Didn't realize I'd have to use it for retopo too; we'll see how that goes.

Anyway, at least I'm ready to start sculpting stuff that's full size, lol.  But first, time to practice rigging and weighting in Blender.  :)

Link to comment
Share on other sites

Well, you don't have to use Blender for retopo. If you can get good results from ZRemesher, you can use that of course. I'm just one of those who like to make it all manually rather than relying on automated things. :matte-motes-little-laugh:

Link to comment
Share on other sites

I purchased Avastar, and I rigged my first T-shirt with no problem at all.  The Avastar UI seems to have changed from the videos I see online.  The videos depict the Avastar avi with several rings around it.  In my (current) version of Avastar, I just see four arrows pointing outward from the base of the avatar.  And the Avastar tab on the left looks different too.  But I figured it out, at least for basic rigging.  Essentially I just had to select both the avatar and the shirt in Blender, then click a button. The T-shirt seems to move perfectly in SL without any adjustment to weighting.  

I assume I won't be so lucky with pants or more complex clothes?

Link to comment
Share on other sites

So now that I can produce a bad but properly-rigged shirt, I'm pondering how to improve, and starting to think about texturing.  My workflow, I think, is something like:

1.export Avastar avi to ZBrush;

2. subdivide the geometry before painting a mask to extract a shirt, to make it easier to paint crisp mask lines for sleeves/neck/waist etc (or is that dumb?);

3. extract shirt;

4. reshape holes and fabric, sculpt details.  I'm used to making organic forms in ZBrush, not the machine-tooled cuts of sewing.  My efforts to cut clean semicircles with the Trim and Curve brushes have been mixed at best.  Maybe I need more geometry, or better geometry.  Should I be Zeremeshing before doing any cutting?  I have better luck with folds and such, as I'm more used to that sort of thing.

5. use this high-rez sculpt to produce texture maps (color maps; normal maps? bump maps? displacement maps? ambient occlusion?  I doubt SL supports all of the above, but I haven't checked yet);

6. possibly retopologize using Zeremesher, thereby reducing poly count; 

7. export to Blender (and possibly retopo there instead of in ZBrush?);

8. rig/weight in Blender;

9. export .dae to SL.

Something like that, yes?  

Also: is there a rough poly-count target for export of a shirt back to SL?  30,000 polys?  The detail will come from the normal/bump maps, yes, not from the mesh itself?

Link to comment
Share on other sites

Sorry, late reply.

I have to admit, I don't do clothes, and I'm no ZBrush wizard, but this how I do it.

Create rough base mesh in 3ds Max with evenly distributed quads across the mesh. Or, if I'm lazy, just with ugly geo and running it through ZRemesher to get sculptable geometry.

Subdividing and sculpting the model.
For steady strokes in ZBrush I activate the Lazy Mouse feature under the Strokes menu.

Dail down the SubD level, or make a copy of the Subtool and run the copy through ZRemesher/Project, and export a reduced version back to 3ds Max. For retopo purposes it doesn't need the full high res model. The high res version is only required to bake normal maps, ambient occlusion maps etc..

Retopo the model with an edge flow to support animation. (If it's a rigged model.)

UV map the model. Create a cage. And export the low poly, cage and bake various map types from the high res model in XNormal.

Create a base diffuse texture with the baked maps in Photoshop, and fill it with colors, and add details etc.. Create Specular/Gloss maps from the diffuse.

The fine details should be only in the normal map/color map. So a triangle count for a T-Shirt should be more in the range of 3000 rather than 30000.

Second Life supports Diffuse maps, tangent space Normal maps, and Specular maps. A Gloss map, and an environment mask are supported through the alpha channels of the Normal map (Gloss), and the Specular map (Env Mask).

http://wiki.secondlife.com/wiki/Material_Data

If that game ready model is done, it's time to create the Level of Detail models, and a physics shape.

Link to comment
Share on other sites

Many thanks for that great reply.  I figured my target should be more in the neighborhood of 3000 polys.  I'm wondering how to get there from my initial model, which typically is around 30,000 polys.  I see that one can retopo in ZBrush by hand using an appended ZAphere and then just drawing vertices, but that sounds like a lot of work for 3000 polys.  ZRemesher is good, but not sure how to use it to get from 30,000 to 3,000.  Maybe just use it several times, with a target of half each time?  Another option is Decimation Master, I suppose?  I'd rather do it inside ZBrush simply because, well, I like ZBrush.  :)

As for specula rmaps: I've tried using the optional ZBrush pluging MatCap Baker to bake in shiny materials directly into my diffuse map.  But so far the results are underwhelming.  Maybe I'm using the plugin wrong.

If instead i draw a specular map by hand right on th emodel, what should a specular map for clothing look like?  Is it just an alpha, with white for high shiny?  A grayscale image, which lighter meaning shinier?  Should I draw this as a separate layer from polypaint, before doing my retopologizing?

Link to comment
Share on other sites

I understand that manually retopologizing seems kinda time consuming. And it really is when never done before. But with a little practice, it's less of a hassle, and can be fun as well. 3000 triangles sounds many. But we retopo mostly by creating quads. So that's only 1500. And of course we use symmetry whenever possible. So that's only 750 polys.:matte-motes-smile: Depending on the software, you don't have to create every polygon on it's own also. It goes as far as there is dedicated Retopo software like TopoGun. Most 3D Modeling programs have some solid retopo tools available though. I never tried the manual retopo tools in ZBrush though, so I can't tell much about that specifically.

The other reason to manually retopo, especially for rigged stuff, is the control over the edge flow. For a T-Shirt the shoulders can be quite problematic to animate without bad distortions. There is some extra care, and extra geometry required to make them work nicely.

With ZRemesher you can set a target poly count. Setting it to 1.5 should give you roughly 3000 triangles. Duplicating the SubTool, hiding the one above the dupe, ZRemeshing, and then make the one above visible again and use Project in the SubTool panel. This is a great way to gain back lost subdivision levels as well. Subdividing > Project, Subdividing > Project etc.

About the specular map. This can be a RGB image like the diffuse map. Yes, bright is more shiny, dark is less shiny. Black will be no shiny at all. Fabric usually doesn't have much reflections going on, and they would be rather dull and uniformly across the surface. 50% grey as a starting point will tell you quickly if you should go brighter, or darker.

The map that goes into the alpha channel of the normal map is the gloss map. This is just greyscale, and it works basically the same as the spec. White is the strongest and sharpest reflection, and darker greys are for rougher, duller surfaces.

Spec and gloss together will give the best results indeed. But it takes a while to adjust them until a convincing result is achieved inworld. So I like to work with layered PSD files in PS for quick edits. Starting with just the spec map, and just playing with the Glossiness value in the inworld build floater may make it a little easier in the beginning.

If you polypaint, you will have to paint on the highpoly model, and that color information will have to be baked onto the UVed low poly model. If you want to paint a spec map, you would have to bake that onto the low poly seperately from the diffuse color map indeed.

I would focus more on the low poly first, UV mapping, and add some basic painting in an image editor. Rigging it and see where the LP has to be re-worked etc.. Once you have that down, you can play with polypainting and how to bake that onto a low poly mesh.

Link to comment
Share on other sites

Thanks for your further reply; it was very helpful.  I made a lot of progress tonight.  Still some questions -- the first two of which are ZBrush-specific, so I probably should ask over at ZBrush Central.

1. I followed your suggestion on using ZRemesher to get down to 3500 polys.  First I duplicated my tool, then Zremeshed, which gave me a hi-poly subtool and a low-poly subtool.  But even with both selected (both "eyes" visible), when I click Project All, it doesn't seem to do anything.  I think maybe I'm supposed to subdivide the new low-poly model before hitting Project All?

2. Anyway, I just went ahead and used the low-poly model as my base, and subdivided it.  I subdivided my 3500-poly tool just 3 times, getting up to about 70,000 polys.  But when I started sculpting or painting on that (pretty modest) high-poly model, ZBrush would start saying "Subdividing into 1 million polys."  When I subdivided one more time, to 300,000 polys, once painting ZBrush would say "Subdividing into 5 mil polys," and the program chugged as if I really did have 5m polys on the screen.  I *think* what happened is I somehow activated dynamic subdivision; I found it lit up.  But even after disabling it, I swear I saw ZBrush automatically say it was subdividing.  Do you ever see this behavior?  How do I stop it?

3. Do I need to click 'generate normals' when importing a mesh?  It seems so.  My first shirt worked fine in SL, except that it looked like a 3000-poly mesh: squares everywhere.  This first shirt just had a color fill and a few lines of polypainting just for testing.  I fixed it, but I'm not sure how.  I went back and retextured it by spraying a texture all over it, and then when I imported the mesh into SL, I clicked 'generate normals' when uploading.  This time the shirt looked great.  I tested again by using the same sprayed texture but this time importing without "generating normals," and the shirt looked low-poly again.  So...I *think* I need to click 'generate normals' when uploading.  But should I be doing this somehow in ZBrush?  I did bake and export a normal map, but it didn't fix the low-poly look of the shirt.

 

Thanks in advance for any advice.  I'm making slow but steady progress, in large part because of your help.  :)

Ricky

Link to comment
Share on other sites

1) Yeah, projecting the detail requires quite a few polys. You can increase the Dist value to 1.0. But it won't do much with too little geometry.

2) Nope, I haven't had something like that happend yet.

3) Vertex normals. In Blender, Edit mode, Face selection mode, selecting all faces, Ctrl+F, Shade Smooth.

It's basically the same as ticking generate normals with an angle set to 180 on import. Setting up smoothing groups, hard/soft edges in the modeling program is an essential part of low poly modeling though.

Link to comment
Share on other sites

Thanks very much.  You're a godsend!  

So smoothing normals is a separate process from creating a normal map.  I wasn't understanding that.  :)  So I always should smooth normals on my low-poly mesh, and probably also include a normal map.

Anyway, I'll try smoothing normals in Blender.  I imagine ZBrush has a similar feature?  I don't mind doing it Blender, but I'm more comfortable in ZBrush.  But I suppose it is better to do this at the very end of the work pipeline?

Link to comment
Share on other sites

Vertex normals and normal maps are a topic on it's own really. :matte-motes-little-laugh: Just one thing for now, if you load the faceted model into the importer, and look at the vertices count, and compare that with the vertex count of the smooth shaded model, you'll notice a drastically higher vert count on the faceted mesh. So with or without normal maps, it's obvious that it's important to keep the number of hard edges as low as possible for game assets. :matte-motes-smile:

Link to comment
Share on other sites

Thanks for the word to the wise.  Evidently SL does enforce some poly limits, but they aren't very strict about it.  I got away with importing my 30,000-point mesh the first time I tried it.  I do think SL drew the line when I tried to import a 70,000-point mesh.  I wonder: are there clothing designers importing shorts with 35,000 vertices?

Link to comment
Share on other sites

The vertices limit is 65534 per mesh. A maximum of 8 Materials per mesh. There is no triangle limit though. Although, there is a caveat where materials with more than 21844 triangles are split into multiple materials. This can have undesirable effects of course. However, it seems like this triangle limitation occurs only with meshes exported with Blender (maybe other programs as well).
For demo purposes I uploaded a mesh exported from 3ds Max with a single material, and ~100k triangles, which worked perfectly fine.

And yes, I guess there are quite a few people who upload meshes with a far to high vert/poly count. Which doesn't mean you should do as well. :matte-motes-wink-tongue: Anyhow, I won't stop you either.

A single shorts with a high vert count isn't that much of a problem. But if everybody is doing it, with every clothing/attachment, we will have only high poly avatars in SL. Skinned/rigged mesh is even more computationally intensive than non rigged stuff. So it's even more harmful if rigged objects are higher poly than they should, and in most case could.

Just recently the Lab introduced the Quick Graphics feature, with which it is possible to set certain limits to degrade avatars with a high render cost to solid color impostors, with no attachments. To counter fight lag from heavy avatars. So it might be wise to keep that in mind and try to keep the Display Weight low.

Link to comment
Share on other sites

Oh, don't get me wrong, I am on board for using low-poly models.  I was just speculating about what others do.

I did successfully use Blender to smooth the normals of my model, thanks to your instructions.  The upload cost was identical.  I didn't pay close attention to whether SL thought my smoothed model had "more" vertices than my unsmoothed one.  Maybe I'll write down the vertex count next time I test this.

Blender worked fine, but part of me still wishes I could do the same in ZBrush.  ZBrush does have a way to preview smooth shading, but I'm not sure it has its own soften-normal function.  I guess it's fine to use Blender.  I just hope it's always the simple one-click process you described, because I don't like editing in Blender.  (Just one of many complaints: I hate using the middle-mouse-button plus shift for panning the view!)

So now I'm learning to use Spotlight in ZBrush to paint better textures.  Fun.  :)

Link to comment
Share on other sites

I'm afraid it won't be the simple one click solution everytime when it comes to shading. Once you want to do hard surface models, there will be combinations of soft and hard edges. But you will learn that step by step over time.

Indeed, Blender is kinda strange in many aspects. But let's be fair, ZBrush isn't any less strange :matte-motes-whistle:. It's just a matter of getting used to, like with everything. Just like ZBrush, Blender is highly customizable though under User Preferences. For example, under Input > 3D View > 3D View (Global) you can assign other keys for viewport navigation.

Link to comment
Share on other sites

Yeah, ZBrush has a distinctly nonstandard UI.  I just loved it from the get-go, lol.  It works great with my stylus.  I rotate the model just by moving my pen around.

I'll look at Blender's hotkeys.  Every default UI choice bugs me.  Right click to select?  Ugh.  I will indeed play with modifying the UI.

A poster over at ZBrushCentral confirms that ZBrush doesn't really have a smooth-normal function, so Blender it is.  I actually do own an old copy of 3DS Max, but I've forgotten whatever I knew about it, and my brain can handle only so much learning at once.

Spotlight is fun!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2828 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...