How do I reset "set color"?

  • I've used the sprites "set color" action in order to change the colour of a sprite, but i want to be able to change it back. There doesn't seem to be a way to disable it again once used.

    The sprite isn't all one colour, like all white, its coloured like normal and "set color" is used as a way to tint it.

    Any way to do this?

    Ashley

    Tagged:

  • The default color is white. This is 100% on all color channels. The tint is done by multiplying the color with the image, so 100% on all color channels means the color is unmodified.

  • Ashley Does it work the same way as "Set color" effect? Which is better? I tested on 500+ objects and didn't notice any difference in performance. (on PC at least)

  • So i should set it to rgbEx(100,100,100)?

    I think the c3 manual needs updating as i can find no mention of "set color" in there. This info would be helpful.

    Thanks.

  • Ashley Does it work the same way as "Set color" effect?

    No, because 'Set color' overwrites the color, whereas tinting multiplies the color.

  • Ashley, Thanks. So this is not a shader, it actually overwrites pixel information for this image in video memory?

  • No, the built-in color property uses a built-in shader that does a multiply on the colors being rendered. Actually now you mention it the names are confusing - the 'Set color' action modifies the built-in 'color' property, which does a multiply, which is essentially the 'Tint' effect. However the 'Set color' shader effect replaces the RGB color channels when rendering.

    No shaders actually affect the texture held in memory - they just apply processing when it's rendered. As a result you can use different effect parameters, and different built-in color properties, on individual instances.

  • Ashley, thanks for the explanation!

    Since "Set color" action is essentially the "Tint" effect, why did you add it as an action? Was it for convenience and ease of use?

    Also, when using both this action and some other color-changing effect, in which order are they applied?

  • Construct Classic had it and lots of people liked it. Also the built-in opacity setting is actually a multiply based on a single alpha value. If you extend the alpha value to a vector4 to cover RGBA then it's still one multiply and you get a tint effect too, so you kind of get it for free. This way it's also faster than using a tint effect.

    Added effects always render after everything else - they operate on how the object looks without any effects, which includes things like opacity and the built-in color.

  • "If you extend the alpha value to a vector4 to cover RGBA then it's still one multiply"

    If you use Set Color with RGBA, Alpha does not apply. Did you mean it should apply ?

  • The 'Set color' action modifies the RGB components. The 'Set opacity' action modifies the A component.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • mOOnpunk

    So i should set it to rgbEx(100,100,100)?

    I think the c3 manual needs updating as i can find no mention of "set color" in there. This info would be helpful.

    so YES --the answer for anyone searching high and low to find this information-- it resets back to the original sprite color when you do: Set Color rgbEx(100,100,100)

    This really is the annoying thing about these new forums... No one at Scirra is on Doc duty.. so you have to dig through the forums to get this info... it was okay in the past because the search function worked decently.. now its terrible. (it took me at least 15-20 mins to find this basic info about Set Color)

    For example go into the current C3 Doc and type "Set Color", you will literally find nothing, I can't find it anywhere in the current doc, let alone all this info about tinting. It's very frustrating.

  • For example go into the current C3 Doc and type "Set Color", you will literally find nothing

    This is odd, I found it straight away:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/common-features/common-actions

    I prefer using google when searching for something here, for example:

    "set color" site:construct.net inurl:manuals

  • Yes, as pointed out, it is documented. If you do happen to find any notable omission/errata in the documentation you can file issues to the tracker, as the front page of the manual says.

  • dop2000 Ashley

    if you go to construct.net/en/make-games/manuals/construct-3 and type "set color". Nothing comes up. Then you assume its in System Actions because that is the first result. Then you do a CTRL-F and search for "set color" and again nothing. So I honestly looked for a good amount of time. I'm happy to learn the Set Color info is in the doc, but unhappy to know its not easily accessible. In fact, without that link, I don't exactly know how to get there.

    I prefer using google when searching for something here, for example:

    "set color" site:construct.net inurl:manuals

    I've been told many times to do my searches using Google that way; with that 'site' and 'inurl'. It's not going to happen, I've never used google that way and its extremely cumbersome for me. Not only do I always forget the syntax, but I've left that command-line style typing back in the 90s. Seems like that syntax could easily be added to the Construct search form no? Is there a reason the Construct Manual Search function is so terrible? Is it a lot of work to make 'search' perform as expected? It almost seems as if it's not indexed or something. Search doesn't seem to be going through all the branches.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)