Jump to content

Topology - the often neglected entity

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

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

Recommended Posts

Ah whatever - for complicity's sake .. I'll copy paste the Z-Brush tutorial here too. In case someone first struggles into this thread first when searching for solutions : )

- Extension 5  - Addon : Zbrush - Multiple UVs on one combined mesh
- Creation, Handling, and Texturing

If you want 'more texture-detail' on one combined object - and give it more then just one texture / UV,

you have to create and manage different UVs.

Whilst this is rather an easy task in regular 3D Programs like Blender, Maya, Max, the workflow for ZBrush is quite

Due to ZBrush's rather limited capabilities of handling more complex UVs and also
the fact that it in general mixes them all together into one texture space - if you don't know the full depth and functionality
of Z-Brush and ways to work around.

tutorial will not only show you how to edit and apply different texturesin ZBrush to a mesh that has been
created outsides of ZBrush with several UVs on the same mesh.

It will also explain the complete workflow on how to create different UVs on one object  'in' ZBrush.
In addition it will give you insight on how to actually paint on UV maps also in Z-Brush. Which is little known to the most users.

The workflow is rather different from what regular 3D software users are used to when handling and editing their UVs and maps.
But for everyone who ever struggled with this, and I know many do, I hope all the effort gone into this tutorial will
enlighten you =)

Since this is rather an extended workflow process, I will keep it mostly explained in pictures. It might be a bit harder to
understand for ZBrush-Starters. And I am 'trying' to explain every button and step as well.
So don't feel discouraged when you don't understand it fully in the first place. You can post questions, and I am sure
many people will be willing to help and reply.

This being said - let's get started:

DiffPolyGrand UVsinZbrush_01.png
For those who don't know how:
- CTRL+SHIFT+Rightclick and drag a rectangle (or a free selection shape, when you change the Selection-Tool
   into a lasso) this will hide the selected area.
-  Switch to the Polygroups-Panel and choose Group Visible to assign all visisble polygons into one group.
- You can repeat this step for other parts as well.
- Another option for Grouping is to use colors and paint on your model and choose  Polygroup >  From Polypaint.
- Also Masking can be used to create groups.

DiffPolyGrand UVsinZbrush_02.png
- The Duplicate Tool option is nested right below your Subtools in the Subtool-Panel.
- Hide the original model by clicking on the Eye-Icon assigned to it in the Subtool-Panel.
- To unhide all polygroups or hidden parts just CTRL+SHIFT+Rightclick on an empty spot on the canvas.
- Duplicating your model will preserve the original and you need it to repeat these steps for the other parts.
- To hide one of the created polygroups CTRL+SHIFT-Rightclick on it.
- If you have several groups and need to hide more then one - repeat this process by clicking onto all parts you
  want to hide.
- Once you have hidden the group/s and only the part you will work on right now remains visible:
- Go to the Tools-Panel, under Geometry > Edit Topology and choose Delete Hidden this will remove all invisible
   Polygons from this object.
- We will combine the objects later again but for now we don't need those.

DiffPolyGrand UVsinZbrush_03.png
- To Unwrap your new partial object, go to the Menu-Panel on top of Zbrush and choose ZPlugins > UV-Master.
- Don't forget to choose in the Tools-Panel > UV Map the size you want for your UV texture.
- 512x512 px, and so forth. Don't forget the highest resolution for Second Life is 1024x1024 px.
- In here you can either just plain unwrap it with the unwrap command, or first do some control paintings
   if you wish your seams to be in a certain spot.
- Now press the Flatten UVs Button in UV-Master.

DiffPolyGrand UVsinZbrush_04.png
- Now switch to the Texture Map Panel and create (with the still 'flattened' UVs) a New Texture from UV.
- This is needed for later because you will now work with different textures / different UVs on the same object.
- And this also will give you a visual layout of the UV map, which allows you to paint on and knowing which
   face is where.
- Press the Clone Texture Button.
- Switch over to the Regular Texture Panel (nested under the Brushes), it will now display your newly cloned Image
- And choose Export on the bottom in order to save this image to your disk.
- Go back to UV Master and Unflatten your UVs.

Continuing with the work:
DiffPolyGrand UVsinZbrush_05.png
- Repeat now the steps from above with a new Dulicate of the original tool. But this time hide the other part.
- Repeat also:  Delete Hidden, the UV-Unwrapping, the Flatten UVs, the New Texture from UVmap, the Cloning,
  and the Export / Save Image, and Unflatten your UVs again.

DiffPolyGrand UVsinZbrush_06.png
- Follow the 3 Steps above.
- This will now Combine your both separated and UV'ed parts back into one object / tool.

DiffPolyGrand UVsinZbrush_07.png

DiffPolyGrand UVsinZbrush_08.png

Important notes at this part of the process:
DiffPolyGrand UVsinZbrush_09.png
- From now on you will have to choose from Texture Maps, and apply the Color-Information from those onto the
   separately UV'ed areas on your model.
- You will have to Hide and Unhide the certain parts in order to edit or apply those Maps.
- Simply painting across the whole surface of the object and then creating a New Texture from Polypaint will 'not'
   work anymore
and just result in one collapsed image.
- so keep the next steps in mind when working with such a model in ZBrush.

Some consideration to take into account:

DiffPolyGrand UVsinZbrush_10.png


- Many Export-Types (like exporting it into OBJ) will break the model into separate objects where the polygroups are.
  This means that the Normals will have a clear visible cut between the separated parts, which is a rather unwanted
   effect. And vertices will have dublicates, du to being on the same coordinates where the seams meet.
- Normally we create objects with several UV maps applied in other software then Zbrush, because here we have full
   control of joining seams and vertices and prevent them from being separate objects. And would later on import it into
   Zbrush to do sculpting or further editing for displacement maps and other wanted steps.
   Or we would take a model that had been made in Zbrush and merge the objects, remove doublicated vertices, etc.

- However the DAE Format is supposed to keep them as one object with joined seams. But sometimes it fails when
   coming out of ZBrush, so be aware of it and inspect your mesh closely after you exported and imported it into Second

PS: The DAE exporter is an extra plugin available for Zbrush. (you might need to download it first)*
       * Forum-hiccup again, won't let me paste the link, interprets it as image o.O. Will try to add it as reply.

Back to the workflow - Creating and applying images for the UVmaps:

Method 1 - Image Editor: 

- Since you saved your images afore, for the bottom part and the upper part, you can now take them into any
   Image Editor, create a New Layer and paint whatever you desire on top of it.

DiffPolyGrand UVsinZbrush_12.png

DiffPolyGrand UVsinZbrush_13.png

Now the important part - how to apply the textures to the different UV parts on the model:

DiffPolyGrand UVsinZbrush_14.png

DiffPolyGrand UVsinZbrush_14_1.png
- make sure no parts are hidden or you can't subdivide.

DiffPolyGrand UVsinZbrush_15.png

DiffPolyGrand UVsinZbrush_16.png

DiffPolyGrand UVsinZbrush_17.png

DiffPolyGrand UVsinZbrush_18.png
- if the textures appear too pixelated or blurry, just go back to the step of subdividing, add a few more divisions and
   apply the textures again. (The more subdivisions the more clean the outcome in your viewport)
- Just don't forget to go back to the max amount it should have for SL before exporting.
   You don' want to accidentally try to upload a model with several million polygons.
- You could also preserve a copy of the merged object
- keep in mind that subdivision allways changes the lowest division shape too. (Exceptyou are working with a 'Cage')  
- You need the high subdivision here really just to check the visual nature of your textures.

Method 2 - Painting onto UVs within ZBrush:

- For those being used to use the 'Morph UV' function, Morph-flattened UVs can't be used for the following steps.
- They allow you to paint rather 'temporarily' onto it but there is no way of preserving it. This is why we will work with the
  flattened UVs from UV master.

DiffPolyGrand UVsinZbrush_19.png

DiffPolyGrand UVsinZbrush_20.png
If you are afraid to mess things up on your original model (especially the "Undo" often breaks the Unflatten, and the
   propper return to your model is not possible anymore -  its's a known issue):
- Just make use of the Work On Clone functionwhich UV Master is offering.

DiffPolyGrand UVsinZbrush_21.png
- and here comes the magic:
- Since the Flattened UV is fully Geometry this means you can subdivide it, paint on it, even sculpt it, relax or contract
  areas and much more.
- You can even apply former created textures to it (by Polypaint > Polypaint From Texture ) and then continuing to paint
  or edit it later on again.


- Don't forget to disable 'Zadd' / 'ZSub' and to enable 'Mrgb or RGB'
to prevent from accidentally sculpting or
  subdividing the UVs in unwanted ways,
and to just apply color or material information to them.
  (right now we need to avoid anything that subdivides 'partially' or adds height/depth to it - but smoothing and other
   similar functions can be used)

- It has to be back on its lowest subdivision level, or it will fail to unflatten again.
  (the unflattening is not needed, when we only want to paint on it and save the colorinformation to a texture - but as a
  warning note if you want to use this procedure for other tasks)

DiffPolyGrand UVsinZbrush_22.png

DiffPolyGrand UVsinZbrush_23.png

DiffPolyGrand UVsinZbrush_24.png

Alright, that's it - you have passed the tutorial ! ; )

Cheers! Code.

(original thread here : http://community.secondlife.com/t5/Mesh/Z-Brush-Tutorial-Multiple-UVs-and-textures-on-one-mesh/m-p/1938327#M19981)

Link to post
Share on other sites

This workflow demo was made for another user here, but it fits well into this thread.

The .Blend file is freely available in my public Dropbox as long as I feel like keeping it up. Use it however you wish with or without attribution. It can be useful to play with other's work first hand.

Enjoy, and bring your own music -- It's pretty boring without some background noise in my opinion.

  • Like 2
Link to post
Share on other sites

Now THIS made me laugh (screenshot from the video):

Screen Shot 2013-03-25 at 3.15.22 PM.png

You are far, far from your being an idiot, and that was an exceptionally terrific video. Well paced and you have a great sense of humor  Rahkis!  

It is the perfect video in my opinion and thanks for all the great tips!



Link to post
Share on other sites

Thanks so much Codewarrior. An excellent, valuable thread. I know you spent a huge amount of time on this.  

3 cups of tea and 1 cup of coffee later, I have carefully read through the entire post. 

It's rare to find such useful information on topology in a single spot.  I hope folks who are new to this and possibly glaze over when someone mentions "topology" will keep coming back to this thread and read it over and over.  As one reaches higher levels of compentancy in CG the fog lifts and it's a great feeling to reach the point of understanding the terminology and the important concepts.  It takes some study to get there, but it's very rewarding.

Link to post
Share on other sites

Thanks a lot Nancy. I've been wanting to do something like this for a long time and the positive feedback is a great vote of confidence. Hopefully, I'll fill my channel up with videos like these and keep improving.

And again, thanks Codewarrior for making this excellent thread.

Link to post
Share on other sites

haha you are welcome nancy, and i sure do hope some people will stumble upon it =) that's what i am doing it for.

Regarding Rahkis video i made the exact same comment on the repetetive rotation in the other thread where he posted it first - quote: "...Cute lil video Rahkis. Made me chuckle (especially the repetetive rotations xD) ..."

It defenitally was fun to watch :)

Thanks for reading it so intensively nancy, and i promise i will kepp adding more. At the moment that big guy named Earthwalker is holding me up >.> and he has huge fists i don't want to argue with him ! (my latest avatar project, lol - to avoid confusion)

But i do have something prepared already about wrinkles in fabric with little changes to the topology instad of adding crazy amounts of edgeloops. Will post it as soon as it's wrapped up =)

PS: And i know the feeling when things finally start to unfold and the fog dissapears - this is such an amazing moment! And i still do embrace it whenever it happens.

Cheers to all of you - Stay Creative!

  • Like 1
Link to post
Share on other sites
  • 3 weeks later...

ok  so I have been busy fiddling with that earth walker model, and wanted to throw the next point into this tutorial, regarding:
how much detail can actually be optically preserved on a low poly model - means we don't need 20 K polygons or more
to achieve a certain look

- Extension 6 - Textures and Lowpoly Model

: The texture work on it is still not done,but far enough to provide the points I am wanting to make here.

1. ) High Poly to Low Poly

On the left side you can see the high poly model with it's 4,5 million polygons. Used to add all the little and medium details, like the drafts, rocks, pores etc into the geometry itself.

On the right side we have a model with just 6 thousand polygons (6004 to be precise) - even less then the default avatar
has, and a good value for a game model for this kind of engine.
And only 2 textures (the textures now taking place to visualize the former real geometrical detail)

The textures are a bit brighter because I lightened them a bit, as it will add AO and shadows in SL again and would be otherwise too strong.

But as you can see the visual details clearly remain, and showing how easily the eye be tricked in believing certain structural details would be apparent.


now let's compare this in terms of rendercost to a basic default avatar (lower right corner):


As you can see I am getting away with just 3 K more of render costs compared to the basic avatar, and I am in the green area with my 13670. (and the eyes which are just prim-spheres right now take already 500 of these points) 

And when you look at common avatars in SL with hair and all texture layers and attachments (prims, sculpties, meshes) you mostly see orange numbers or even up to a scary red color, when being far beyond 100 thousand.

When I see discussions about the rendercost and when creators try to defend their extreme values in the red area of above 100.000 Avatar rendercost for just 'one body', with needing all the high amounts of polygons and up to 8 textures for just this one body, (or even more by splitting it into several pieces with each 8 x full 1024x1024 textures), then this is why I say it is obviously wrong and not needed. 

With the upcoming normal and specular maps for SL, we will be able to take this even further and for all the fine textural detail also have lights and shadows being casted correctly.

And i am deeply hoping to be proven wrong in my assumption that many people will just cluster these maps on top of their existing high polygon models  - instead of using them the right way to optimize their models even further.

This entry here is also in addition to add something many users might be unaware of, and already have been back in the days when they only had prims and sculpties available:

2. Textures , UVs and their rendering cost.

I have recently broken this subject down in another forum thread, and would like to repeat it here as well as reference for whom ever might have a look here for optimization of their models.

- Drawcalls :
  textures and models cause so called drawcalls.
  To explain it with simple words this is the process when your hardware actually draws / renders them.
  A GPU can only handle so many draw calls at once per frame. 
  (as reference the older Nvidia 600 series could handle 600 drawcalls, newer ones 1000 and so on)
  So called Drawcall Batching can optimize this, by dropping multiple drawcalls into one drawcall if certain criteria are
  Unfortunately even instances of the same object with the same texture will create a new drawcall whenever one of the
  object achieves the slightest change (scale etc)

- Texture memory:
  Your Graphic card has to refresh / rewrite / update changing textures in its cache all the time.
  The more textures it has to load the more full the cache becomes, and the more it has to write and do.
  Thinking of SL you will most likely know - it's flooded with textures. Earrings, where every tiny prim has its own
  1024x1024 texture.
  In addition we have hair and other parts with tons of alpha textures:
  Transparent textures / Alphas are actually also pretty cost intense, due to causing several drawcalls, and all the 
  Z-Sorting going on trying to figure what's on top, what's behind etc.

- UVs / Material Groups and their resulting Vertices Split:

  Wherever a UV seam is, the vertices along that seam are duplicated.
  Wherever a Material / Texture face group splits, the vertices are duplicated.
  The same goes for smoothing groups.
  This is the reason why so many people wonder why the count goes up more then shown in their 3D program,
  when looking at it in the uploader in SL. 
  These splits are happening in the engine / while rendering / calculating etc, and can't be shown by your 3D software.

 And vertices are seen in terms of rendercost as even more heavy then the amount of polygons. (But of course:
 the more polygons a model has the more vertices it has in its base already before taking all the 'splits' into account
 on top of it)

  If you are interested in what actually causes splits and can have deep impact on render costs have a look here: 
  http://www.ericchadwick.com/examples/provost/byf2.html )

As a conclusion to all of this, I found this had to be mentioned along with the subject topology.

In general a good rule of thumb is > think about how much you can already provide by textures, and where you don't
need that a certain bump or indent in your actual geometry.

And also think twice on how many textures you actually need to cover an object or gain a certain amount of detail.
There is a reason that most game assets like full character models are clustered with their dresses, skins and often even  also their weapon or tools onto just one texture : )

And modern games are heavily into something called Megatextures, where i.e. a whole landscape and everything in it,
is put onto one huge resolution texture. They take advantage of just loading certain areas of the texture into the memory and the reduction in drawcalls (if you are interested: http://en.wikipedia.org/wiki/MegaTexture )
However Secondlife can't provide Megatexturing. So keep optimization in mind when doing your texture work.

The crazy amount of textures is and has always been one of the most 'lagging' factors in SL. And texture memory as well as drawcalls and vertices are still some of the banes of our graphical existence.

Just something more for you to think about when creating, and wanting to provide optimized content to give others a good experience.

Cheers! Code.

  • Like 3
Link to post
Share on other sites
  • 8 months later...

Code, this thread is a treasure! I am full of grattitude for the massive ammount of time it took to prepare and share this teaching with everybody else. Thank you for taking the time to provide examples and ample illustrations. I'm still reading through this and learning so much! Anyone looking to create with mesh would do well to read this thread.

Sorry to give the thread a bump, but I felt compelled to post and say thank you. :matte-motes-bashful-cute-2:

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 2699 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...