Questions tagged [color]

Color is the visual perception of light by humans into named categories, commonly "red," "green," and "blue."

Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

Does mesh contain a color?

I'm developing a simple 3D engine for education purposes. I'm wondering whether a mesh contains a color of each vertex? Because I saw somewhere that mesh does not contain a color at all. If so, then ...
user avatar
  • 3
0 votes
1 answer
24 views

rendering the position of a mesh in a shader as a color, but the color does not match the actual position

...
user avatar
0 votes
1 answer
42 views

Changing part of a sprite in 2D game

Let's say I have a character and certain things (shoes, vest, hat, etc.) can be changed (visually, just the color changes). What came to my mind was creating each of them as a separate sprite and then ...
user avatar
  • 639
1 vote
1 answer
79 views

Vertex color values are not smoothly transitioning/interpolating in Godot shader

I'm trying to write a shader for terrain that will color the mesh based on slope angle, ie color the sides of mountains or other steep surfaces a different color than the ground. In my shader I am ...
user avatar
0 votes
0 answers
13 views

simple button color change

Hello i want to create a simple button that activates on a click but my code wont activate and I've tried an print plus a color change of the sprite but none of these worked, the button is a image ...
user avatar
0 votes
0 answers
29 views

How do I represent team colors without Pixel Shaders in DirectX?

So I have been programming a RTS game in DirectX, and, of course, there needs to be team colors so that the players are not confused as to which troop is theirs. I managed to give each troop a hue ...
user avatar
0 votes
0 answers
92 views

How to assign a VK_FORMAT_R8G8B8A8_UNORM color to a VK_FORMAT_B8G8R8A8_SRGB color in Vulkan?

In the renderpass,I have a input attachment of VK_FORMAT_R8G8B8A8_UNORM format,and I tried to sample color from this input attachment and assign the color to my ...
user avatar
1 vote
0 answers
44 views

CursorMode.ForceSoftware changing the colour / shade of image

When I am using CursorMode.ForceSoftware the shade of the cursor changes and appears much darker than it is supposed to be. I have tried all the available 'Formats' ...
user avatar
  • 11
0 votes
1 answer
48 views

In what circumstance might I need to output pixels in non-32-bit format?

Among practically existing devices people play games with - PC, mobile, PlayStation, XBox, Nintendo etc. - is there any possibility that a pixel on the screen is not 32-bit, and do I have to consider ...
user avatar
1 vote
0 answers
23 views

ACES tonemapping confusion

In different sources I see ACES tonemapping, but I see one of two possible sets of formulas: https://www.shadertoy.com/view/XsGfWV this one https://www.shadertoy.com/view/tdffDl or this I compared ...
user avatar
2 votes
1 answer
207 views

How can I build an accurate 15-bit Highcolor RGB palette

I want to recreate an accurate version of a 15-bit RGB color palette (PC Highcolor, SNES, Playstation 1), storing each color from the palette as a standard 6 digit hex code. With each color component ...
user avatar
  • 151
0 votes
0 answers
92 views

How can I recreate a material from blender in Unreal engine

I'm new to unreal and I am having trouble finding a way to reproduce the materials for a mesh in blender in unreal. It's a simple material but I can't find a way to reproduce the color ramp ...
user avatar
2 votes
1 answer
98 views

Is it a good idea to give NPCs unnatural hair colors while keeping that of the PC a natural color?

I don't know if it's the right place to ask or not but: I would like to color most NPCs’ hair colors orange, green, etc. Do you think this will damage the main characters and secondary characters? (I ...
user avatar
  • 639
0 votes
1 answer
522 views

Starting a Coroutine after another Coroutine ends

I have a method that fades the screen to black, then fades away back again using coroutines but I couldn't get the 2nd part to work. FadeToBlack() works if I put <...
user avatar
0 votes
0 answers
27 views

Substance Painter: Fix color addition

Substance Painter appears to add colors together wrongly when selecting "Normal Blending Mode" The right side is what photoshop does correctly, meaning R+G+B values in the border region ...
user avatar
  • 619
1 vote
2 answers
418 views

How do I make a rainbow hue shift over time on text?

What I'm trying to do is make a Text object have an animation that allows for the hue of the color to go all the way up and loop back around, so it creates a cool rainbow thing. I've looked on google ...
user avatar
  • 13
0 votes
2 answers
450 views

SpriteRenderer color not responding to script!

I have written a simple c# class that is supposed to change the color of the Player Renderer. But, there seems to be a problem! whenever I call the function OnCallFun() ... the color stays put and ...
user avatar
0 votes
1 answer
49 views

How to interpolate colors around the spectrum of hues?

I wanted to generate a 7 segment display whose color brightness varies with time, this can be done by just using linear relationship. ...
user avatar
  • 253
0 votes
0 answers
48 views

How do I fix this unintentional chromatic aberration on a lightmap?

Some strange rainbow halos (front and left) appear after computation of a lightmap for direct light. The formula is dot * dot2 / ( dist * dist ) * dl->intensity ...
user avatar
0 votes
1 answer
99 views

Unity - plain material colour darker than expected

I want to add to scene object without textures, only plain material, here is my import flow: I create object in Sketch and export to SVG: Then I import SVG to blender (Material do not use nodes, has ...
user avatar
1 vote
0 answers
811 views

How to randomly change the color of a Shader Graph Material for only a specified GameObject, with C# script?

I'm working on a game, in Unity3D, where the player picks up trash from Trash cans, and dumps the trash from the Trash cans into a Trash Truck. The world of the game itself is randomly generated, with ...
user avatar
0 votes
0 answers
31 views

How to create opacity mask from colored bitmap?

For the image (bitmap) below, if I do: Create a spite with the image in unreal engine. Create a opacity mask on the spite. Use this image, choose a specific color, such as blue, make its ...
user avatar
0 votes
1 answer
140 views

Problem when importing color in hexadecimal format from an ini file

In my game I can import a color correctly when it is in the "engine format". Example ("color.ini"): ...
user avatar
0 votes
1 answer
219 views

Smoothly switch between 2 pairs of oscillating colors

I have a simple script that changes the emission color based on a bool. The first color is its idle color, which transitions between orange and light purple using a lerp weighted with a sine wave. ...
user avatar
  • 1
2 votes
1 answer
332 views

Is it a bad idea to store all textures in linear color-space?

I am wondering about the performance behind color-space conversions for textures during reading. If a project decides to go with a linear workflow, as in, when doing any sort of color manipulation, ...
user avatar
0 votes
1 answer
1k views

How to use a .cube LUT file with Color Lookup?

I have used "Image 2 LUT" to create a LUT for Unity from a certain movie. However, currently "Image 2 LUT" only outputs ".cube" files. For HDRP, this is great, but for ...
user avatar
  • 821
0 votes
1 answer
112 views

How to create a LUT from original and processed images (not perfectly the same)?

I would like to create a certain LUT for my game in Unity. The usual way would be to take a screenshot in your game, process this screenshot in an image editor like Photoshop / GIMP and then calculate ...
user avatar
  • 821
0 votes
1 answer
4k views

How to create a color grading LUT for Unity URP?

I'm watching a movie, and I would like to achieve the same colors in my game. I think I have to use a Color Grading lookup table to achieve this in Unity with URP. The best example I found example ...
user avatar
  • 821
1 vote
1 answer
65 views

How to set the color of a game object as of the other?

I am 15 year old Indian student and I am creating my first 2D game in Unity. I have set the color of my player as Random and I have to set the color of my game object as of my player. But the color of ...
user avatar
0 votes
2 answers
145 views

The colors of Unity 2019 are different

I currently use Unity 2018 LTS, because of my 2019 Unity colours are not really good. For example, the white is not really white but more like grey and the Shadows are really strong too even if I ...
user avatar
  • 103
0 votes
0 answers
39 views

Changing alpha of single pixel value?

I'm trying to change the alpha values of a grayscale texture based on some conditions. Essentially if the color value is within some min and max threshold, set the alpha to 0.8, and if it is not ...
user avatar
0 votes
1 answer
150 views

Set background color in Phaser

I want to set a background color for my game. I found this solution: function create() { this.cameras.main.setBackgroundColor("#d5d5d5"); } but I want to be ...
user avatar
1 vote
0 answers
228 views

HDR mode in windows makes build version of Unity game look washed out

I've got a 2D Unity game I've been working on. The development computer is hooked up to a TV that supports HDR. If I turn on the "Play HDR Games and Apps" switch in windows then run the build version ...
user avatar
-1 votes
2 answers
275 views

Loading the map from an image file in C++

For my platformer tile-based game I want to be able to load the game map from an image file. Consider the following 25x15 px .png (enlarged) representing some level: Assume that each specified ...
user avatar
  • 540
7 votes
4 answers
2k views

What colour space or mixing algorithm should I use for "watercolor-like" colour mixing in-game?

I want to make a game where the player creates potions out of coloured ingredients, and I think the RGB or HSV colour spaces would be confusing for players expecting (red + yellow = orange, red + blue ...
user avatar
2 votes
1 answer
403 views

Color palettes in video games

I’ve spent the days reading all sources I can find on the use of Color palettes in games, but there is a real lack of real world examples. Most Color palette tools generate 4-5 colours. I am making a ...
user avatar
  • 340
1 vote
2 answers
207 views

Does GPU mipmapping assume the texture es gamma corrected?

I have been reading the Real Time Rendering book and stumbled upon this paragraph: For textures encoded in a nonlinear space (such as most color textures), ignoring gamma correction when ...
user avatar
  • 401
3 votes
2 answers
2k views

Why is enabling GL_FRAMEBUFFER_SRGB making the colours brighter?

My understanding of gamma correction is as follows: We want to do colour math in linear space so we can lerp etc. between colour values and get the results we expect. But human eyes don't have a ...
user avatar
  • 694
-1 votes
1 answer
719 views

change color to rgb in c# unity

So I am trying to change my color of my sprite to a rgb color. Now I can just change it to a color like red, black or blue... m_spriteRenderer.color = Color.blue; ...
user avatar
0 votes
1 answer
215 views

Can I linear interpolate color along both the X and Y axis of a circle instead of using the distance formula on each individual point?

I've been unable to make it work and I'm not sure whether it's a problem with my code or if this can even be done. I'm sure there is a way to prove whether it is possible mathematically but I don't ...
user avatar
  • 145
0 votes
0 answers
711 views

GetPixel() doesn't return properly the values

So I'm trying to use GetPixel() function to get which colors is the texture as a value of x and y. So far it works well but it only return 1 color, being unable to get the rest of the colors of the ...
user avatar
0 votes
0 answers
33 views

How to do Colored Lights in CIE XYZ/LUV-like Space?

I've a 2d background, some sprites, blitted onto it. And over all that in the final pass I draw colored lights, to make projectiles look cooler. Basically I apply a classic lightmap, which is colored ...
user avatar
2 votes
1 answer
77 views

Triangular Metric

Given a point inside a unit equilateral triangle, how does one rotate it across the triangle perimeter? I.e. the triangle outline serving the same purpose as circle's circumference. That is actually a ...
user avatar
0 votes
1 answer
286 views

Color of Image changes to white between 2 positions using Color.Lerp - Unity

Hi I have an empty object barHolder that I move between 10 and 98 on x-axis. It has 2 child ...
user avatar
1 vote
1 answer
1k views

Unity Vertex Color Shader with Transparency

I'm trying to achieve a simple effect: I have a cube mesh and I want some of the vertices to change color. In this case, I want it to form some sort of a gradient where the unchanged vertices are set ...
user avatar
0 votes
1 answer
43 views

Easy way to generate colour-per-vertex models for input to Blender

I procedurally generate 3D planet models that I would like to import into Blender. I use colour per vertex rendering in my shaders (In practice, I use the same colour for all vertices of a face, but ...
user avatar
  • 3,679
0 votes
2 answers
2k views

Problem with Material Parameter Collection Reference Variable in Set Scalar Parameter funcion

I was following a tutorial on using GameInstance. Where the guy in the video would teach how to choose the color of the ship by clicking a button on a level (x), so as to affect the ship on another ...
user avatar
2 votes
1 answer
2k views

Programmatically generated mesh vertex colors not showing up in Unity?

I'm sorry if this is an obvious thing to solve but I just can't figure it out...did I miss something...I've generated a mesh and during vertices generation I've also set its colors (and colors32 just ...
user avatar
  • 33
4 votes
1 answer
3k views

What makes a shader function with a LineRenderer?

A LineRenderer has both Material and Color properties. But many shaders do not work, ie the line will not respect the Color property, or the line will show black (regardless of the materials having ...
user avatar
  • 309
2 votes
1 answer
273 views

How can I create color fonts to be used in Unity?

I've been searching, downloaded a couple programs that lets you convert images into fonts, but none let you obtain the color. They all switch them to black and white. While searching the internet, I ...
user avatar
  • 21