Tag Info

New answers tagged

0

The problem was the texture packer that messed up the bitmaps. How I solved it is I premultiplied the bitmaps with white using Photoshop (Export -> Render Video).


0

D3D11 will prevent you from binding a shader view of a resource and a render view of a resource simultaneously. Consequently you will need to bind and unbind the views every time you want to read or write to the depth texture; you can't just bind them and leave them that way for the lifetime of your program, because you can't have both views bound ...


0

Here is an excellent tutorial on texturing. :)


-2

I recommend switching to LWJGL. The best thing is, all your Opengl knowledge can carry over. They have extensive forums and a decent wiki. It makes using Opengl a lot easier.


2

SFML 2.0+ makes it even easier to load a texture; sf::Texture texLid; std::string image2="images/top.jpg"; if (!texLid.loadFromFile(image2)) { std::cout << "Could not load" << image2; char c; std::cin>>c; return false; } glEnable(GL_TEXTURE_2D);//tell OpenGL to use textures when drawing ...


0

The model itself is not more costly to made but an additional texture is required. Depending on the artist a new texture has to be drawn or the bumpiness is created from a high detail version of the model. The is no general answer. Unity states Normal mapped. This is a bit more expensive than Diffuse: it adds one more texture (normal map), and a couple of ...


1

It is the the position and size within the Texture2D object. Set data can only alter the color data within the minimap. It can not alter the size or create new ones. The Nullable<Rectangle> rect is the destination within the Texture2D and the int startIndex, int elementCount is the source from the dataColors array. Here are a few examples. The ...


0

You can tell Unity to compress your textures on import and set this per texture and/or globally so you're free to create your assets at a higher quality. You can then play with the settings, leaving your source assets as is. They'll be compressed when you build the game.


2

Using a lower number of bits per pixel means you save filesize, loading time and texture memory. Also, sprite drawing will be faster because less data needs to be moved between graphic memory sections. When you develop a 2d game and your target devices are desktop PCs, these factors can usually be ignored as any modern PC should handle 32bit graphics with ...


1

You could use compressed textures to store your 1bpp image, they can all store 1bpp images without loss as each tiles can have 2 colors (and in-betweens). PVRTC supports a 2bpp format, PVRTC is only supported on PowerVR devices. ETC1 and S3TC (DXT1) are 4bpp which comes back to the same size as 4x4 in RGBA4444 format but you don't need to combine and then ...


0

Think origami. A UV map is like a flattened (unwrapped) 2D shell (skin) of your 3D mesh. If you were to cut out the map and fold it along the mesh lines, the result would be your 3d model. The U,V floating point values range from (0,0) to (1,1) The upper left corner of the UV map is (0,0) The lower right corner is (1,1) Each vertex in a mesh ...


1

What values are you using for originX, originY, scaleX, scaleY? maybe you are using wrong values for originX and originY. The origin is bottom left corner of the textureregion as stated in the docs. To set the origin to the center of the texture set originX = currentFrame.getRegionWidth()/2; originY = currentFrame.getRegionHeight()/2; Hope this helps. ...


0

Got it. You create all the Sprites up front and keep them. Each Sprite object takes about 500 bytes of RAM, and you just set the Image.Sprite attribute to the frame you want. Sprite[] _animationFrameSprites; private Image _theImage; private GameObject _theObj; private Vector3 _theRootPosition; void Start() { AtlasFrameData frame; for (int i = 0; i ...


0

This is just a guess, but I notice that the edges of your image(s) are anti-aliased. When you scale the images down using Linear filtering, the semi-transparent edges might be set to black, because the filter cannot handle semi-transparent pixels. This is just an idea, but it might be worth a try to remove the semi-transparent pixels which surround the ...


0

your Answer from Arqade MCEdit is a tool for editing minecraft save file, I can write a filter for it that manipulates the MC saves. I can also read the OTBC file using the OT c++ modules and formatting them into XML then translating the XML into MCedit readable data and then injecting them into a minecraft save through a MCedit filter script.


1

You'll want to look into pixel-art upscaling filtering algorithms (http://en.wikipedia.org/wiki/Image_scaling). These have been specifically designed to upscale pixel art, having the properties of (1) retaining the original color palette (aka. no blurring) and (2) removing jaggies (aliasing that occurs due to nearest neightbour sampling). Some names of ...


-1

You need to apply a low pass filter before the down-sampling (down-scaling) occurs on the low resolution screens. I have used simple gaussian blur (convolution transform) with good results: This was done with a blur radius of 1 pixel.


0

The error is clear. One of your meshes/vertices is missing a texture coordinate, which is the expectation in this case. In Maya, apply a texture channel to transform1 mesh even if you have no intentions of assigning any textures to it. Also, why do you have a mesh called "transform"? Are you sure you didn't mistakenly misname a bone as mesh or vice versa?


5

For one, nearest-neighbor will result in pixel perfect scaling only if it's used to upscale in integer multiples. Apart from that, you should not be conducting any scaling operations on your view/projection matrices. If you set your view to match the dimensions of the screen, and your projection matrix to be orthographic with dimensions that match the ...


2

You need to average the sprite pixels which are visible beneath each screen pixel. The sprite pixels can be sampled "nearest", but to move smoothly in subpixel increments on the display, you need some kind of oversampling. If you're using OpenGL, you can do this in your shader by averaging 4, or 9 or more sprite samples offset near each fragment (calculated ...


0

AFAIK You Cant make a perfect one, but if you make a cubemap of the room and set the shader of the mirror to Reflective/diffuse, then apply the room cubemap, you get a good feeling of a mirror. you just gotta tweak the cubemap to get it perfect and make the face sizes more than 64 or it will look blurry.


1

What are some best practices to determine the total texture budget of a modern 2d game? This likely depends on the size of your target platforms RAM/VRAM, and how much you'll need to have loaded at one time. It's probably something that you have to fine-tune. Another thing to consider is non-volatile storage (media/disk space, etc.). How can I tell ...


1

Try calling p.Apply() in your drawing code to set the effect correctly on the GPU before drawing. foreach (EffectPass p in drawingEngine.CurrentTechnique.Passes) { p.Apply(); // this will set the effect graphics.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, numVertices, 0, numIndices / 3); }



Top 50 recent answers are included