Tag Info

Hot answers tagged

42

This looks like the bottom layer of a volume texture that many games these days use to perform color correction. The idea is that the final RGB screen color, after rendering and tonemapping, is used as a texture coordinate to index into this texture, and the color found in the texture replaces the original color. This allows artists to arbitrarily modify ...


35

Why are the resolution of textures in games always a power of two (128x128, 256x256, 512x512, 1024x1024, etc.)? As Byte56 implied, the "power of two" size restrictions are (were) that each dimension must be, independently, a power of two, not that textures must be square and have dimensions which are a power of two. However, on modern cards and which ...


29

I spent a few months at one job coming up with a better texture packing algorithm. The algorithm we started with was simple. Collect all the input items. Sort them by total pixels consumed, large-to-small. Lay them out in your texture in scanline order, just testing stuff from the topleft pixel to the topright pixel, moving down a line, and repeating, ...


25

I wouldn't worry about wasting VRAM for a few character textures. To me using your option 2. (with different textures or different UV offsets if that fits) is the way to go: more flexible, data-driven, less impact on the code, less bugs, less worries. This put aside, if you start to accumulate tons of characters with tons of sprite animations in memory, ...


24

3D texture works like regular texture. But it is truly 3D. 2D textures has UV coords, 3D has UVW (you had to use them propably). Texture coords are unit cube (0 - 1, 0 - 1, 0 - 1). Possible usage: volumetric effects in games (fire, smoke, light rays, realistic fog) caching light for realtime global illumination (CryEngine for example) scientific (MRI, CT ...


22

I stumbled across this tutorial a while back, which looks to be a good resource: http://www.gamedev.net/page/resources/_/creative/visual-arts/make-a-particle-explosion-effect-r2701


22

Sounds like the scaling algorithm you're using isn't interpolating pixels. Pictures are best explained with pictures: It's the Major, first in full, then scaled down with Lanczos (left) and nearest-pixel (a.k.a. no interpolation) (right) to two sizes. The same comparison, in 3x magnified: Make sure the scaling you're using is resampling sensibly. For ...


19

I think part of it may just be that Blizzard has an amazing number of texture artists. But let's rephrase the question a bit: I have a limited budget and want to make a realtime strategy game without obviously tiling textures. How can I accomplish that? Good question! Here's a few big tools that I'd use: 1) A reasonably large set of interchangeable ...


18

First of all, I'm not sure why you want to implement a height map (i.e. geometry displacement) if people won't be able to land, it just seems more efficient to normal map it or something. With that said, what you want is to convert from an arbitrary (x, y, z) to a (u, v) coordinate, which is trivial. No cubemap needed. Every (u, v) texel has a height ...


16

Your understanding is close. Each 3D model is made out of vertexes. Each vertex usually defines the location of a point in space, a normal (used in lighting calculations) and 1 or more texture coordinates. These are generally designated as u for the horizontal part of the texture and v for the vertical. When an object is textured, these coordinates are used ...


15

Why are textures always square powers of two? Textures are not always square nor are they always powers of two. The reason why they tend to be powers of two is usually to increase compatibility with older video cards that imposed that restriction. As for non-square textures, that's not usually a problem. To summarize: Textures typically don't need to ...


14

How I'd probably do it so I could maintain some art control and not potentially spend a long time trying to tweak a procedural method to get it just right... First, manually create a number of sprites of tea leaf clumps as your art "pool" - not each as an entire cup's worth of tea leaves, but more like a smaller grouping. Say, 20 of them or so? Then place ...


14

We have a similar case with our RTS Remake. All units and houses are sprites. We have 18 000 sprites for units and houses and terrain, plus another ~6 000 for team colors (applied as masks). Long-stretched we also have some ~30 000 characters used in fonts. So the main reason behind atlases are: less wasted RAM (in older days when you upload NPOT to GPU ...


13

PVRTC 2BPP encoding, as introduced in this paper divides an image into 8x4-texel blocks, and compresses each block such that only two RGB colors are stored for each thirty-two texel block. None of the thirty-two texels stores a color of its own - each texel stores only information about how to blend between the two RGB colors of its 8x4-texel block. If ...


13

Humans have trichromatic color vision, so the space of colors we can see is fundamentally three-dimensional. (Well, for most of us, it is. Colorblind people may only have dichromatic or monochromatic vision, and there may be a small number of people who can (barely) distinguish an extra dimension. Also, technically, even normal humans do have a fourth ...


13

Since you've asked for experiences, here are mine. Back in the days when I was programming PS2 games, the "layered alpha quads" approach was a way that we often implemented fog. Occasionally as ground fog, but much more commonly as full-screen fog. And it worked just fine in either case. So yes, it was viable in the pre-fragment-shader days. Well, sort ...


12

A texture atlas is simply a way to stuff multiple sprites into a single texture. You also will need an index into the texture so that you can find where each of the sprites are located. The reason these are used is because it's more efficient to bind a texture once and change the UV values being used than to bind multiple textures for each sprite you draw. ...


12

JPG and PNG files will almost always be smaller on-disk than in memory; they need to be decompressed on-the-fly to acquire raw RGB data, thus requiring more processing power for the loading and more RAM afterwards. So many modern engines opt to store the same format on disk as they do in memory, leading to files that are the same size as the texture's memory ...


12

3D textures or 'Volume textures' are a series of normal textures arranged as slices, like a deck of cards. These are used in volumetric rendering which often takes real world data such as CT scans and then manipulates them. In games and graphics it's sometimes for volumetric effects like smoke where you trade the flexibility of a particles system for the ...


12

When I did this I ended up making a simple gradient file (xml or image based, doesn't matter) that predetermined the color used at the specified distance between the primary height colors (grass vs. sand for instance). This way, there were inbetween states. What is great about this is that you have full control over the transitions. I suppose that you could ...


12

I don't understand why you wouldn't want to use an off-the-shelf loader. PNG, for example, is a good choice for a format but is complex to write a general purpose loader for (and probably not worth the effort of writing one that only loads the specific subset of PNG formats you care about). Given that somewhat unusual requirement, TGA is probably your best ...


12

This is the way I understand it. Could be totally wrong, but I'm sure someone will flame correct me if I'm wrong. The mathematical theory behind UVW texture mapping is similar to the theory behind UV texture mapping. See Bummzack's link here: What exactly is UV and UVW Mapping? to get a better explanation of what UV mapping is. Basically, you're mapping ...


12

The number of textures that can be bound to OpenGL is not 32 or 16. It is not what you get with glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &texture_units);. That function retrieves the number of textures that can be accessed by the fragment shader. See, each shader has its own limit of the number of textures it can use. However, there is also a total ...


12

One option that'll be a lot easier than fiddling with mipmaps and adding texture coordinate fuzz factors is to use a texture array. Texture arrays are similar to 3d textures, but with no mipmapping in the 3rd dimension, so they're ideal for texture atlases where the "subtextures" are all the same size. http://www.opengl.org/wiki/Array_Texture


11

Content creation tools for procedural texturing have been the biggest roadblock. Artist are very fast putting things together in Photoshop and the potential gains with procedural texturing haven't outweighed the increased content creation time. Allegorithmic (http://www.allegorithmic.com/) has some interesting tools they've developed to try and make ...


11

Terragen Classic is free for personal and non-commercial use: http://www.planetside.co.uk/content/view/19/31/ There are tutorials how to do it around the net. Then, of course, there is Terragen 2, e-on Vue, and Bryce.


11

I think textures are sprites on a 3D object but not sure if that is correct? No. Strictly speaking, a texture is a term for one or more images that are bundled together in an object called a "texture", within the context of a GPU-based rendering system. A texture can be used when rendering a 3D object. Or it can be used when rendering a 2D object, ...


11

Okay, I think you have two problems going on here. The first problem is with mipmapping. In general, you don't want to naively mix atlasing with mipmapping, because unless all your subtextures are exactly 1x1 pixel sized, you will experience texture bleeding. Adding padding will simply move the problem to a lower mip level. As a rule of thumb, for 2D, ...


10

Yes, a texture for most purposes is an image. Once a texture is loaded from a file, it can be applied as a sort of "decal" to any polygon you wish. When you see textures in an image file they typically appear a bit warped, That's because when the texture is "wrapped" around the model, it will all even out and wrap around the model properly. You use a ...


10

This looks like a case of not drawing with a premultiplied alpha texture correctly. Here's a few helpful links on the subject: http://www.youtube.com/watch?v=dU9AXzCabiM http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx If you search for "premultiplied alpha" and iOS you might find a direct solution to your problem. I suspect ...



Only top voted, non community-wiki answers of a minimum length are eligible