Cool VL Viewer forum http://sldev.free.fr/forum/ |
|
@camdrawcolor seems to stack instead of replace the previous http://sldev.free.fr/forum/viewtopic.php?f=7&t=1975 |
Page 1 of 1 |
Author: | kathrine [ 2019-10-26 13:21:10 ] | ||||||||||||||||||||||||||||||||||||
Post subject: | @camdrawcolor seems to stack instead of replace the previous | ||||||||||||||||||||||||||||||||||||
The specification says
But using the following code, the results are unexpected, when a single object sets the colour: Try putting it in an attachment, then issue in chat the following set:
=> Turquoise fog, not pink
=> Turquoise fog, not red When switching it off via @clear it resets and can be set anew. I would expect it to replace the colour, when issued from the same object.
|
Author: | Henri Beauchamp [ 2019-10-27 09:42:44 ] |
Post subject: | Re: @camdrawcolor seems to stack instead of replace the prev |
After looking at the code (both Marine's and how I backported it: see the getMixedColors() method in mkrlinterface.cpp), the way this feature works is by "adding" the new color to the current draw colors list (*): the colors are "added" together (after a conversion in H/S/L components), then averaged (kind of). While I agree it is unintuitive and may (literally) "look" strange, this is how Marine implemented it (intended or not). Also, there is no distinction between the objects applying the colors: all objects can issue a color change and all changes are "mixed" together... I suggest you raise your concern by opening an issue on Marine's RLV code repository (I suppose a @setcamdrawcolor command could be added, that would overwrite all existing colors for the object that emits it). (*) You may however remove a color, by using the '=rem' action in the RLV command. E.g., if you add Red with 'llOwnerSay("@camdrawcolor:1;0;0=add")' you can later remove it (possibly before applying a new color) with 'llOwnerSay("@camdrawcolor:1;0;0=rem")'... |
Author: | Henri Beauchamp [ 2019-10-27 10:21:47 ] | |||||||||
Post subject: | Re: @camdrawcolor seems to stack instead of replace the prev | |||||||||
And here is how to modify your script to achieve the desired results:
|
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |