Questions tagged [texture-packing]

Use this tag for questions related to texture packing, an algorithm that computes a texture atlas.

is used in its general form, for any kind of question related to implementing an algorithm of such kind, designing a texture packing algorithm, and so on.

14 questions
10
votes
2 answers

Placing 2D shapes in a rectangle efficiently. How to approach it?

I've been searching far and wide on the seven internets, and have come to no avail. The closest to what I need seems to be The cutting stock problem, only in 2D (which is disappointing since Wikipedia doesn't provide any directions on how to solve…
LWolf
  • 188
  • 1
  • 2
  • 7
2
votes
1 answer

Rectangle packing with static rectangles

I've implemented a rectangle packing class similar to the one mentioned here. My ultimately goal is to pack a number of smaller sprites into a large spritesheet. The difficulty I'm experiencing is figuring out a way to expand that algorithm to allow…
ndg
  • 2,585
  • 2
  • 33
  • 58
2
votes
1 answer

I need help on implementing an algorithm that will parse specific textures from a texture in libGDX

Consider: import com.badlogic.gdx.Gdx import com.badlogic.gdx.files.FileHandle import com.badlogic.gdx.graphics.Texture import com.badlogic.gdx.graphics.g2d.TextureRegion import java.lang.Exception import kotlin.math.floor lateinit var AssetMap:…
2
votes
1 answer

What is the maximum sprite sheet size I can use for android devices?

What is the maximum sprite sheet size I can use for android devices? I heard that there is a limit, because some devices can't handle large images. Is 8196x4092px still okay?
potato
  • 4,479
  • 7
  • 42
  • 99
2
votes
1 answer

LibGDX Texture Packer

I am trying to use LibGDX's texture packer gui for making a texture atlas of tiles for a video game. But I keep getting alpha bleed and I am wondering how to prevent that from happening? I have tried all the different filters and the only one which…
Scott Kingdon
  • 351
  • 1
  • 2
  • 9
2
votes
1 answer

CUDA: how to read 4 (or 16) chars in one transaction per thread using textures and char4 (or int4)?

I have a large character array in the device global memory that is accessed in a coalescent manner by threads. I've read somewhere that I could speed up memory access by reading 4 or 16 chars in one memory transaction per thread. I believe I would…
Ross
  • 265
  • 1
  • 3
  • 13
1
vote
0 answers

Tilable 3d noise in texture?

I've looked high and low for an answer to this, but I haven't found anything yet. Here's my question: Can you pack pre-calculated noise into a 2d texture in such a way as to be able to calculate a reasonable facsimile of 3d noise without the…
cvk
  • 11
  • 1
1
vote
2 answers

LibGdx Texture packing

I want to use animated sprite characters in my LibGdx Project. I have sprite sheets and also individual images for the sprite animations. While creating texture atlas,do I have to use sprite sheet itself or individual images for packing? Which one…
Niranjana
  • 514
  • 5
  • 23
0
votes
1 answer

Texture and animation in iOS

I am developing a game for iPhone retina enabled. This game has alot of sprite sheets to be used. MyQuestion which is better to use pvr pvr.gz pvr.ccz or normal png format which is the best practice for using sprite sheets.
0
votes
0 answers

PixiJs Sprites adding line at top

Somehow I am getting an extra little artifact at the top of my AnimatedSprite frames. I am pretty sure it is the bottom of the sprite packed above. I thought that my sprite sheet PNG was off so I used TexturePacker to break up and re-assemble the…
nickdmax
  • 539
  • 2
  • 4
  • 11
0
votes
1 answer

C# Algorithm to generate image (2048x2048) from some images

What I would like to do is create an image (2048x2048 in my case) The algorithm should work in this way: -User select some images from a folder and tells my program "generate image" -The program check if can put all images inside a single image…
Francesco Belladonna
  • 11,361
  • 12
  • 77
  • 147
0
votes
1 answer

Why Texture2D.PackTextures() creates so much empty space in atlas?

I am creating a texture atlas by script. I use 6 images to do that and the code looks like this: atlasTextures = new Texture2D[6] {frontTexture, topTexture, backTexture, bottomTexture, leftTexture, rightTexture }; Texture2D atlas = new…
Łukasz Motyczka
  • 1,169
  • 2
  • 13
  • 35
0
votes
1 answer

Packing arbitrary squares into a rectangle

To provide some context, I have a couple of lightmaps for different objects in a 3D scene that I want to pack into a single texture. The lightmaps are square and have different sizes that are not necessarily power of two (although this restriction…
Daerst
  • 954
  • 7
  • 24
0
votes
1 answer

libGDX - TextureRegion drawing weird when scaled

Having a weird issue. I have a Texture with four frames of a sprite Animation. Each frame is loaded as a TextureRegion. Most of the time the Animation play without any issues, but occasionally it will draw too much of the Texture in one…
1337ingDisorder
  • 821
  • 1
  • 6
  • 17