1. #1
    Super Moderator Follow User Gallery
    Join Date
    May 2001
    Posts
    21,265

    Default Precision Texturing - Part 2

    Many people have asked how to get really clean texture transfers when working with Projection Master. By this I mean crisp, sharp edges that remain once the model has been picked up again from the canvas. The truth is that getting great results like this is a simple matter of understanding what is really happening at the fundamental level when you work with Projection Master.

    This mini-tutorial will take the mystery out of the process, while also providing an easy way to deal with those situations when you find yourself guessing. No more trial and error! These steps will give you great results every time.

    This tutorial also supplements my Precision Texturing Tutorial which I wrote last year. That tutorial explained ways to paint crisp edges on the canvas. This tutorial goes a step farther and teaches how to ensure that those edges will transfer cleanly to your texture.

    So here goes:

    Let's begin by looking at what is happening when you use Projection Master. I'm not going to go into the technical aspects of what features it automates or any of that stuff. Instead, I'm going to discuss the topology of it. For those of you who are scratching your heads at this point, let's just say that Topology is the mathematics of surfaces. Your texture is nothing more than a flat plane that is getting wrapped onto the surface of your model. Of course, if you've ever tried to peel an orange into a single piece and then flatten it out onto the table top, you know that the 3D to 2D unwrapping process doesn't work too well. There have to be breaks and/or distortions in order to get a complete unwrapping.

    Projection Master takes as much of the topology (math) out of the picture as possible. The basic idea is that you paint what you want to see, and then ZBrush handles the process of applying all the math to make what you've just painted in 3D fit correctly onto the 2D texture map.

    In order to make this work, ZBrush has to take a look at the pixols that you've painted on the canvas and then calculate how best to make that detail fit as pixels when projected onto the texture. "Projection" really is the perfect term for this, too. You have no doubt watched a movie in the theater at some point where the projector was out of focus until somebody complained and they fixed it. Modern movie projectors have a lot of great features to try and ensure a clean focus, but sometimes you still need human intervention. The same actually holds true for ZBrush, which has some really sophisticated routines to try and ensure an "in focus" projection when you pick the model up from the canvas. No matter how good those routines are, there are still some things that you can do to help ZBrush out. And that's what this tutorial will help you do.

    ZBrush's projection "focus" is based upon canvas pixols vs. texture pixels. If you have too many of one relative to the other, the result will be an out of focus, poor quality projection. To illustrate, I'm going to use Hiroshi's fun little model from this thread, onto which we'll be projecting the Pixologic logo.

    For each use of Proejection Master, the only difference is the scale at which the model is being dropped to the canvas. Each of these gives us a different ratio of pixols-to-pixels, which gives different results when the model is picked up again. (Note: The ratios mentioned in the text beneath each illustration are approximate.)

    In this first example, we've zoomed way in on the chest (left view). As a result, the logo takes up a LOT of canvas pixols -- about 800 pixols across. On the other hand, the texture that the logo will be projected onto is only 2048x2048 in size. Relatively few of those are assigned to the chest. The result is that we have a large number of pixols being projected onto a relatively small number of texture pixels. Since there's no such thing as a 1/2 pixel (much less 1/5 pixel), ZBrush has to discard a lot of information from the canvas in order to make it all fit onto the texture. The results, as shown on the right, aren't great. Without the artist's eye to know what details are important and what aren't, the discarding gets applied uniformly across the canvas and the results are a lot of pixelation.

    example-1.jpg

    For the next example, we're going the other direction. The model is small on the canvas, which means that very few pixols are being painted. In this case, ZBrush actually has to supplement the information from the canvas, creating extra pixels on the texture based on guesswork from the minimal info that it has available to it. As you can see, it actually does a pretty good job (I told you ZBrush had some sophisticated routines for this. ). But it's still not perfect.

    example-2.jpg

    Now in this third example, we're getting as close as possible to having one canvas pixol for every pixel of the texture that it will be projected onto. This means that ZBrush can simply calculate which pixol of the canvas is equivalent to which pixel of the texture. There's no need to discard or create data. It's a perfect, clean texture transfer.

    So there's your focus control! By ensuring that each pixol that you paint on the canvas is equal to one pixel of your texture, you can guarantee perfect texture transfers every time. We can also see from the examples above that if you're not quite sure how big to draw the model on the canvas, it's better to go smaller than larger.

    example-3.jpg

    Now let's say that you have a model and you're not sure how the texture pixels relate to canvas pixols, so you're not sure how big you need to draw the model to get the best results. Well, I've cooked up a pretty easy way to find out.

    GettingTheRatio.jpg

    Once again, we're using Hiroshi's model. Because the model has been mapped with GUVTiles, it's not very easy to tell by looking at a texture template which part of the model goes with what part of the texture. For that reason, I've started with steps 1-2.

    1) The model is drawn onto the canvas and dropped using Projection Master.
    2) I used the Ring3D to draw a target in the center of the model (you can actually use anything - this is what works for me). The model is then picked up again.
    3) Exit Edit mode, clear the canvas, and select the Flat Color material. Press Texture>Crop And Fill to fill the canvas with the texture. Now pan the canvas to find your target. As luck would have it, mine wound up being split into pieces, but that doesn't matter.
    4) With the Plane3D, draw a small square on your canvas. With Transform>Scale active, set the Transform>Info sliders to 10. This gives a square that's 20 pixols x 20 pixols. And since the canvas is the same size as the texture, that means that you're also drawing 20 pixels x 20 pixels. When the square is drawn, press Texture>GrabDoc to capture the canvas as a new texture.

    Note: The first two steps are only necessary if you don't know where the model's UV's put the center of your object. If you did know, you could simply start by filling the canvas and placing the reference square where you know it should go.

    5) Clear the canvas and resize it to something handy like 1000x1000. The exact size doesn't matter, so long as it gives you room to work. I prefer to have the canvas take up most of the screen. On the blank canvas, draw your rectangle again and use the Info sliders to scale it to 10. Also, switch to Move and set the Z slider to a close value like -1000. That way, the square will be well in front of your model.

    At this point, we have a square on the canvas that's 20 pixols x 20 pixols. Our texture has a square on it that is 20 pixels x 20 pixels. I bet you can guess what's next.

    6) Select your model and then select the new texture that was created when you did the GrabDoc. Draw the model on the canvas. If you start your stroke on some blank part of the canvas, the model will be drawn behind the red square.
    7) Move and scale the model so that the red square on its texture is equal in size to or smaller than the red square that you drew on the canvas. (Remember what we determined earlier -- smaller is better than larger.) When you're happy, place a marker.
    8) Press Ctrl+N to clear the canvas. Since your model is in Edit mode, everything else on the canvas (in other words, the red reference square) will disappear. Drop the model and paint your texture.
    9) When the model is picked up again, you will have a high quality transfer. This is because the steps above ensured a ratio that's as close as possible to 1 canvas pixol for every 1 texture pixel.

    If you accidentally resize your model, or if you have to draw it fresh on the canvas again for some reason, the marker will allow you to get the right size for this model and texture with a single click.

    The more that you work with texturing, the less you will probably need the steps shown above. You'll come to develop an eye for what your doing and be able to guage the proper size to draw your model at right away. But while you're still learning, these steps should prove a great help to getting the best results on your first try, every time.

    Just for the record, if we were working with a texture that was 4096x4096, then the model would be able to be drawn larger on the canvas. This in turn means that more detail can be painted. It's all about what you need, and ZBrush has the flexibility to adapt to those needs.

    I hope that you have found this tutorial helpful, and look forward to seeing the results in your own work! For now, here's my contribution the the Red Monster challenge. It's not much as far as art goes, but it was meant to demonstrate just how cearly the textures can be transferred.

    Yoshi.jpg

    Happy ZBrushing!

  2. #2
    Senior Member Follow User Gallery
    Join Date
    Mar 2003
    Location
    Central USA
    Age
    64
    Posts
    1,975

    Default

    Let me be the first to say Thank You for THIS! 50.

  3. #3
    Senior Member Follow User Gallery
    Join Date
    Mar 2005
    Location
    Manhattan, New Yotk
    Posts
    4,494

    Default

    Great info! I second 50.
    THANKS
    Lemmo

  4. #4
    Senior Member Follow User Gallery
    Join Date
    Nov 2003
    Location
    UK
    Posts
    1,660

    Default

    Splendid stuff .. thank you. I'm confused about point 4, where you're talking about 20x20 pixols but, assuming that's not a typo, I'm sure I'll work it out.

    Cool red monster tex, btw.

  5. #5
    Super Moderator Follow User Gallery
    Join Date
    May 2001
    Posts
    21,265

    Default

    When dealing with scale, the info sliders measure from the center of the object to its edge. So a value of 10 means that your square is 20 pixols across.

    You can actually use any value that you want there. So long as the value is the same for both squares (the one you draw on your texture and the one that you draw onto the canvas), the technique will still work.

  6. #6
    Senior Member Follow User Gallery
    Join Date
    Nov 2003
    Location
    UK
    Posts
    728

    Default

    Thanks for the tutorial aurick - I remember being dumbfounded by this equation at first, (and still occasionally find myself getting caught out!) so it's
    certainly a welcome refresher - thanks again


    C.


  7. #7
    Senior Member Follow User Gallery
    Join Date
    Nov 2003
    Location
    UK
    Posts
    1,660

    Default

    Thanks .. didn't realise how the Info Sliders worked. So the last paragraph in point 5 is a typo then? Square drawn on the screen, set to 10 with the Info Sliders, should be 20x20, rather than 10x10? Sorry if I'm being particularly slow here.

  8. #8

    Default

    Can you put that in a tutorial Zscript?
    were we could see it before and after on the old method and your method to compare
    it would be less confusing and a little bit more understanding.

  9. #9

  10. #10
    Senior Member Follow User Gallery
    Join Date
    Mar 2004
    Location
    USA
    Posts
    459

    Default

    Nice tut.

    You also use the Deco brush for placing a texture.

  11. #11
    Senior Member Follow User Gallery
    Join Date
    Apr 2005
    Posts
    163

    Default Masking

    Hi

    I have a question related to the resolution painting. I have been trying to paint on a pattern in projection master (black on white) which I then wish to transform into a mask, once I have picked up the texture. The quality of the texture is nice and sharp once it has been picked up, however, when I convert this to a mask, the mask is pixelated and then does not have sharpness for inflating etc. If I do a depth pickup from PM itis pretty sharp, however I need to be able to masking on the model itself. Any clues as to what I should be doing. I get a similar result painting on mask on the mesh ie. it is fuzzy. The mesh up to level 7density is a

    Thanks,

    TrapDoor

  12. #12
    Senior Member Follow User Gallery
    Join Date
    Nov 2003
    Location
    UK
    Posts
    1,660

    Default

    Heh heh .. sneaky bit of editing there, Master aurick. Now I understand. Couldn't get my head around why it made any difference how large or small the model appeared to be on screen .. if a texture map is a specific size, and it wraps all the way round an object, why would the apparent size of the model make any difference? Then I started going off on tangents, thinking about if my screen resolution made any difference and stuff like that. Then the penny dropped. I'm so used to applying a created texture map TO a model in other apps, I'd forgotten that colouring the mesh or painting in PM, I'm actually painting on the 3D mesh itself, and ZB is then creating a texture map from that information, which it then applies to the model. It's so intuitive to paint like this, I'd never given a moment's thought to how sophisticated it is.

    In this case, size really does matter.

  13. #13
    Senior Member Follow User Gallery
    Join Date
    Apr 2004
    Location
    Southern Fried
    Posts
    134

    Default

    Very good info. I was wondering about that. Thanks for taking the time to explain.

  14. #14
    Senior Member Follow User Gallery
    Join Date
    Apr 2004
    Location
    USA
    Age
    40
    Posts
    5,630

    Default

    This is one of the best tutorials yet!!! So eye opening, now I understood why the textures I painted weren't so good. Agian, it's so amazing!!! Thank you

    Yong

  15. #15
    Senior Member Follow User Gallery
    Join Date
    Mar 2002
    Location
    Gainesville, FL
    Posts
    650

    Thumbs up

    thanks, Aurick! very clear explanation of something I wouldn't have guessed and clever use of those reference squares to approach the 1:1 ratio

    it also makes sense to stay a little on the side of the ratio that allows ZB to upsample, therefore smoothing the stroke edges

    I also gather that it would be fairly easy to develop an eye for whether ZB is upsampling or downsampling too much, by painting a test stroke, picking up the model and seeing whether the stroke edges are too blurred (upsampled) or too pixelated (downsampled) -- then the stroke could be undone and the model rescaled accordingly to "adjust the focus"

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •