Home Technical Talk

Help with Texel density

rockbox
polycounter lvl 6
Offline / Send Message
rockbox polycounter lvl 6
Hi folks,

I'm trying to wrap my head around texel density for game models. I modeled a building in 3d max and put a 2048x2048 texture on it and it looks like terd smudge and after reading up on it I figured out it's because the big texture is wrapping around my whole building so the detail is crap.

I've read quite a bit on this and understand that it has to do with screen space and I am trying to use 512 pixels per 1 meter. The model requires a unique texture (not a modular or overlapped workflow). think of an 8 sided TP building with like animal pelts or something of different kinds all around it. sticking to 523 px/ 1 meter in max the texture size would need to be 9096x21532. This,however, is rediculous and not square. How is this sort of thing done in games?

Replies

  • AlphaMix
    Options
    Offline / Send Message
    Use multiple textures for different objects, no need to cram every texture from every object in your scene into a single super-image, or if you have several identical objects, you can stack the UV shells to save space.

    If that still isn't enough, you're gonna have to go with modular pieces like you mentioned, or make use of a smaller texture that can tile seamlessly.

    Don't worry too much about adjusting Tex Density across multiple different sized objects, there are scripts and plugins that can help you match different UV shells to the same texel density,
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    Thanks for the reply AlphaMix, Your first method about using seperate textures wouldn't work because it is all one object, nothing is identical except in the hipoly model. Modular pieces wouldn't work at first because each side of the cone was different and the hipoly I was baking from didn't tile.

    However, I deleted all but one section of the cone and I arranged my hipoly objects on each side of it to be identical so that I could make that piece tile, to save UV space and hence texture resolution. it worked better, though I may even split the interior and exterior into two seperate textures.

    speaking of scripts like that, I downloaded Advanced Normalizer UV for 3ds max but it changes the size of my uv shells and I had already packed them. I guess that's how it has to work to change texel density but I ended up downsizing from what my goal was anyway of 512 px/ 1 meter.
  • throttlekitty
    Options
    Offline / Send Message
    It took me a bit to realize you meant teepee (tipi). Can you show your model? I'm not convinced that you can't modularize this, but I'm not sure what style you're working in.

    Objects can always be broken down into subobjects, at the very least, I'd imagine that you have wooden stakes, the hide/canvas that wraps around it, and other furs hanging as decoration? The stakes can be broken down to a tiling wood pattern, there's typically little reason for those to be unique. Same goes for any ropes you may be using.

    For the wrap, are wrinkles an issue here? For a 'raw' stitched hide look an oversized tiling texture would typically suffice, but you'd need to rely on geometry for wrinkles. Most modern teepees are painted in repeating geometric patterns that would be modular, or could be a separate texture + alpha that you could use as decals.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    Oh sorry, yes I wasn't sure of the spelling. it is overlapping bark so I made a side modular and increased the resolution there, width wise, but height still can't be tiled at the moment.

    teepee_zps5b3b1fcb.jpg
  • throttlekitty
    Options
    Offline / Send Message
    Huh. I wasn't expecting bark. For starters, you can easily get away with more geometry to fill out your shape and give yourself better control of the tiling. Is the size set in stone? To me it seems a bit short, making it taller would also give you better room for vertical tiling by keeping your quad height more consistent (where each level up equals two of the set underneath).

    Not to judge, but peeling and bending tree bark doesn't really work like this. It would make more sense to chop sections into 'panels' that would be stacked over each other slightly, much like roof shingles. A texture like that be beneficial for tiling, and also give some mid-level detail to catch the eye, instead of all high-frequency detail. Food for thought.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    No I did create bark panels, here is my hi-poly I used to project:

    hi_zpsd8d51570.jpg

    What do you mean more geometry to fill out the shape for better control, you mean increase the height and edge loops for better vertical tiling like you said?

    the other detail I didn't add yet because I want the bark texture finalized, but I'm adding structure logs around the teepee and inside as well and around the door frame maybe, if I don't cut some detail in the door frame to look more...pieced together. Is this the mid-level detail you are talking about?
  • throttlekitty
    Options
    Offline / Send Message
    Yes, and I had also meant more geometry in general for a more rounded shape, but seeing it with your bark strips gives a much better impression of what you are going for here.

    The mid-level detail comes from having those chunks of bark, each of those edges gives feeling of depth at the edges and helps break up a constant pattern of bark as shown in your first image. It's all about keeping the eye from becoming fatigued when looking at it.

    If it were me, I'd consider tiling the bark across either one or two of the large faces at the base of the teepee, continuing that up to the top. (You can never see much more than two and half faces from any angle at this scale) For the top of the cone shape, I'd also have a second mesh that overlaps and hangs out a bit to cover obvious pinching from the shape being smaller at that point.

    ConeTiling.jpg
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    I'm not sure I understand..

    the hi poly, due to the definition in the edges of each piece, is around 938k. I can't possibly transfer those edges to the game res model with a reasonable poly count, can I?

    So, in your example you mean to have the base tiled bark pieces like I showed you in the first image and then add a second mesh at the top doing the same thing but this mesh adds to more mid-level detail so at the bottom of the top mesh would be the edges of bark?

    if this is not what you mean exactly,can you explain a little bit more what you mean with the two meshes?
  • throttlekitty
    Options
    Offline / Send Message
    Your lowpoly is very low, you could easily use a two or three vertical loops on those bends so it's not such a harsh edge. ) instead of >

    If you have a square (or rectangular) texture tiling across a conical shape, the texture will get narrower toward the top. The secondary cone would have a texture unique to just that region to keep it from being a little less obvious while keeping the workflow modular.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    right, I could do that. But, the texture I have cannot tile correctly with my uv:

    uv_zpsbf3c5bde.jpg

    the texture is rectangular, but right now it is not just slapped on there tiling. it is actually a diffuse map projected straight from the hi-poly that already has the texture on each piece of bark. So if I were to tile it anyway, I would have problems when trying to add ambient occlusion layer to the low-poly when the texture is tiled. and also seams at each edge.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    Is it understood what I'm trying to accomplish, is there a better way?
  • throttlekitty
    Options
    Offline / Send Message
    Right, I wasn't sure how to reply from here and I think I may have given you bad advice. I think your unwrap is the better way to do it. You could squeeze a bit more space in by rotating the shells to better fit if you plan on baking anyway.

    What ambient occlusion do you need to add?

    I found an old thread That might give you some ideas.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    I see, thank you. Well as you saw in my first image, it looked bad right? you couldn't even tell that the bark overlapped in pieces and instead thought it was just plain bark wrapped around the model. So, from that I could tell that my hi-poly bake wasn't good and the ambient occlusion that I applied in the diffuse map didn't give that illusion of more detail(that the pattern was of overlapped bark chunks and not just continuous bark).

    Thank you for the link, it's funny you should mention it as I read that link when I was unwrapping my model. The last post on that link mentioned unwrapping a 1/4 of the cone and use the left and top edges of the 0-1 space to tile it that way. However, this would not be optimal for me as it would lower my resolution again and I'm trying to achieve maximum resolution with the bark pieces because I can't use a tiling texture as I wouldn't be able to apply the AO for definition and detail showing that the bark does indeed overlap..
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    Hi there,

    I think your problem comes from not doing it "right".

    You mix a very lowpoly model with a very high resolution texture. This is quite unusual and makes it nearly impossible for you to use all the tricks we normally use to tackle exactly this type of problem.

    Imo the best result would come from bunch of bark pieces which you arrange around the model. Similar to what you did on the highpoly. Then you could hide to repetitive parts with other deco stuff like ropes, soil, grass. Whatever one might put on such a shelter and depending on age and condition.

    So to come back to your question regarding texels. I would suggest to not just check your texel density but also your mesh detail to texel density ratio.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    rollin, thank you for the input. What is the right way to do it? I'm not sure what you mean about arranging the bark pieces "similar" to the high poly. Do you mean for me to add physical geometry of these bark pieces into the low poly? This would make the low poly way too dense.. I was gonna add some decals of grass or leaves later after I got the base texture agreeable.
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    As I said. you want to mix a very very lowpoly model with a really high resolution unique texture. Imo you will always come to the point where you say "oh this would add too many polys to the model" or "oh this would reduce the resolution of the texture too much" as this is an extreme and unusual case you are aiming for. And extreme cases rarely behave in a nice fashion.

    For this polycount I would suggest an overall resolution of the texture of not more then 512x512 for everything - or even less
    -or-
    for a texture resolution of 2048x2048 (which isn't even working for your case) you would be save to use more then 1k polys for this kind of asset.

    These values are of course a bit out of the blue but bc you asked "How is this sort of thing done in games?" I tell you that you have chosen bad restrictions (poly budged / texel density) and you should first change these imo.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    So you're saying to use a higher res texture such as a 4096 for this low res model?

    I'm confused as to why I have chosen bad restrictions, or rather, what bad restrictions are you talking about? My poly budget for this asset can be as high as 3-5k. with the detail to show the bark edges it would equal far more than that.
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    My poly budget for this asset can be as high as 3-5k.
    Do you mean for me to add physical geometry of these bark pieces into the low poly? This would make the low poly way too dense.

    Then keep cool. You can add a lot of details and reusable elements before you're going to hit the limit of this budged. And the more texture space you reuse from your unique texture for different pieces of your asset the higher the overall texel density will get.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    Ok well what about the issue throttlekitty and I discussed with the repeating texture and ambient occlusion? was I right that I can't utilize ambient occlusion with the tiling texture to show the overlapped bark or is there a way to do this?

    This is what I'm trying to accomplish and figure out, I modeled bark overlapping as a highpoly and projected that detail down to my lowpoly and the resulting diffuse is a 2k texture but looks low res, and the ambient occlusion map isn't showing the detail of overlapped bark enough and the normal map makes little difference. I guess I'm asking now how I would go about making the texture on the low poly more accurately reflect the high-poly without cutting a ton of edges into the low poly to show the edges of the bark pieces. do you get what I'm saying?
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    the AO should be fine. creating bark pieces (containing 4-6 of the highpoly elements) of lower resolution should also work. For special details some alpha planes could also push the impression of bark peaces overlapping themselves.

    But as you say you might have another problem right now: How to create a good normalmap and AO - or even before that: how to create a good highpoly for your purposes. What you have right now won't bake out quite well. You should dig deeper into this topic. There is plenty of stuff around.

    check

    In short: try to give your HP some angles the baker can bake.
    Sadly this picture is not in the wiki anymore ?? NormalMap%3Faction%3DAttachFile%26do%3Dget%26target%3Dnormal_slopes_hatred.jpg
    this one I'm talking about images?q=tbn:ANd9GcR2vm8jo-qsngEWoG3RCCzvV_Oc5Soex8iIgDgqb9JI_dXA5rL_lipMjA
  • Cibo
    Options
    Offline / Send Message
    Cibo polycounter lvl 10
    The tiling texture is not the best because its kills the idea of different bark pieces. With a tiling texture every seam must fight agains tthe tiling effect of the texture.

    1.
    Use one tiling texture without to much eyecatchers as tiling texture and a second texture as multiplied overlay with different grey gradients for each bark piece.
    Combined with bump mapping and or normalmap it can be ok.

    2.
    Make alot of planes and work with alphas for each bark piece but thats maybe heavy for the machine.

    3.
    Make lowpoly for each piece but your polylimit is to small for this.

    Use your polylimit for break the plain silhouette!
  • throttlekitty
    Options
    Offline / Send Message
    Actually, can we step back a bit? You mentioned hides, ropes, stakes and other details that will cut into your poly budget. Are most of these things for the interior, or will they be on the outside, and potentially good for hiding seams?
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
    rollin, yeah I knew that normal maps require mostly smooth edges.. I guess I just forgot to smooth them before placing them all over the model.

    Cibo, I thought about the planes and alphas idea but thought that it wouldn't give that thickness of bark in the silhouette. Also, the bark pieces WERE low-poly... it was maybe 10k or more and then I realized I couldn't use that as the game-res so I tesselated and smoothed for high-poly baking.

    throttlekitty, no there will not be ropes or stakes. maybe a set of leaves or dirt here and there, but no ropes on the outside. there will be a structure on the inside that could hide seams. the outside will have logs or branches also that could hide seams.
  • rockbox
    Options
    Offline / Send Message
    rockbox polycounter lvl 6
Sign In or Register to comment.