So basically no more oranges turning into bright reds. The reason is that this allows the hue to stay the same even if the return value isn't perfect (which it isn't because I don't know the exact values of rockstars curve). It then corrects the 'value' of that color. It also now treats the color as a HSV color (hue saturation value) instead of converting straight to linear RGB. The new version work different than the first method in that it now uses a stepped curve that closely follow the curve implied by the measurements described in my prev posts. Here's the updated version of the shader: I start to feel like duct-tape McGuywer who no longer grasps his own haxxori atm. I will try to make sense of what to do with this information but I'll have to sleep on it. It took a while but the operation was a success, black lines in the image is the expected color, as you can see there is a fairly wide band in the spectrum where my method and rockstar is in agreement, but they deviate a lot as we start going into very dark shades and at the extremely bright end (where nothing but nuclear neon kiddos pick their crayons, so that's not as big of a deal). It's still not the 'true' ingame color since I can't tell how much light is on that surface but it gives me a consistent return value one can use to figure out just how the 'rockstarRGB' curve is shaped. I proceed to take a screenshot of the the car from this angle, apply a 'Gaussian blur' to a square selection of the roof to even out all shading and minimize errors from sampling different colored pixels from any reflections. I then inspect the active crew color without pearl from the same angle. I take the same car with a flat roof into LSC custom center town, since it is a interior where the light is the same regardless the time of day or weather. How do you determine the resulting in-game color? TLDR: I've discovered the formula GTA likely use behind the scenes to convert the crew color to look different than from what we set it to.įat fingered a 'z' into the pastebin code so it didn't run Here's a demo image of how this all works in practice. Wont be taking any crew color requests, but please feel free to PM if you have other questions. fx shader that does the conversion using the same code as above if useful to anyone (I use the directX shader in 3ds max to utilize this).ĭetails on how to use it are described in the comments at the top of the file if you open it as a textfile: Perhaps some talented coder in the community can pick up this ball and run with it? I only program shaders and various in-engine scripting so I lack the know-how to write a simple stand-alone or web tool that does this.īut if you already know your stuff I imagine it must be super easy to take this and write us a tool that converts a sampled color into linear RGB for immediate use as a GTA hex. They're not made up by me but copied from some paper I read that detailed how to go about this. These long decimal 'magic numbers' are conversion values for fitting the sRGB 'gamma corrected color curve onto a linear one and vice versa. In a HLSL shader a RGB color is represented by a float3 value that means a value of float3(0.0,0.0,0.0) is black, float3(1.0,0.0,0.0) is red and so on. So here's what to do (and what should have been done behind the scenes over at Rockstar Socialclub in any decently ran universe) Have to input as out crew color for the shade to turn out correct in-game. If you inspect the color value of a SRGB color that has been dropped to linear it'll look very similar to the darkened shades we Needs to be dropped into a linear color space for the shader to perform the various calculations necessary for the final lighting of the pixel. Now what happens in PBR shaders is your gamma corrected SRGB color values (the ones of the pure color you actually see on your display device) (PBR stands for 'Physically Based Rendering' and have become very popular in contemporary game development) The visuals of GTA V suggest the game uses some early PBR'esque shaders that takes at least some of the now common 'PBR' concepts into account. I was doing some personal R&D developing my own PBR shaders in HLSL when I came across a similar phenomena to what we see with the crew color. Hey guys, I've recently gained some insight as to what seem to be going on with the whole 'crew color must be dark to look bright inside GTA' deal. It details a way of computing crew color from a sampled "target" RGB value: This post is meant as a open letter to anyone technically inclined within the GTAO community.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |