Videogame in miniature - Scaling down models

Started by
6 comments, last by Kenny Bones 15 years, 6 months ago
Hi! I'm just getting started in game development and I'm currently texturing some buildings and stuff. Anyway, I've noticed, for my project right now, I scaled down my models in size to make it easier to draw the shapes of each building from a map i've layed out as "ground" so to say. Now, what I noticed was that, when I apply my texture to one of these models (texture is 128x128 tilable) is look friggin' great! But when I guess that's because of the "physical size" of the model right? So if I scale the model up again, up to normal, real life scale, the texture would need to strech to fill the space and thus, making it look more blurry and unsharp. Logically. So, my question is, could I scale everything in my future game down in size? And by that I mean, EVERYTHING, including the playable character. Just thinkin' 3d-models aren't like bitmaps, you can zoom way in and still have it sharp. So my question is, would anybody actually notice? The reason I probably want to do this is because of performance. Smaller textures with great performance and visual looks must be key right?
Advertisement
Quote:Original post by Kenny Bones
Now, what I noticed was that, when I apply my texture to one of these models (texture is 128x128 tilable) is look friggin' great! But when I guess that's because of the "physical size" of the model right? So if I scale the model up again, up to normal, real life scale, the texture would need to strech to fill the space and thus, making it look more blurry and unsharp. Logically.

Physical size has nothing to do with this. What matters is how much screen space your model occupies. An enormous model that is always rendered at a large distance may take up less pixels than a small model rendered up-close. If your model only ever takes up 32x32 pixels on screen, you're wasting texture memory. If your model often takes up more than 128x128 pixels on screen, then it's perhaps time to increase texture resolution.

Quote:So, my question is, could I scale everything in my future game down in size? And by that I mean, EVERYTHING, including the playable character. Just thinkin' 3d-models aren't like bitmaps, you can zoom way in and still have it sharp. So my question is, would anybody actually notice? The reason I probably want to do this is because of performance. Smaller textures with great performance and visual looks must be key right?

So, again, size is not what matters. These things are relative. As for performance, I'd encourage you to get your models up and running in the game early on, so you can actually run some performance tests. See where the real bottlenecks are and optimize for those. These can sometimes be quite different from what you expect. Don't waste time optimizing without knowing what to optimize first.

Also, sometimes you just don't have enough memory to store all your textures, so then it's important to prioritize: less important models will have to do with lower-res textures. This is sometimes referred to as texture budgeting. It's probably not something you'll have to worry about anytime soon, judging from what you've said so far, but it might be useful to know. :)
Create-ivity - a game development blog Mouseover for more information.
Realistically though, you can always down-sample. You can even store your pictures in a down-sample friendly form, which is something that I personally have had a bit of success with in my projects. This applies to more than just textures too, but other things like models. If you know for a fact at load time that you are only going to use certain resolutions, you can do your down-sampling then and not pay the memory cost associated with maintaining the large sized assets. On the other hand, if you find yourself in the position you are currently finding yourself, where players zooming in makes your models look like garbage, then you could load bigger textures for the models that you expect to be more closely scrutinized.

However, when you are making the models, this question turns into a bit of a non-issue. You have the hardware to muscle through inefficiencies with respect to this when you're working with a couple models and not worrying about game logic. In the authoring phase, you can use tons of memory for everything, and construct your scenes with whatever you like. Realisticly, you should always model and construct your assets with an upper bound on quality. Use as many polygons and however much texture space you need to use to make it look how you want it to look with the amount of effort that you want to put into it. Actually, making low poly models can quite a bit more difficult than using polygons like they are free. You can run some very sophisticated algorithms on these things later to simplify them substantially, which means you are free to create your assets with whatever level of detail suites you best, and use the machines to push them into what is efficient.

In short: Create your assets with high quality, as high as you'd like, and down-sample for efficiency [either offline or at run time with LOD algs].
Hmm, not sure if I understood this right now. I mean, if my texture is in 128x128 pixels and I wrap it around a simple cube. Then the texture would need to strech to fill the cube right? Let's say the texture gets tiled about 8 times.
What would happen if I scale the model into twize the size? Would the texture tile another 8 times? Meaning, I would really notice any difference? Or would the texture strech accordingly, making the texture look blurry and washed out?
Quote:Original post by Kenny Bones
Hmm, not sure if I understood this right now. I mean, if my texture is in 128x128 pixels and I wrap it around a simple cube. Then the texture would need to strech to fill the cube right?

Well, it needs to fill the polygon(s). Whether it looks 'stretched' depends on how much screen space it takes up. If your model would be so far away that it only covers one pixel on the screen, it obviously wouldn't look stretched (you wouldn't see the texture at all in fact).

Quote:Let's say the texture gets tiled about 8 times.
What would happen if I scale the model into twize the size? Would the texture tile another 8 times?
Meaning, I would really notice any difference? Or would the texture strech accordingly, making the texture look blurry and washed out?

It depends if you scale the texture coordinates. Let's say they range from 0.0 to 8.0 initially and after scaling they range from 0.0 to 16.0. In this case a cube's side will have 16 x 16 tiles. If you don't scale the texture coordinates, you'd end up with this:



\/



But again, it has to do with the amount of screen space occupied horizontally and vertically. Zoom out the camera, and your back to your original model. In that sense, scaling vertex coordinates (x, y, z) has little to do with it.

Oh I see. I'm always gonna tile mye textures whenever it's possible.
Optimization is extremely important and I don't want to waste a single byte of VRAM. So I'm gonna spend alot of time doing tilable textures just right and create perfect and effective UVs as well.

The reason I'm asking this is because I'm modelling buildings. And it's supposed to be a virtual city. Correction, a virtual city based on an existing city.
That's why I was wondering all this because I thought that scaling all the models of my city into a smaller format would save alot of VRAM from the textures used.
But since I'm gonna be tiling almost everything, then scaling the physical size of the buildings wouldn't matter at all? That's what you're saying? I won't notice any performance increase by it?

Edit: Perhaps worth mentioning, it should be possible to actually walk around in this virtual city, meaning, you'd be able to walk upclose to any building. In this case, perhaps physical size would matter?
I'm thinkin' I've got this brick texture which is 128x128 pixels. If my building is real life scale, this texture would need to get tiled even more for the quality to stay intact right? And the more the texture gets tiled, the "smaller" uach tile would look right? Then in that case, physical size would matter?
Quote:Original post by Kenny Bones
The reason I'm asking this is because I'm modelling buildings. And it's supposed to be a virtual city. Correction, a virtual city based on an existing city.

Buildings, especially tall office buildings lend themselves well for tiling textures, imagining all the windows etc.

Quote:That's why I was wondering all this because I thought that scaling all the models of my city into a smaller format would save alot of VRAM from the textures used.

Start with decent size textures, decrease their size later if it doesn't effect the quality too much. Also compress you textures into formats like DDS.

Scaling models will not save you any space, it's the amount of vertices. Whether the first vertex coordinate is positioned at (1, 1, 1) or at (1000, 1000, 1000) is of no relevance. They're all just floating point numbers after all: the letter 'A' doesn't take up less memory than a 'Z' because it's represented by a lower number (ASCII).

Quote:But since I'm gonna be tiling almost everything, then scaling the physical size of the buildings wouldn't matter at all? That's what you're saying? I won't notice any performance increase by it?

Won't matter / that's what I'm saying / no performance increase. :)

Consider the two images I included in my previous post. They are actually the same image, only the second one was scaled by setting the width and height to twice the original size in HTML. It doesn't take longer to download the one or the other. Of course the second picture is larger, but if would take a few steps back from your screen, it will appear smaller (if you disregard the context that is). Same for the first image: move closer to the screen and the picture will appear to be bigger (taking up a bigger 'chunk' of your field of view) but the quality will also suffer.

Technically, you can't compare the rendering of images in browsers to your application, but in a way the same principle is behind it.

Quote:Edit: Perhaps worth mentioning, it should be possible to actually walk around in this virtual city, meaning, you'd be able to walk upclose to any building. In this case, perhaps physical size would matter?

Not really, it depends on the camera's properties (projection, view matrices).

Quote:If my building is real life scale, this texture would need to get tiled even more for the quality to stay intact right?

Tiling would probably produce a higher quality image, yes.

Quote:And the more the texture gets tiled, the "smaller" uach tile would look right?

Yes. in real life: if the bricks get smaller, you'd need more bricks to construct a building.

Quote:Then in that case, physical size would matter?

No (see previous answer). Sizes are relative.
Yes I do understand. But again, if my model is in real life size, that would mean that my texture need to be tiled even further for the quality for be good enough. Meaning, each brick would end up smaller.
And I can't have that since it would look rediculous.
How could I solve this than? Would I need to create a new texture to compensate for that? Meaning, creating a new texture that contains bigger bricks? Wouldn't it be easier to just scale the 3d-model down and decrease the tiling so that the texture fits better? Cause I want most textures to actually be 128x128 in size. If the model should be in real life size, then my texture need to be of a higher resolution (bigger bricks). And that would decrease effectiveness right?

Edit:

This is a render of my texture and model
http://img122.imageshack.us/my.php?image=brickdr6.jpg

Looks pretty nice right? The texture is in 128x128 size.
I my model get increased in size, then either the texture get streched, OR i tile it even further. Which will make each brick smaller in relations to the increased size of the model.

[Edited by - Kenny Bones on October 9, 2008 8:27:55 AM]

This topic is closed to new replies.

Advertisement