Page 1 of 2 12 LastLast
Results 1 to 25 of 26

Thread: The master CTS tutorial!

  1. #1
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default The master CTS tutorial!

    The master tutorial on CTS 0 1 2 and 3

    Making your life more colorfull!

    Did you always wanted to know the differences between the color tolerance speed methods provided by simba? Then this is your change! These functions will make you be able to write better, faster and more reliable functions to navigate your bot through the world of runescape. Need some extra motivation to read this tutorial? Just check these amazing testimonials and let them convince you to check it out.

    Quote Originally Posted by Martin Luther King
    I never understood how people thought that white and black people where different. But thanks to this tutorial I now understand that you need quite some tolerance to see them as equals.
    Quote Originally Posted by Picasso
    Before I read this tutorial my paintings where boring and mostly black and white. But thanks to Bart de Boer I now know how to make interesting combinations with colors.
    Quote Originally Posted by Saruman of Many Colours
    When I changed from a white wizard to a more colorful one I always thought people would still be able to relate me with certain colors, now I see that even with the slightest tolerance people can confuse me with both a tree and a tomato.


    Table of contents
    • A short introduction
    • How do the CTS methods work?
      1. CTS no
      2. CTS_0
      3. CTS_1
      4. CTS_2
      5. CTS_3
    • How does the code behind the methods work?
      1. CTS no
      2. CTS_0
      3. CTS_1
      4. CTS_2
      5. CTS_3
    • Finally




    A short introduction

    I created this tutorial to expend my knowledge on the color tolerance speed methods and to pass my knowledge onto others. If you got questions or suggestion you can post them in thread. I will not respond on personal messages, cause for every single person asking there are a lot with the same question. So I hope you have good read.

    In this tutorial I will explain the color tolerance speed(CTS) methods. You might ask yourself what are these methods and why would it be interesting to know how they work. CTS is the method that simba uses to compare two colors with each other. These functions return either true if the colors are equal or within the tolerance or it will return false if the tolerance is too low and the differences between the colors are too high.

    The default CTS used in simba is CTS_1, this is a simple CTS method that is slower then CTS_No and CTS_0 but faster as CTS_2 and CTS_3. The best CTS method to use depends on the situation. Sometimes CTS_0 will give more accurate results as CTS_1 and vice versa. By understanding the pros and cons of each CTS method you will be able to write better and more efficient bots. Note that this knowledge also applies to other color searching goals including "real life" object recognition.



    What do the CTS methods do?

    In this section of this tutorial I will explain what every method does and what the differences are between them. I recommend you to read this if you want to expand your knowledge on this area. If you still got questions about how the CTS methods work please post your questions in this thread so I can expand that explanation.


    CTS_No

    The first one is CTS method I will discuss is a short one. This method is the most basic way to check if to colors are equal. It basically checks if the red, green and blue are equal, this method leaves no room for tolerance. It isn't possible to use this method color find functions that use tolerance. But luckily there are a non-tolerance alternatives like FindColor and CountColor to replace them.

    Note that although this is a color tolerance speed method it doesn't support tolerance.






    You might think this is enough to find objects in runescape and write a color based bot. But sadly it isn't. Jagex implemented a system in runescape which add a bit of difference to each color every time the object is loaded. This makes it a lot harder and this is also the reason why this color tolerance speed method isn't used a lot. I believe items in the inventory have a black outline color that is 'static', so that one doesn't at all, in almost all other cases it's better to use a color tolerance speed modifier that supports a tolerance modifier.



    CTS_0

    This is the fastest way in simba to compare colors while still using tolerance. But it's big con is the way it uses the tolerance parameter. So it's not that accurate in most cases. Instead of just checking if the R, G and B values of color 1 and color 2 are the same, this one calculates the differences between them and then it checks if those differences between them is within the tolerance field. To explain this I stole the following image from wikipedia:


    Copyright: wikipedia.com

    This cube shows how RGB works, black is the corner in the back you can't see and white is in the corner removed from this cube. I assume you understand the principle of RGB(Red, Green and Blue). With CTS_0 you pick your first color out of this cube, draw a smaller cube around it (with a width, height and length of twice your tolerance), and checks if the second color is within that smaller cube you created around your first color. If it is in that smaller cube, than it will find the colors similar. The cons of this method that the distance between the corners and the middle of the cube are bigger than at other points of the cube.

    Example:
    Color 1 = R200 G200 B200
    Color 2 = R180 G200 B200
    Color 3 = R185 G185 B185
    Tolerance is 15

    Color 1 and Color 2 aren't similar. Red 200 - Red 180 > Tol 15

    Color 1 and Color 3 are similar. Red 200 - Red 185 <= Tol 15, Blue 200 - Blue 185 <= Tol 15 and Green 200 - Green 185 <= Tol 15.

    This method is fast, really fast. You can easily compare the complete screen with a not noticeable delay. Once you get a bit used to thinking in the red, green and blue color values you will notice that this one does it job quite well. This is useful in any application where speed is more important than the quality of the search. As you see in the example above, a difference in only one color can easily get a point to be excluded from your search. Cause of that reason this is not the default way to navigate through the world of runescape.







    CTS_1

    This is the default method that simba uses to find colors with tolerance. It's not so fast as CTS_0, but will give in return better results in most cases. Beginners don't need to use other CTS methods. If you look back at the previous image, you again pick color 1 in it, then you draw a sphere around that point with a radius of the tolerance. If the second color is within the sphere then this method will return positive. One of the pros of this method is that a sphere doesn't got corners like a cube, so this one will give more accurate results in most cases.

    Example:
    Color 1 = R200 G200 B200
    Color 2 = R180 G200 B200
    Color 3 = R185 G185 B185
    Tolerance is 20 and 20 * 20 = 400

    Color 1 and Color 2 are similar. 20 * 20 + 0 * 0 + 0 * 0 = 400 and 400 <= 400

    Color 1 and Color 3 aren't similar. 15 * 15 + 15 * 15 + 15 * 15 = 675 > 400

    This one is fast and reliable. Not as fast as CTS 0 but that barely noticeable. There are few applications where you will notice the speed difference. You will probably never will unless you got a lot of colors you want to compare. But in return of that small speed loss it gives you a way to compare colors with your tolerance which lies closer to the way a human eye would compare them. It searches for a difference through out all the color parameters, making this a better method to use than CTS 0 (few exceptions). If you're satisfied with the color finding with the default method then it's a safe place to stay.






    CTS_2

    The big difference between the CTS 2 method and the ones before, is that this method doesn't use the RGB color model. Instead the HSL color model is just. This might be a bit hard to understand at the beginning, so I once again stole a picture for you guys:


    image courtesy J Kyrnin

    As you can see, the 3D representation of this color model is a cylinder. The sat parameter is how much the color leans towards a certain color. For example; a very red color got a high saturation and a light pink one got a low saturation. The hue parameter is which color it leans to, note that it's percentage of a angle so the range is [-infinity ,infinity]. Lightness is last parameter, basically how dark or light the color is.

    Many programs like photoshop got RGB to HSL converters, if you don't have any, don't worry, just follow this link. I suggest that if you are new to this concept of H S L, play with that converter to get used to it. Note that on that converter L and S are both percentages, so between the 1 and the 0, but H is an angle, between the 0 and the 359.

    If you keep the saturation on 100% and the lightness on 50% you will notice that will only get primary colors. Like basic red, green, yellow, purple and green. Note that the hue will only change that aspect of the color. The color will stay have the same shade lightness cause L will remain at 50%. If you lower the saturation the color will slowly become grayer and grayer. When the saturation reaches 0% the color will be between white and black, changing the hue will have no effect on the color.

    CTS 2 requires two additional modifiers, hue and sat. These modifiers are multiplied with your tolerance to get the range for hue and sat. So in practical use this will mean that you can specify the importance of the hue and saturation in your color comparison. If you put satMod on 0, than it will only look for hue differences.

    For example:
    Color 1
    H = 0.5
    S = 0.8
    L = 0.7

    Color 2
    H = 0.45
    S = 0.3
    L = 0.65

    Tolerances
    tol = 30
    hue mod = 0.20
    sat mod = 0.90

    hue mod = 0.20 * 0.30 -> 0.06
    sat mod = 0.90 * 0.30 -> 0.27

    Hue difference = 0.5 - 0.45 -> 0.05
    Sat difference = 0.90 - 0.65 -> 0.25
    l difference = 0.7 - 0.65 -> 0.05

    Hue = 0.05 < 0.06
    Sat = 0.25 < 0.27
    l = 0.05 < 0.30

    These 2 colors are similar!







    CTS_3

    Explained in a post for now. Will add it when I'm done with it. This link.



    How does the CTS code work?

    In this section of the tutorial I will talk about the code that simba uses to compare the code. I recommend this section if you want to go deeper as the basics. It's not necessary to read if you want to build a reliable bot. This is where I got all of my information from.



    CTS_No

    The source is:
    Simba Code:
    function ColorSame_ctsNo(ctsInfo: Pointer; C2: PRGB32): boolean;
    var
        C1: TCTSNoInfo;
    begin
      C1 := PCTSNoInfo(ctsInfo)^;
      Result := (C1.B = C2^.B)
            and (C1.G = C2^.G)
            and (C1.R = C2^.R);
    end;

    This is the first CTS method I will explain, because of that I will als go a bit in the code that is used in all CTS methods. I hope you enjoy and learn .

    As you might notice this function requires two variables, a pointer and a color (PRGB32 is just a color). I assume that not all readers of this tutorial are aware about what a pointer is cause pascal script doesn't support pointers, so I will start with some information about pointers.

    A pointer is, as simple as it may sound, nothing more than a memory adress. Usually at that adress there is some memory space reserved or used by a certain variable. With a pointer you can access the information on that memory adress with the following code: yourPointer^ . This is used in every CTS function to get the first color and some extra parameters. The memory space is reserved by Create_CTSInfo_helper. In this case the following part of that function:

    Simba Code:
    Result :=  AllocMem(SizeOf(TCTSNoInfo));
    ColorToRGB(Color, PCTSNoInfo(Result)^.R, PCTSNoInfo(Result)^.G,
      PCTSNoInfo(Result)^.B);

    As you may notice, the color stored at the pointer is simply a RGB color.

    CTS_0

    Luckily this function isn't that hard to explain. Here you can see the source of the function.

    Simba Code:
    function ColorSame_cts0(ctsInfo: Pointer; C2: PRGB32): boolean;

    var
        C1: TCTS0Info;
    begin
      C1 := PCTS0Info(ctsInfo)^;
      Result := (Abs(C1.B - C2^.B) <= C1.Tol)
            and (Abs(C1.G - C2^.G) <= C1.Tol)
            and (Abs(C1.R - C2^.R) <= C1.Tol);
    end;

    As you might notice C1 is not just a color but also hold the tolerance. I am not sure why they went this way cause it's a bit confusing. It basically gets the differences between color 1 and color 2 there R, G and B values and it will return false if any of the three exceed the tolerance.

    Simba Code:
    Result := AllocMem(SizeOf(TCTS0Info));
    ColorToRGB(Color, PCTS0Info(Result)^.R, PCTS0Info(Result)^.G,
                        PCTS0Info(Result)^.B);
     PCTS0Info(Result)^.Tol := Tol;

    And there is the source where the tolerance is set. That is the only difference with CTS_no.

    CTS_1

    This function is the same as the previous one, except that this one adds some magic from Pythagoras.

    Simba Code:
    function ColorSame_cts1(ctsInfo: Pointer; C2: PRGB32): boolean;

    var
        C1: TCTS1Info;
        r,g,b: integer;
    begin
      C1 := PCTS1Info(ctsInfo)^;
      b := C1.B - C2^.B;
      g := C1.G - C2^.G;
      r := C1.R - C2^.R;
      Result := (b*b + g*g + r*r) <= C1.Tol;
    end;

    It's basically B dif^2 * G dif^2 * R dif^2 <= Tol^2. but the tolerance is squared in the Create_CTSInfo_helper function. Also note that a computer is 100 times faster with squares then with square roots, so if possible functions should try to avoid them.

    Simba Code:
    Result := AllocMem(SizeOf(PCTS1Info));
    ColorToRGB(Color, PCTS1Info(Result)^.R, PCTS1Info(Result)^.G,
                        PCTS1Info(Result)^.B);
     PCTS1Info(Result)^.Tol := Tol * Tol;

    And here you can see tolerance being squared.

    CTS_2

    This is were shit gets real! Well... It isn't that hard to understand, but it doesn't use the RGB model. If you're used to RGB this might take some time to understand. I do not fully understand this yet myself, so if anyone could help me with this one:

    Simba Code:
    function ColorSame_cts2(ctsInfo: Pointer; C2: PRGB32): boolean;

    var
        r,g ,b: extended;
        CMin, CMax,D : extended;
        h,s,l : extended;
        i: TCTS2Info;
    begin
      i := PCTS2Info(ctsInfo)^;

    The basic part of every CTS method. Getting the required information and init the vars.

    Simba Code:
    R := Percentage[C2^.r];
      G := Percentage[C2^.g];
      B := Percentage[C2^.b];

    Percentage is actually an array with a length of 255. So this works the same as dividing them by 255. R, G and B now contains the red, green and blue percentage between the complete absence of a certain color to the maximum amount of it.

    Simba Code:
    CMin := R;
      CMax := R;
      if G  < Cmin then CMin := G;
      if B  < Cmin then CMin := B;
      if G  > Cmax then CMax := G;
      if B  > Cmax then CMax := B;
      l := 0.5 * (Cmax + Cmin);

    Sets CMin and CMax to the highest and lowest RGB percentage respectively. Then sets l to the average between CMin and CHigh. Note that one of the colors(unless they are all the same) will be dropped when its neither the highest or the lowest and will not be used to check the sat. It will be used again to calculate the hue.

    Simba Code:
    //The L-value is already calculated, lets see if the current point meats the requirements!
      if abs(l*100 - i.L) > i.Tol then
        exit(false);
      if Cmax = Cmin then
      begin
        //S and H are both zero, lets check if it mathces the tol
        if (i.H <= (i.hueMod)) and
           (i.S <= (i.satMod)) then
          exit(true)
        else
          exit(false);
      end;

    It will check if the difference between the l var (lightness in the picture above), if its higher then the tolerance than these colors are too different and there is no need to continue the check.

    After that it will check if CMax and CMin are equal, the color is a greyscale without color. So H and S of color 2 are both zero. If the H and S of color 1 are lower or equal to the amount they may differ from color 2(hueMod and satMod) then it isn't necessary to calculate the H and S from color 2 and this method will return positive. Or else it means that color 1 got to much sat or hue, it well then exit with negative.

    Note that the hue, sat and l of color 1, mostly referred to in this code as i. Are calculated before this method. Also not that hue mod and sat mod are multiplied by your tolerance var.
    Simba Code:
    RGBToHSL(R, G, B, i.H, i.S,
                        i.L);
            i.hueMod := Tol * hueMod;
            i.satMod := Tol * satMod;

    Simba Code:
    D := Cmax - Cmin;
      if l < 0.5 then
        s := D / (Cmax + Cmin)
      else
        s := D / (2 - Cmax - Cmin);
      // We've Calculated the S, check match
      if abs(S*100 - i.S) > i.satMod then
        exit(false);

    Calculates the saturation and check if it's in the range of satMod. If not, Exit!

    Simba Code:
    if R = Cmax then
        h := (G - B) / D
      else
        if G = Cmax then
          h  := 2 + (B - R) / D
        else
          h := 4 +  (R - G) / D;
      h := h / 6;
      if h < 0 then
        h := h + 1;
      //Finally lets test H2

      h := h * 100;

      if h > i.H then
        Result := min(h - i.H, abs(h - (i.H + 100) )) <= i.hueMod
      else
        Result := min(i.H - h, abs(i.H - (h + 100) )) <= i.hueMod;
    end;
    Finally calculate the hue and returns either true or false if its in the range of the hueMod.


    Finally

    The complete source cab found here: (finder.pas)https://github.com/MerlijnWajer/Simb...ore/finder.pas

    Simba Code:
    function ColorSame_ctsNo(ctsInfo: Pointer; C2: PRGB32): boolean;
    var
        C1: TCTSNoInfo;
    begin
      C1 := PCTSNoInfo(ctsInfo)^;
      Result := (C1.B = C2^.B)
            and (C1.G = C2^.G)
            and (C1.R = C2^.R);
    end;

    function ColorSame_cts0(ctsInfo: Pointer; C2: PRGB32): boolean;

    var
        C1: TCTS0Info;
    begin
      C1 := PCTS0Info(ctsInfo)^;
      Result := (Abs(C1.B - C2^.B) <= C1.Tol)
            and (Abs(C1.G - C2^.G) <= C1.Tol)
            and (Abs(C1.R - C2^.R) <= C1.Tol);
    end;

    function ColorSame_cts1(ctsInfo: Pointer; C2: PRGB32): boolean;

    var
        C1: TCTS1Info;
        r,g,b: integer;
    begin
      C1 := PCTS1Info(ctsInfo)^;
      b := C1.B - C2^.B;
      g := C1.G - C2^.G;
      r := C1.R - C2^.R;
      Result := (b*b + g*g + r*r) <= C1.Tol;
    end;

    function ColorSame_cts2(ctsInfo: Pointer; C2: PRGB32): boolean;

    var
        r,g ,b: extended;
        CMin, CMax,D : extended;
        h,s,l : extended;
        i: TCTS2Info;
    begin
      i := PCTS2Info(ctsInfo)^;

      R := Percentage[C2^.r];
      G := Percentage[C2^.g];
      B := Percentage[C2^.b];

      CMin := R;
      CMax := R;
      if G  < Cmin then CMin := G;
      if B  < Cmin then CMin := B;
      if G  > Cmax then CMax := G;
      if B  > Cmax then CMax := B;
      l := 0.5 * (Cmax + Cmin);
      //The L-value is already calculated, lets see if the current point meats the requirements!
      if abs(l*100 - i.L) > i.Tol then
        exit(false);
      if Cmax = Cmin then
      begin
        //S and H are both zero, lets check if it mathces the tol
        if (i.H <= (i.hueMod)) and
           (i.S <= (i.satMod)) then
          exit(true)
        else
          exit(false);
      end;
      D := Cmax - Cmin;
      if l < 0.5 then
        s := D / (Cmax + Cmin)
      else
        s := D / (2 - Cmax - Cmin);
      // We've Calculated the S, check match
      if abs(S*100 - i.S) > i.satMod then
        exit(false);
      if R = Cmax then
        h := (G - B) / D
      else
        if G = Cmax then
          h  := 2 + (B - R) / D
        else
          h := 4 +  (R - G) / D;
      h := h / 6;
      if h < 0 then
        h := h + 1;
      //Finally lets test H2

      h := h * 100;

      if h > i.H then
        Result := min(h - i.H, abs(h - (i.H + 100) )) <= i.hueMod
      else
        Result := min(i.H - h, abs(i.H - (h + 100) )) <= i.hueMod;
    end;

    function ColorSame_cts3(ctsInfo: Pointer; C2: PRGB32): boolean;

    var
        i: TCTS3Info;
        r, g, b : extended;
        x, y, z, L, A, bb: Extended;
    begin
      i := PCTS3Info(ctsInfo)^;
      { RGBToXYZ(C2^.R, C2^.G, C2^.B, X, Y, Z); }
      { XYZToCIELab(X, Y, Z, L, A, B); }
      R := Percentage[C2^.r];
      G := Percentage[C2^.g];
      B := Percentage[C2^.b];
      if r > 0.04045  then
        r := Power( ( r + 0.055 ) / 1.055  , 2.4) * 100
      else
        r := r * 7.73993808;
      if g > 0.04045  then
        g := Power( ( g + 0.055 ) / 1.055 , 2.4) * 100
      else
        g := g * 7.73993808;
      if  b > 0.04045 then
        b := Power(  ( b + 0.055 ) / 1.055  , 2.4) * 100
      else
        b := b * 7.73993808;

      y := (r * 0.2126 + g * 0.7152 + b * 0.0722)/100.000;
      if ( Y > 0.008856 ) then
        Y := Power(Y, 1.0/3.0)
      else
        Y := ( 7.787 * Y ) + ( 16.0 / 116.0 );

      x := (r * 0.4124 + g * 0.3576 + b * 0.1805)/95.047;
      if ( X > 0.008856 ) then
        X := Power(X, 1.0/3.0)
      else
        X := ( 7.787 * X ) + ( 16.0 / 116.0 );

      z := (r * 0.0193 + g * 0.1192 + b * 0.9505)/108.883;
      if ( Z > 0.008856 ) then
        Z := Power(Z, 1.0/3.0)
      else
        Z := ( 7.787 * Z ) + ( 16.0 / 116.0 );

      l := (116.0 * Y ) - 16.0;
      a := 500.0 * ( X - Y );
      bb := 200.0 * ( Y - Z );

      L := L - i.L;
      A := A - i.A;
      Bb := Bb - i.B;

      Result := (L*L + A*A + bB*Bb) <= i.Tol;
    end;

    and:

    Simba Code:
    function Create_CTSInfo_helper(cts: integer; Color, Tol: Integer;
                            hueMod, satMod, CTS3Modifier: extended): Pointer; overload;
    var
        R, G, B: Integer;
        X, Y, Z: Extended;
    begin
      case cts of
          -1:
          begin
            Result :=  AllocMem(SizeOf(TCTSNoInfo));
            ColorToRGB(Color, PCTSNoInfo(Result)^.R, PCTSNoInfo(Result)^.G,
                        PCTSNoInfo(Result)^.B);
          end;
          0:
          begin
            Result := AllocMem(SizeOf(TCTS0Info));
            ColorToRGB(Color, PCTS0Info(Result)^.R, PCTS0Info(Result)^.G,
                        PCTS0Info(Result)^.B);
            PCTS0Info(Result)^.Tol := Tol;
          end;
          1:
          begin
            Result := AllocMem(SizeOf(TCTS1Info));
            ColorToRGB(Color, PCTS1Info(Result)^.R, PCTS1Info(Result)^.G,
                        PCTS1Info(Result)^.B);

            PCTS1Info(Result)^.Tol := Tol * Tol;
          end;
          2:
          begin
            Result := AllocMem(SizeOf(TCTS2Info));
            ColorToRGB(Color, R, G, B);
            RGBToHSL(R, G, B, PCTS2Info(Result)^.H, PCTS2Info(Result)^.S,
                        PCTS2Info(Result)^.L);
            PCTS2Info(Result)^.hueMod := Tol * hueMod;
            PCTS2Info(Result)^.satMod := Tol * satMod;
            PCTS2Info(Result)^.Tol := Tol;
          end;
          3:
          begin
            Result := AllocMem(SizeOf(TCTS3Info));
            ColorToRGB(Color, R, G, B);
            RGBToXYZ(R, G, B, X, Y, Z);
            XYZToCIELab(X, Y, Z, PCTS3Info(Result)^.L, PCTS3Info(Result)^.A,
                      PCTS3Info(Result)^.B);
            { XXX: TODO: Make all Tolerance extended }
            PCTS3Info(Result)^.Tol := Ceil(Sqr(Tol*CTS3Modifier));
          end;
      end;
    end;
    Last edited by masterBB; 03-19-2012 at 07:21 PM. Reason: small update / 25-2
    Working on: Tithe Farmer

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    This is pretty good.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow....SO good THANK YOU!
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Thanks, but it is still a work in progress. Learning from the source
    Working on: Tithe Farmer

  5. #5
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is awesome thank you for posting. I had a couple questions, how many significant figures should you use for hue and saturation? And when rounding do you usually only round up or do you round to closest number?

  6. #6
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by lilcmp1 View Post
    This is awesome thank you for posting. I had a couple questions, how many significant figures should you use for hue and saturation? And when rounding do you usually only round up or do you round to closest number?
    You don't have to round them. But they will get less significant, there is no reason to have more then 2 floating points.
    Working on: Tithe Farmer

  7. #7
    Join Date
    Feb 2007
    Location
    Switzerland
    Posts
    583
    Mentioned
    1 Post(s)
    Quoted
    50 Post(s)

    Default

    I've just read it, very nice! Now I understood the HSL model I always wondered about 'hue' and 'sat'.
    I really want to see CTS_3 and how to use it so keep it up

  8. #8
    Join Date
    Aug 2006
    Location
    USA
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you for expanding my knowledge on colors

  9. #9
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Hey, just letting you know i'm still waiting for you to add cts3! (:

  10. #10
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Doesn't CTS3 only have one variable that changes? Lighting, or something like that.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  11. #11
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    Doesn't CTS3 only have one variable that changes? Lighting, or something like that.
    Wait, I'm writing it at this moment! Will explain everything, 15-20 minutes please.
    Working on: Tithe Farmer

  12. #12
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by footballjds View Post
    Hey, just letting you know i'm still waiting for you to add cts3! (:
    I really want to at it, but it's a bit hard for me to explain. Made some drafts how to explain it but they didn't really work out. They other methods were much easier. This one isn't a simple calculation from the r g b color spectrum. I will try to type a short fast typed, grammar error rich explanation, maybe I will improve it and post is later in the tutorial.

    Let's start with the X Y Z color model. I included an image of it below:



    As you see this one looks similar to the RGB color model. But there is one big difference. As the R G B color model isn't created with the human eye as basis, a difference of 10% red to 11% red may seem bigger as 50% red to 51% red. This difference is created by the human perception of colors and the sensitivity off the human eyes. So the XYZ color model uses vallues that will make a change of 1% change in 'red' be equally noticed by the viewer.

    Some human eye sensitivity graph:


    More info about this color space.

    When simba calculated the XYZ values it isn't done yet. It will use the Cie Lab values to calculate the difference. This looks similar to the HSL color model but instead of being a cylinder it is a sphere. Also note how the a and b values are placed. I included a image of it below:



    Both the a and b values have a range from negative to positive. This will replace the hue and sat vars from the hsl model. Just imagine taking a slice out the sphere. Imagine the middle of the circle the (0,0) point and take a as the x-axis and b as the y-axis. Both axis have a range from -1 to 1 in the middle, and the close to the top the smaller there range becomes. At the top and bottom the a and b value will have no effect as the color is either black or white. The difference is calculated by squaring each value and add them together.

    Some of you might notice that there is a cts 3 modifier. There is no special magic involved in this variable. It's just multiplied with the tolerance of the function you used. Here is the code:
    Pascal Code:
    Ceil(Sqr(Tol*CTS3Modifier));

    I hope this helps. I would like to hear what you think about this.
    Working on: Tithe Farmer

  13. #13
    Join Date
    Nov 2011
    Location
    New Zealand
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Was having trouble understanding but this guide made it SO much clearer. I'll stick to CTS1 until I get the basics under my belt.

    Thanks for writing this

  14. #14
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    masterBB, i read it all, i know i was reading english, but coming away from it i still don't feel like i learned cts3 :P

    I'll try reading it again later.

  15. #15
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by NZ John View Post
    Was having trouble understanding but this guide made it SO much clearer. I'll stick to CTS1 until I get the basics under my belt.

    Thanks for writing this
    Thanks for you comment. I enjoy learning other people anything. Feel free to ask anything.

    Quote Originally Posted by footballjds View Post
    masterBB, i read it all, i know i was reading english, but coming away from it i still don't feel like i learned cts3 :P

    I'll try reading it again later.
    I'm aware it is still not good. What point didn't you understand, how far did you came into it? Maybe I need to add more images.
    Working on: Tithe Farmer

  16. #16
    Join Date
    Feb 2007
    Location
    Switzerland
    Posts
    583
    Mentioned
    1 Post(s)
    Quoted
    50 Post(s)

    Default

    Quote Originally Posted by footballjds View Post
    masterBB, i read it all, i know i was reading english, but coming away from it i still don't feel like i learned cts3 :P

    I'll try reading it again later.
    Yeah same here. I was very excited to learn cts3, but I don't really know that much about the use of it.
    So, if I understood it correctly, there isn't a difference to cts2 for the use? I mean you can't select colors with a higher accuracy, can you?

    Correct me if I am wrong.

  17. #17
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Hey I tried programming this in both Simba and other languages.. I can't get it to work :S I got CTS1 using Pythagorean theorem but I can't get CTS2 :S None of them print the same result as Simba.. All color conversions match with Simba's though.. Just the result of the Similar cts2 matching for all of them differ from Simba's.. Dunno what I did wrong.

    Simba Code:
    {$I SRL/SRL.Simba}

    type
      HSL = record
      H, S, L: Extended;
    end;

    Function SimbaCTS2(Color1, Color2, Tolerance: Integer): Boolean;
    var
      HSLCol1, HSLCol2: HSL;
      HDiff, SDiff, LDiff, HMod, SMod: Extended;
    begin
      ColorToHSL(Color1, HSLCol1.H, HSLCol1.S, HSLCol1.L);      //Convert Colors to HSL.
      ColorToHSL(Color2, HSLCol2.H, HSLCol2.S, HSLCol2.L);

      HMod:= 0.2 * Tolerance; SMod:= 0.2 * Tolerance;     //0.2 is the default modifier.. Just for testing.

      HDiff:= HSLCol1.H - HSLCol2.H;
      SDiff:= HSLCol1.S - HSLCol2.S;

      Result:= (HDiff < HMod) and (SDiff < SMod) and (LDiff < (Tolerance div 100));    //Not sure what to put for LDiff < ......?
    end;


    //Test it now..
    begin
      SetupSRL;
      ClearDebug;
      SetColorToleranceSpeed(2);
      writeln(SimilarColors(11706857, 10791401, 26));        //Prints True..
      writeln(SimbaCTS2(11706857, 10791401, 26));          //Prints False..
    end.

    C:
    Code:
            bool CTS2(RGB FirstCol, RGB SecondCol, int Tol)
            {
                HSL FCol = Hsl(FirstCol), SCol = Hsl(SecondCol);     //Convert Both colors to HSL.
                double HMod = (HueMod * Tol), SMod = (SatMod * Tol);    //Mods = XMod * Tolerance.
    
                double HDiff = (FCol.Hue - SCol.Hue), SDiff = (FCol.Sat - SCol.Sat), LDiff = (FCol.Lum - SCol.Lum); //HueDiff, SatDiff, LumDiff.
    
                return fabs(HDiff) <= HMod && fabs(SDiff) <= SMod && fabs(LDiff) <= (Tol/100.0);    //Diff's < Mods.
            }

    C++ Full On Simba Copy:
    Code:
    typedef struct TCTS2Info
    {
          double H, S, L;
          double hueMod, satMod;
          int Tol;
    } *PCTS2Info;
    
    bool ColorSame_CTS2(void* CTSInfo, PRGB C2)
    {
        double R, G, B;
        double CMin, CMax, D;
        double h,s,l;
        TCTS2Info i;
    
        i = *PCTS2Info(CTSInfo);
        R = (C2->R / 255.0);
        G = (C2->G / 255.0);
        B = (C2->B / 255.0);
    
        CMin = MIN(R, G, B);
        CMax = MAX(R, G, B);
    
        l = 0.5 * (CMin + CMax);
        if (abs(l * 100 - i.L) > i.Tol)
            return false;
    
        if (CMax == CMin)
            return ((i.H <= i.hueMod) && (i.S <= i.satMod));
    
        D = CMax - CMin;
        if (l < 0.5)
            s = D / (CMax + CMin);
        else
            s = D / (2 - CMax - CMin);
    
        if (abs(s * 100.0 - i.S) > i.satMod)
            return false;
        if (R == CMax)
            h = (G - B) / D;
        else if (G == CMax)
            h = 2.0 + (B - R) / D;
        else
            h = 4.0 +  (R - G) / D;
        h /= 6.0;
    
        if (h < 0.0)
            h += 1.0;
        h *= 100.0;
    
        return (h > i.H) ? min(h - i.H, fabs(h - (i.H + 100.0))) <= i.hueMod : min(i.H - h, fabs(i.H - (h + 100.0))) <= i.hueMod;
    }
    
    #include <stdio.h>
    #include <stdlib.h>
    
    void* CTSHelper(int cts, int color, int tol, double hue, double sat, double CTS3Modifier)
    {
        void* Result;
        switch (cts)
        {
            case 2:
                    Result = malloc(sizeof(TCTS2Info));
                    HSL Meh = Hsl(Rgb(color));
                    PCTS2Info(Result)->H = Meh.Hue; PCTS2Info(Result)->S = Meh.Sat; PCTS2Info(Result)->L = Meh.Lum;
                    PCTS2Info(Result)->hueMod = tol * hue;
                    PCTS2Info(Result)->satMod = tol * sat;
                    PCTS2Info(Result)->Tol = tol;
                break;
        }
        return Result;
    }
    
    bool SimilarColors(int Color1, int Color2, int Tolerance)
    {
        void* CTSInfo;
        RGB Col2;
    
        CTSInfo = CTSHelper(2, Color1, Tolerance, 0.2, 0.2, 1);
        Col2 = Rgb(Color2);
        bool Result = ColorSame_CTS2(CTSInfo, &Col2);
        free(CTSInfo);
        return Result;
    }
    
    int main()
    {
        cout.flags(ios::boolalpha);
        cout<<SimilarColors(16777215, 0, 100);
    }

    C++ Shorter Equivalent:
    Code:
            bool CTS2(RGB FirstCol, RGB SecondCol, int Tol)
            {
                struct TCTS2Info{double H, S, L, hueMod, satMod; int Tol;};
    
                double R, G, B, CMin, CMax, D, H, S, L; TCTS2Info Info;
                HSL HSLFCol = Hsl(FirstCol);
                Info.H = HSLFCol.Hue; Info.S = HSLFCol.Sat; Info.L = HSLFCol.Lum;
                Info.hueMod = Tol * HueMod; Info.satMod = SatMod; Info.Tol = Tol;
    
                R = (SecondCol.R / 255.0); G = (SecondCol.G / 255.0); B = (SecondCol.B / 255.0);
    
                CMin = MIN(R, G, B); CMax = MAX(R, G, B); L = 0.5 * (CMin + CMax);
    
                if (abs(L * 100.0 - Info.L) > Info.Tol) return false;
                if (CMax == CMin) return ((Info.H <= Info.hueMod) && (Info.S <= Info.satMod));
                D = CMax - CMin;
                S = (L < 0.5) ? (D / (CMax + CMin)) : (D / (2 - CMax - CMin));
                if (abs(S * 100.0 - Info.S) > Info.satMod) return false;
    
                H = (R == CMax) ? ((G - B) / D) : (G == CMax) ? (2.0 + (B - R) / D) : (4.0 +  (R - G) / D);
                H /= 6.0;
                if (H < 0.0) H += 1.0; H *= 100.0;
                return (H > Info.H) ? min(H - Info.H, fabs(H - (Info.H + 100.0))) <= Info.hueMod : min(Info.H - H, fabs(Info.H - (H + 100.0))) <= Info.hueMod;
            }
    I am Ggzz..
    Hackintosher

  18. #18
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice to see some things haven't changed with the pass of years, I remember I knew all these things once haha. Maybe you could add the binary explanation of RGB which was very interesting, yakman wrote about it years ago IIRC. Very useful tutorial by the way!


  19. #19
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Rewrite in progress. No one is allowed to read it!

    The master color tutorial


    From the basic knowledge to the in depth knowledge.












    By Bart de Boer






    Index





    What is a color

    RGB

    Integers and number systems

    Reading a color

    Examples


    Comparing the color

    One on one component - CTS 0

    Pythogaras - CTS 1






    What is a color



    RGB
    Difficulty:

    When describing a color, you have to split it in components. RGB is one of these systems where a color is described by the amount of Red, Green and Blue. When all three components are zero the color will be black. The higher the number the lighter the color. When all three components are it its highest the color will be white. It is important to fully understand this when comparing colors.


    Some of you might have learned that the three basic colors are red, yellow and blue. This however only applies on to paint and other pigment based color mixing. It is important to drop that knowledge while reading this.

    If you are new to this concept then I suggest looking at the next images and playing around with some color tools. A link to a colortool where you can play with RGB colors provided by colortools.net. Change the three RGB components to see which color that outputs. Yellow for example is 100% red with 100% green and no blue. A color with an equal amount of all three components is a gray color.

    An overview of how RGB mixes:

    Since there are three components involved, creating a 2D image with all the colors isn't easy. I personally prefer to display it as a cube. Where the three axes normally represent the x, y and z value, they now represent the amount of red, green and blue. It is important to note that grey is in the middle while the more colorful colors can be found on the outside. The corner where the purple, cyan and yellow touches each other is white, while on the other side it will be black.

    A RGB cube with a bite out:



    Integers and number systems.
    Difficulty:


    In this paragraph I will explain how the color is stored in simba. Different ways to set it. And how to read it or extract individual RGB components. In simba an integer is not just an integer, but a 32bit signed integer. So what does that mean? An integer in simba can be written in the binary numeral system(ones and zeros) like this 0 0000000 00000000 00000000 00000000.

    If you just read this tutorial for the basic understanding of runescape botting I suggest to continue at chapter 2: Comparing the color.

    0 0000000 00000000 00000000 00000000
    Describes if the integer is positive or negative, not used in simba for colors.

    00000000 00000000 00000000 00000000
    The whole first byte isn't used for colors. In other situations this is used for the alpha(transparency) component. Often they use unsigned integers aka uints for that.

    0 0000000 00000000 00000000 00000000
    This byte holds blue component.

    0 0000000 00000000 00000000 00000000
    This byte holds green component.

    0 0000000 00000000 00000000 00000000
    This byte holds red component.


    But what do those eight ones and zeros mean? Let say the red component is 01100101 and you want to make it a readable decimal number. Since every one represent an 2 to the power of its position you can create the following:


    Though I advice learning to translate binary to decimal numbers, it is not required for this tutorial. As you could see the color components are exactly eight bits or one byte long. This is the same as a two digit hexadecimal number. Ever seen a number being described as A1 FF 00? That is an example of a color noted as a hexadecimal number. Where our decimal number system has 10 different digits, the binary has 2 digits and the hexadecimal got 16 digits. Here is a list with all hexadecimal digits against the others. Note how one hexadecimal F got the same value as four 1's in binary, so with one hexadecimal digit, you have the same highest value as with four binary digits(bits).

    Progress Report:
    hexadecimal   |   decimal   |   binary
     0                  0           0
     1                  1           1
     2                  2           01
     3                  3           11
     4                  4           100
     5                  5           101
     6                  6           110
     7                  7           111
     8                  8           1000
     9                  9           1001
     A                  10          1010
     B                  11          1011
     C                  12          1100
     D                  13          1101
     E                  14          1110
     F                  15          1111


    So how are we going to relate that to colors in simba. Well, an F in hexadecimal is the same as 1111 in binary, we can assume that FF in hexadecimal is the same as 11111111 in binary(eight ones). A color of three bytes, or 24 bits, can be written in only six hexadecimal digits. I made a table of a couple possible colors below. Note that the decimal number is how it is written in simba. The hexadecimal number is how you can write it with the biggest readability in my opinion. The long 24bits binary number is how it is stored in your computers memory. We won't do a lot with that.

    Progress Report:
    Hexadecimal      |         binary            |   decimal  |  color
    00 00 00          00000000 00000000 00000000   0              black
    33 33 33          00110011 00110011 00110011   335543         dark grey
    66 66 66          01100110 01100110 01100110   6710886        grey
    AA AA AA          10101010 10101010 10101010   11184810       light grey
    FF FF FF          11111111 11111111 11111111   16777215       white
    FF 00 00          11111111 00000000 00000000   16711680       blue
    00 FF 00          00000000 11111111 00000000   65280          green
    00 00 FF          00000000 00000000 11111111   255            red
    FF 00 01          11111111 00000000 00000001   16711681       blue with a bit of red
    01 00 FF          00000001 00000000 11111111   65791          red with a bit of blue


    The last two colors of that table got almost no difference in color to their pure variant. Red with a bit of blue, will still be blue to my eyes. The difference is so small, most of you wouldn't even be able to notice it. The decimal number however is completely different. So the decimal number doesn't give an good indication which colors are more, and which are less alike. The first byte will have a lot more power to the decimal number then the last one. Comparing these numbers will give very odd results. The hexadecimal number gives a more accurate difference. You can easily spot only one bit of a component has been added. That is why it is important to see the differences.


    Reading a color
    Difficulty:


    In the previous paragraph I've showed you how to express a color in a hexadecimal number system. It is really important to get this if you want to write readable colors in your code. The first thing I am going to show you is how to set these numbers in pascal. Note that when you read the integer, it is always transformed in a decimal number.

    Here is an example setting five integers with the three different methods. It is important to note that the last example with the binary number only works on lape. When you call Writeln with any of these integers as parameter you will receive the decimal number.

    Simba Code:
    program NumberSystems;

    var
      numbers: Array of Integer;

    begin
      SetLength(numbers,5); //I will give you five examples

      numbers[0] := 11;           //decimal, the number is 11
      numbers[1] := $11;         //hexadecimal, the number is 17
      numbers[2] := $FF00FF;  //hexadecimal, the number is 16711935 and the color is FF blue + FF red = purple
     
      //if you run lape
      numbers[3] := %11;        //binary, then number is 3
      numbers[4] := %111111110000000000000000; //binary, the number is 16711680 and the color is FF blue = blue
    end.

    As you may have noticed by know, is that the hexadecimal number is actually a bit readable. It is good enough if the colors are simple or you don't need to know the exact color.

    Let's take $E3A13E for example. Do you know which color it is? Well, with a bit of practice you will notice that it got a lot of blue, a fair amount of green and little bit of red. So it is a blue color with a bit cyan and with a tiny bit of red. The red will probably only make it a bit lighter, and the cyan wouldn't change the color a lot. What color is it? Take a color in mind. Here it is:



    As you can see, I was close. It is important to have a rough idea what the three components will be when added together. With that skill the abstract number will become a color, which is much easier to work with. Don't be afraid if you still aren't able to read a color by looking at the hexadecimal number. If you aren't familiar with it, it might take some time. It is not really necessary for botting in simple games.

    Of course you might find colors noted like this 3209829 or colors that you converted to a string with Writeln(x) or such. Those can be impossible to read. The number you see says very few about the color. Well, of course it contains the information, but it is almost unreadable for a human. That is why it is also important to be able to transform a normal integer color in the red, green and blue components.

    The simple way:
    Simba Code:
    program TestColor;

    procedure TestColor(color:Integer);
    var
      red, green, blue: Integer;
    begin
      ColorToRGB(color, red, green, blue);
      Writeln('red  = ' + IntToStr(red));
      Writeln('green = ' + IntToStr(green));
      Writeln('blue = ' + IntToStr(blue));
    end;

    begin
      TestColor(4231022);
    end.

    This is an easy and a fast way to split it up in components. Everybody can use this. As you will see the components will be written in the decimal number system. If you want to read them as a hex you can use this code:

    Simba Code:
    program TestColor;

    procedure TestColor(color:Integer);
    var
      red, green, blue: Integer;
    begin
      ColorToRGB(color, red, green, blue);
      Writeln('red  = ' + IntToHex(red));
      Writeln('green = ' + IntToHex(green));
      Writeln('blue = ' + IntToHex(blue));
    end;

    begin
      TestColor(4231022);
    end.

    As you can see 4231022 is the same as $408F6E. Noting it as a hexadecimal number will give you advantage over noting it as a decimal number.

    But there is another way to get the color. With bitwise operators, yes, shit just got real. In the following piece of code I will show you another way of achieving it. I will explain it very roughly because there already a few good tutorials about it. Yakman his tutorial and Alpha Kue his tutorial.

    Simba Code:
    procedure TestColor(color:Integer);
    var
      red, green, blue: Integer;
    begin
      Writeln('red  = ' + toStr(color and $FF));
      //with and $FF it will read the last two hexadecimal digits

      Writeln('green = ' + toStr(color shr 8 and $FF));
      //I move the color 8 binary(2 hex) digits to the right

      Writeln('blue = ' + toStr(color shr 16 and $FF));
      //the same but now with 16
    end;


    Examples
    Difficulty:

    A few color examples:

    ~ Red

    255 red 0 green 0 blue

    color := 255;
    or
    color := $0000FF;

    ~ Blue

    0 red 0 green 255 blue

    color := 16711680;
    or
    color := $FF0000;

    ~ Green

    0 red 255 green 0 blue

    color := 65280;
    or
    color := $00FF00;

    ~ White

    255 red 255 green 255 blue

    color := 16777215;
    or
    color := $FFFFFF;

    ~ Grey

    127 red 127 green 127 blue

    color := 8355711;
    or
    color := $7F7F7F;
    ~ Black

    0 red 0 green 0 blue

    color := 0;
    or
    color := $0;

    images:
    www.learn-networking.com
    www.mobiliodevelopment.com
    Last edited by masterBB; 08-04-2012 at 05:56 PM.
    Working on: Tithe Farmer

  20. #20
    Join Date
    Oct 2012
    Location
    Italy
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    44 Post(s)

    Default

    See what I've found... It might help for CTS3!!! We're all waiting for it, and this shows examples in Pascal!! :'D

    http://www.fho-emden.de/~hoffmann/ciexyz29082000.pdf


    E1: And there are plenty more docs here: http://docs-hoffmann.de/howww41a.html You have no-excuse to not develop CTS3! :P
    Last edited by Zorgatone; 02-05-2013 at 02:40 AM.

  21. #21
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    That might be a little bit too much information for a bot scripter. Thanks for the links though.
    Working on: Tithe Farmer

  22. #22
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    That might be a little bit too much information for a bot scripter. Thanks for the links though.
    Interesting to read how what we are using works tho
    Last edited by DannyRS; 02-05-2013 at 12:31 PM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  23. #23
    Join Date
    Oct 2012
    Location
    Italy
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    44 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    That might be a little bit too much information for a bot scripter. Thanks for the links though.
    That's the basics.. I studied analytic geometry and linear algebra at the University, and these matters is what you need in order to make a script for CTS3.. You need just a bit things from linear algebra to make calcs with matrices. That's quite easy.

    You can ask me if you need some help. I'm an IT Engineer and I can code quite well indeed.

    Zorgatone.

    EDIT: Who is developing CTS3 on Simba? you? I'm quite confused now.. I thought you were developing it for Simba SRl.
    Last edited by Zorgatone; 02-06-2013 at 03:54 PM. Reason: dunno

  24. #24
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Zorgatone View Post
    That's the basics.. I studied analytic geometry and linear algebra at the University, and these matters is what you need in order to make a script for CTS3.. You need just a bit things from linear algebra to make calcs with matrices. That's quite easy.

    You can ask me if you need some help. I'm an IT Engineer and I can code quite well indeed.

    Zorgatone.

    EDIT: Who is developing CTS3 on Simba? you? I'm quite confused now.. I thought you were developing it for Simba SRl.
    I did not add CTS3. I guess Wizzup or Raymond made that. I however do know how it works. Don't worry my knowledge about math and colors exceed the CIE*Lab color tolerance methods.
    Working on: Tithe Farmer

  25. #25
    Join Date
    Jan 2012
    Posts
    369
    Mentioned
    6 Post(s)
    Quoted
    91 Post(s)

    Default

    This guide is Gold Even tough it was written such a long time ago, I learned a lot. Thank you for writing it!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •