Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [textures]

A bitmap (raster image) used in a texture mapping process.

Filter by
Sorted by
Tagged with
46
votes
5answers
38k views

How to avoid texture bleeding in a texture atlas?

In my game there is a Minecraft-like terrain made out of cubes. I generate a vertex buffer from the voxel data and use a texture atlas for looks of different blocks: The problem is that the texture ...
52
votes
9answers
39k views

Texture packing algorithm

What is a good texture packing algorithm? Technically, bin packing is NP-hard, so a heuristic is what I'm really after.
53
votes
7answers
51k views

Why are textures always square powers of two? What if they aren't?

Why are the resolution of textures in games always a power of two (128x128, 256x256, 512x512, 1024x1024, etc.)? Wouldn't it be smart to save on the game's file size and make the texture exactly fit ...
40
votes
5answers
28k views

Should I use textures not sized to a power of 2?

In the early days of OpenGL and DirectX, texture sizes were required to be powers of two. This meant interpolation of float values could be done very quickly, using shifting and such. Since OpenGL 2....
6
votes
2answers
3k views

Combinations for tiling two textures together

Hi I need to create seamless ground with grass and dirt. I can make two textures connect seamlessly one to another. My question is how to figure out all the combinations, like (left, top, bottom, left-...
0
votes
1answer
4k views

UV World mapping in shader with Unity.

Please refer to this Answer. DMGregory script is working for me, although I have a problem I can't fix because I don't talk shader :) The tiling will be applied correctly on geometry aligned on XY ...
26
votes
4answers
27k views

What exactly is UV and UVW Mapping?

Trying to understand some basic 3D concepts, at the moment I'm trying to figure out how textures actually work. I know that UV and UVW mapping are techniques that map 2D Textures to 3D Objects - ...
13
votes
1answer
6k views

How does UVW texture mapping work?

I'm trying to understand the mathematical theory behind UVW mapping. Can anyone explain me how UVW mapping works? Or at least provide me a pointer?
4
votes
1answer
4k views

How do I create a decal system?

I'm currently given the task to design & create a simple decal-system in C++/DirectX. Does anybody know a great tutorial, article or paper to start with? (Especially the part about 2D-texture to ...
7
votes
1answer
4k views

Sidescroller variable terrain heightmap for walking/collision

I've been fooling around with moving on sloped tiles in XNA and it is semi-working but not completely satisfactory. I also have been thinking that having sets of predetermined slopes might not give me ...
13
votes
3answers
2k views

How can I create my own sky maps? [closed]

What are the methods/tools for generating realistic skies with clouds and atmospheric shading? FOSS alternatives and spherical projections get extra points.
5
votes
1answer
806 views

UV interpolation is wrong with a wide FOV

How should I take FOV into account when interpolating UV coordinates? This picture shows the result today. Everything works fine with a narrow fov, but when I make it really wide, things deviate. The ...
7
votes
2answers
3k views

One single texture atlas?

When I want to use texture atlasing, should I try to place all of my sprites into one single texture atlas? Or are there times when I should have multiple smaller texture atlases?
23
votes
6answers
10k views

What happened to procedurally generated textures? [closed]

I recall some time ago that procedurally generated textures were becoming a big deal that a lot of people/companies were really interested in with some serious benefits (smaller deployments, ...
10
votes
1answer
4k views

Sprite sheet textures picking up edges of adjacent texture

I have a custom sprite routine (openGL 2.0) which uses a simple sprite sheet (my textures are arranged horizontally next to each other). So, for example, here is a test sprite sheet with 2 simple ...
13
votes
5answers
5k views

Tools for generating texture atlases/sprites from source images? [closed]

Is there an industry standard file format for texture atlases? What are the apps that take a directory of images and turns it into a texture atlas png and a text file describing what's on it? This ...
14
votes
1answer
2k views

What is a texture atlas?

I've heard about this concept, but what is it?
13
votes
1answer
24k views

How to render a texture partly transparent?

Good Morning StackOverflow, I'm having a bit of a problem right now as I can't seem to find a way to render part of a texture transparently with openGL. Here is my setting : I have a quad, ...
6
votes
2answers
3k views

OpenGL 3.0+ framebuffer to texture/images

I need a way to capture what is rendered on screen, i have read about glReadPixels but it looks really slow. Can you suggest a more efficient or just an alternative way for just copying what is ...
18
votes
2answers
4k views

How does GPU handle texture and VRAM?

It's actually a bunch of inter-related questions: Are compressed textures (dxt5/dxt1 etc.) ever completely decompressed while going through rendering pipeline? If the answer to the first question is ...
5
votes
1answer
4k views

OpenGL ES 2.0. Sprite Sheet Animation

I've found a bunch of tutorials on how to make this work on Open GL 1 & 1.1 but I can't find it for 2.0. I would work it out by loading the texture and use a matrix on the vertex shader to move ...
4
votes
1answer
1k views

Painting terrain with a selection circle

I don't mean putting a circle under a unit like done in an RTS, that's fairly simply done with a scenegraph(-like structure). What I'm referring to is selection circles for things like Area of Effects ...
3
votes
4answers
3k views

How to render grid properly, especially over distance?

I'm drawing a grid, pretty much like one can see in the Unity editor itself or any 3D-editor, many 3D-related applications and some games. But it doesn't look pretty in my case. I put a few random ...
16
votes
1answer
11k views

Max texture size Android : which settings for 2048x2048?

I want to use a texture atlas of 2048 x 2048 in my game, and I would like to warn the users with a "too low" device to not download the game. With a texture atlas of this size, what requirements ...
7
votes
1answer
2k views

How can I draw a perspective-correct quad?

I'm trying to draw a quad in 2D (in SharpDX, but that is basically XNA). But texture correction is not working, and I'm getting only an affine textured quad. I'm using ...
6
votes
2answers
3k views

How to handle a huge map?

Generically speaking, how would you handle a huge 2D Map of which only a part is displayed? Imagine the old top-down racing games like Micro Machines. I would know how to do something with a tile-...
8
votes
1answer
4k views

Mip Maps on 2D Sprite causing black line above. Why is this?

I am new to Unity. I'm trying it out and using Futile for a code-first approach, but still importing textures using the Unity system. The problem I'm having is that when I use mip maps to scale large ...
7
votes
2answers
11k views

How can I prevent seams from showing up on objects using lower mipmap levels?

Disclaimer: kindly right click on the images and open them separately so that they're at full size, as there are fine details which don't show up otherwise. Thank you. I made a simple Blender model, ...
6
votes
3answers
10k views

SDL2 sprite batching and texture atlases

I have been programming a 2D game in C++, using the SDL2 graphics API for rendering. My game concept currently features effects that could result in even tens of thousands of sprites being drawn ...
1
vote
1answer
5k views

How can I import a Google Sketchup model with textures?

I'm using Unity 4 and trying to import a SketchUp Model into Unity and other Engines - but I can't get it to import correctly. Can anyone help me out?
8
votes
3answers
1k views

What is a good method for coloring textures based on a palette in XNA?

I've been trying to work on a game with the look of an 8-bit game using XNA, specifically using the NES as a guide. The NES has a very specific palette and each sprite can use up to 4 colors from ...
5
votes
3answers
2k views

Is there a tool to automatically pack individual textures into one big png? [closed]

I'm currently was working on a texture pack for minecraft (but this question is not restricted to that). All terrain textures are squared and stored in one big terrain.png. (FYI that's from Glimmar's ...
2
votes
1answer
842 views

XNA shield effect with a Primative sphere problem

I'm having issue with a shield effect i'm trying to develop. I want to do a shield effect that surrounds part of a model like this: http://i.imgur.com/jPvrf.png I currently got this: http://i.imgur....
0
votes
1answer
2k views

Unity Performance: How many Materials per Object?

I have learned that a Mesh with 4 Materials each 1024x1024 in Size is somewhat slower than a Mesh with 1 Material 2048x2048 in Size? In my usual workflow I tend to seperate different Materials into ...
0
votes
1answer
762 views

Cocos2d patterns for simple texture management

I'd like to simplify the way I preload image resources in my Cocos2d based iOS apps. I've created a small object the just wraps a few of CCTextureCache's methods. It looks like this: ...
0
votes
1answer
999 views

SVG textures for 3D game objects in Unity?

Is there a way to make textures using vector graphics and use it for 3d models so that textures would be object size independent and won't get blurry?
37
votes
6answers
21k views

Creating a retro-style palette swapping effect in OpenGL

I'm working on a Megaman-like game where I need to change the color of certain pixels at runtime. For reference: in Megaman when you change your selected weapon then main character's palette changes ...
34
votes
3answers
18k views

How can I make a good-looking explosion particle effect?

I'm not much of an artist, but I'm trying to make decent particle effects in a 2.5D game. I'm making a replica of Wii Play's "Tanks" and I can't quite get the explosions to look good. I'm not going ...
31
votes
4answers
31k views

What are 3D textures?

Google has failed me, I could not find anything informative. So perhaps GameDev can :). What are 3D textures? When are they used? Performance costs? How are they stored? I have many vague ideas, but ...
19
votes
4answers
6k views

Procedural Planets, Heightmaps and Textures

I am currently working on an OpenGL procedural planet generator. I hope to use it for a space RPG, that will not allow players to go down to the surface of a planet so I have ignored anything ROAM ...
9
votes
1answer
21k views

How to compute tangent and bitangent vectors

I have a texture loaded in three.js, then passed to the shaders. In the vertex shader I compute the normal, and I save into a variable the uv vector. ...
17
votes
5answers
19k views

Preferred way to render text in OpenGL [closed]

I'm about to pick up computer graphics once again for an university project. For a previous project I used a library called FTGL that didn't leave me quite satisfied as it felt kind of heavy (I tried ...
13
votes
2answers
4k views

Should I be using spritesheets, because of or despite of my vast number of images?

I am developing a 2D game, and I have a lot of sprites. I used 3D animations and models to render into 2D, to give them that "Fallout" or "Diablo" look to them. It is also easier than drawing by hand, ...
12
votes
4answers
51k views

Glass Material for Unity 5

Anyone know how to make a glass material in Unity 5? I can do metal and image textures, but not sure how to create a glass material. A search on Google would not get me anything for Unity 5 so it ...
11
votes
2answers
19k views

What does changing GL_TEXTURE_WRAP)_(S/T) do?

I am working through some beginner OpenGL tutorials, and the current one teaches how to apply a texture to a simple rectangle. The tutorial states tells me to set the texture parameters ...
9
votes
4answers
14k views

How much memory does a texture take up on the GPU?

A large png on disk may only take up a couple megabytes but I imagine that on the gpu the same png is stored in an uncompressed format which takes up much more space. Is this true? If it is true, how ...
8
votes
1answer
6k views

GLSL pack floats into an RGBA texture

I want to compose conventional triangle-based models and particles with a ray-traced scene at a reasonable frame-rate. webGL does not let you write the gl_FragDepth...
4
votes
1answer
271 views

Creating rectangles from the inner part of a texture2D

This may be hard to understand, but I'll do my best. You will see that the first image is a normal Mario, and the other is the result I am looking for. I'm trying to find a way to extract rectangles ...
10
votes
1answer
2k views

Procedurally generated terrain map. Blend Transitions between terrain types

The question isn't the greatest wording ever sorry. I have been learning about and prototyping some texture and terrain generation stuff and have run into something perhaps you can help me with. How ...
6
votes
1answer
700 views

With what projection matrix should I render a portal to a texture?

I'm using OpenGL. I have problem with my engine's portal implementation. To create the first portal I do: create a virtual camera with the position of the second portal and the correct orientation ...