The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
53 views

Why can I not change a material's color in Unity?

I tried setting the material color at runtime: gameObject.renderer.material.color = Color.black; The inspector shows the new color, but the gameview still shows the old one. The object I am trying ...
1
vote
1answer
307 views

Sprite collision with color?

Is this possible? To elaborate, I am making a PacMan offshoot. Essentially it is a "zoomed in" version of the game, but the board is randomly generated. I have 11 .png files each to be used as a ...
21
votes
6answers
3k views

Algorithm to modify a color to make it less similar than background

I'm creating a demo of 20 balls bouncing each other, with a background filled with a solid color. Color for each ball is chosen randomly with randint(0, 255) for each R, G, B tuple component. Problem ...
0
votes
1answer
30 views

OpenGL strange rendering problem when buffers have different sizes

I have encountered a very odd error in my program, "odd" in the sense that everything the API says suggests that the error should not occur. I have a bunch of 2D un-indexed vertex data, and I want to ...
4
votes
1answer
124 views

cost of texture change vs color change

How would I go about determining the difference in cost between changing the render color of an object every frame vice changing the texture (same sheet, just changing the source rectangle) every ...
13
votes
7answers
2k views

What does the term “channel” mean when used in regards to computer graphics?

I was studying terminology for computer graphics, and this statement came up that confused me. The image can have alpha channels for transparency. I tried searching for the meaning of the term ...
2
votes
2answers
61 views

Palette reduction to pre-defined palette

I'm writing a bunch of GLSL effects for fun, but I can't wrap my head around this. Basically, I want to reduce a texture's palette into a pre-defined set of colors. For example, a post-processing ...
3
votes
1answer
151 views

Best way to blend colors in tile lighting? (XNA)

I have made a color, decent, recursive, fast tile lighting system in my game. It does everything I need except one thing: different colors are not blended at all: Here is my color blend code: ...
1
vote
1answer
142 views

Why am I not getting an sRGB default framebuffer?

I'm trying to make my OpenGL Haskell program gamma correct by making appropriate use of sRGB framebuffers and textures, but I'm running into issues making the default framebuffer sRGB. Consider the ...
1
vote
1answer
90 views

XNA 4: GetData from Texture2D and Set it into Texture3D with specific order

I am trying to convert my color grading 2d lookup texture into 3d LUT. When I simply use: ColorAtlas.GetData(data); ColorAtlas3D.SetData(data); I get this: I tried building my 2d atlass ...
6
votes
2answers
166 views

Tool to simulate color blindness

TLDR: is there an application I can download (or some configuration of Windows, or something) that will let me see how my game will appear to users with different color-blindnesses? There are already ...
4
votes
1answer
273 views

Is white the best base color to start with when planning to shade sprites within Unity?

I'm looking into prototyping a game in Unity which will consist of solid square sprites / tiles. I figure I can represent different types of objects with different colors for each of the tiles in the ...
0
votes
2answers
48 views

What is the correct way to reset and load new data into GL_ARRAY_BUFFER?

I am using an array buffer for colors data. If I want to load different colors for the current mesh in real time what is the correct way to do it. At the moment I am doing: glBindVertexArray(vao); ...
2
votes
2answers
55 views

Colorize with a given color a texture

I have a texture and I want to "colorize" it with a given color, lets say cyan (#00ffff) or purple (#800080). What I want to do, is get all the pixel values from the texture, and remove the color and ...
2
votes
1answer
177 views

When should I use color keying vs PNG transparency?

SDL (and other toolkits) can use color keying to make a certain color in an image transparent. Alternatively, you could load a PNG image that supports transparency. When should I use which?
0
votes
1answer
504 views

How do I programmatically remove an image's background color?

I have a sprite sheet (image) and want to draw it on screen. image = sprite sheet image x = player x position y = player y position width = player width height = player height public ...
3
votes
2answers
90 views

How can I read the color of a specific pixel in XNA?

I want a way to find out if, for example, the pixel at Vector2(2, 5) on the game window is color Color.Red, or some other color or set of coordinates. How can I do this?
4
votes
0answers
84 views

Problem building a color grading map

I am trying to build a default color grading map into a 1024x32 RenderTarget. Here is my shader code: VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; ...
0
votes
0answers
23 views

Any chance to store bloom power in 3 channels with YCbCr color coding?

I need to store per-pixel bloom power in the final Render Target to make Tron-like effects, when even non-bright pixels can bloom. The value can easily be stored in an alpha channel without any magic ...
0
votes
1answer
101 views

How to blend bullet sprite from white to yellow in libgdx

Does anyone have a clue that will make my bullet sprite fade from yellow to white? As the bullet is created it will be white but when it trails on it will turn yellow. Any ideas how? Is it a simple ...
7
votes
2answers
1k views

How do I change a sprite's color?

In my rhythm game, I have a note object which can be of a different color depending on the note chart. I could use a sprite sheet with all the different color variations I use, but I would prefer to ...
36
votes
5answers
1k views

Best Way to allow players to “Dye” images without losing color quality?

I am creating a 2.5D isometric (2D images) game. I want the players to be able to "dye" their armor, clothes, and other things. I find that grayscaling everything leads to losing out on some of the ...
0
votes
1answer
159 views

Creating a gradient for a texture - Why is the color becoming dark on one side?

Updated While debugging I looked at the lerp and it was calculating into a negative number at the start. So I added in checks for to low or high a value, and that seems to have fixed it. I'll answer ...
0
votes
1answer
139 views

How do you calculate a gradient value within multiple colors (gradient stops)

In WPF/Silverlight XAML you can have a brush with multiple gradient stops at different points along the color line. I was able to replicate this behavior with two colors, a single color lerp, from ...
1
vote
1answer
198 views

How do I find two points at an angle on opposite sides of a circle?

With reference to my previous question: I'm using micklh's answer, which works perfectly. However, it calculates the gradient based on two points, a starting point and an ending point. I want to ...
5
votes
3answers
605 views

How do I create a color picker with variable hue and saturation?

I am trying to create a Color Picker similar to that of MS Paint. Unfortunately, I can't figure out the algorithm for saturation. This is what my current algorithm creates. Anytime I try to ...
1
vote
1answer
40 views

2 Images, same object: tone difference and alignment

I would like to know a software which helps in post-production to calculate the general color/tone difference of 2 images. The images contain the same object, but arn't shot from the same position. ...
0
votes
1answer
69 views

XNA Float values don't work as parameter

With the Microsoft XNA Framework I can change the color of a tinted texture by changing it's integer values like so: Int x = 255; if(true) { x--; tint = new Color(x, 255, 255); } Draw(texture, ...
0
votes
2answers
56 views

Selecting a color that will be readable overlapped upon another? [duplicate]

I've got random circles from random colors of RBG (assume they can be any combination of values). I have some text I want to write on top of them but I want the color to be readable on it no matter ...
7
votes
3answers
7k views

How can I include vertex color information in .OBJ files?

The .obj files I export are missing data for vertex colors. Is there a way to include color information in the .obj file? If not, what are the alternatives?
1
vote
1answer
153 views

Spot Light color fade in Unity 3d

I have a scene where many spot lights are focused on the screen. All have red color and same intensity. What I want is that the red Color(0,0,0,1) value should increase and decrease in a fading effect ...
1
vote
2answers
137 views

Easy Method to Change Color on UI Elements

This isn't a language-specific thing as far as I'm concerned. I was wondering what may be a quick way to change the COLOR of a certain on-screen element such as a button and its associated text. I ...
0
votes
1answer
770 views

coloring box2d body in LibGDX

I want to color polygon of box2d in LibGDX. Found below useful class for that. http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.html But, it is not ...
2
votes
2answers
135 views

Filling in a shape from vertices

What I'm trying to do is set a bunch of points to create a shape and then fill everything in within those points. It needs to be done in 3D becasue this is being used as a way to generate a texture ...
0
votes
1answer
105 views

Make colour change depending on time

I'm making a Flash game (ActionScript 3) and for dynamics I'd like to make the background change colour depending on the clients' time of day. I have a rough idea on how I want to do this, At ...
2
votes
1answer
94 views

Expandable player boundaries

I'm trying to plan how to implement non-fixed boundaries so the player can expand their controlled territory without using a tiled based system. Each pixel can be fought over for who controls it. I ...
-1
votes
1answer
146 views

XNA changing color alpha

I know I can take a color and multiply it by a float to reduce its alpha like that: Color color = Color.Green * 0.15f; But how do I return the color's alpha to it's original value? I tried doing ...
5
votes
1answer
205 views

Coloring Terrain By Steepness Issue

Also I am attempting to implement some simple coloring by "slope" onto my planet and to do this I take the normal mapped normal "y" component and subtract it from one. Yet I am getting some strange ...
1
vote
1answer
127 views

how to calculate sky color hue in a specific way?

I have a day cicle in my game. I want to add a bluish hue to my terrain in the early morning and evening-night. I want to start transitioning from 0 hue color to the full hue color at 20 PM and reach ...
2
votes
1answer
91 views

Why is it when I render a basic cube, my editor's grid changes too?

I have one HLSL file for DirectX11 that only has input layout for color and position. Then another HLSL file for the simple cube that has position, normal and textures. What I noticed is when I render ...
204
votes
12answers
10k views

Is there an optimum set of colors for 10 players?

I need to identify 10 players with a unique color for each on the map. Is there an optimum set of 10 colors to use in this case? Every set I come up with has some colors too similar. Update: I was ...
5
votes
6answers
674 views

Colors for villains, good guys and neutrals

I am looking for 4-6 color schemes for three factions, good, evil and neutral (in a space strategy if that matters). I'd like the player to choose which side they want to play and each side will have ...
7
votes
2answers
242 views

2-components color model

RGB is the natural color model for OpenGL. But a lot of other color models exist. For example, CMY(K) for printers, YUV for JPEG, the little cousins YCbCr and YCoCg, HSL & HSV from the 70's, and ...
7
votes
4answers
521 views

Bright colors versus duller colors

I was talking to a friend the other day and we got onto the discussion about colors in videogames, relating to actual in-game graphics/art. He told me that even though it's easy to see things when ...
10
votes
6answers
633 views

What's a good alternative to colored tiles to account for color blindness?

I have a game with tiles. Each tile is a number, and each number is one of six colors. The color is important to the game play, and I want to make the game available to those who are color blind. ...
1
vote
4answers
249 views

Changing color of a moving image without lowering the fps

I just added an option to my game that makes it so that all the enemies will have a random color for their clothes instead of the regular blue. I use this code to draw rectangles over the shirt of the ...
0
votes
2answers
489 views

XNA change a specific color of a model to another

Is it possible to change a specific color of a model to another? Example: Everything that's blue should be red or something like that. And is it possible to do this without the use of effects? I ...
3
votes
1answer
221 views

Rendering a black and white image in OpenGL 1.1

Is there is any way that I can simple disable the color in OpenGL 1.1? Or can I "grey out" textures in LWJGL?
2
votes
1answer
135 views

Get average tile color

In my 2D game I have TileSet class that loads the texture and creates Rectangle[] array which stores each tile coordinates. Pretty basic stuff. Now I'd like to also calculate and store the average ...
0
votes
2answers
262 views

Changing colour while keeping gradient

I'm making a Flash game with ActionScript 3 and I have a square with a gradient applied to it. I am trying to programmatically changing the colour of the square depending on time, for example, some ...