Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 64

Thread: How to design Autocolor Functions (Along with examples and tools!)

  1. #26
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    that means a tutorial writer cup?

  2. #27
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    I printed this tutorial =3 Now to read it WITHOUT hurting my eyes by looking at the screen too close :3

    ALSO, very nice! HSL, great job!

    i printed 10 pages of the tutorial..this is the last time i am going to print a tutorial... my binder is full, im almost out of lined paper (I ran out of blank white papers), i can;t use the color printer (My dad said he uses it for photographs and that i can't use it ), and i got 4 tutorials (TPA, Auto Color, and i forgot the other 2 :3) and 2 scripts. (Maple Forest Fire, and the other one is a s3cr3T, but i need help with it.... My TAutoColor wont find the Varrock Road Color (I know I should use FindVarrockRoadColor, but come on... Sometimes you got to be more original right? :3). Well time to read HSL pce.

  3. #28
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @Deathsytex: I'm glad you like this tut and, um, yeah, um, sorry for making this tut so long, but if I would have shortened it, I might have missed some crutial setps.

    @Tara: Hehe, with all these comments I could make a commercial advertising this tut! Tara's seal of Approval, 14 out of 14 vote "great" (the one point at "not so good" was a mistake ^^), and lots of other comments.

    @Zytex: Probably not (...yet (at least )). But heck, the only difference between the official cup, and the non-official "cups" is that it displays the official ones next to your avy. And if you consider that the tut writer cup is the only cup that doesn't increase your avy (well, apart from best newcommer, and there was another one I think...), who cares ^^. (Don't get me wrong mods/admins, I would still be greatly honored to recieve an official cup, so don't let this post influence any sort of maybe futur decision... xD)
    There is nothing right in my left brain and there is nothing left in my right brain.

  4. #29
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    So are you going to add (Im not expert but i have heard of these things.) XYZ colors? (Is it even related to colors =p)

  5. #30
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am going to add XYZ colors eventually, and yes, their prinziple in Autocoloring is the same as the one listed. But first I will finish the HSL one's with a few examples, and how to add it into our already existing one's, and not to forget, the tool will be expanded ^^. The only problem is that I will be gone over the Weekend, so I will try to Finish the HSL one now (already 9:30 PM here), post it, and then catch up when I'm back. The problem from that point on is that I am learning along with this tut, because my knowledge about XYZ colors could be summed up in 3 to 4 statements at the moment ^^
    There is nothing right in my left brain and there is nothing left in my right brain.

  6. #31
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    LoL, how much of XYZ do you know? Well you don't have to rush, people can wait. It is infact the quality of the guide that matters :3

    Good luck on finding a way to explain XYZ and finishing off HSL

  7. #32
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Update 3 Completed! I Finished The Hsl Autocoloring! Come And Take A Look!

    C ya all on Monday.
    There is nothing right in my left brain and there is nothing left in my right brain.

  8. #33
    Join Date
    Jul 2008
    Location
    Toronto, Ontario
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Amazing tutorial I had to read some parts over a few times to understand it, but its great. Ty!

  9. #34
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No problem, always happy to help, but if some certain parts gave you some troubles, I'd be happy for you to tell me, so I can make it easier to understand.

    Because these froums have been down for a few days, I did not get a chance to update this. Also, I have a visitor over for a few days, so I will not be able to post updates regulary, but i will try as often as possible. I'm sorry for any inconvinience this might have caused. (hehe, that sounded professional )
    There is nothing right in my left brain and there is nothing left in my right brain.

  10. #35
    Join Date
    Mar 2008
    Location
    The Netherlands
    Posts
    1,395
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Give this guy a cup! Rep+'d, now I understand it. Always wondered how it works..


  11. #36
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Quote Originally Posted by Pure1993 View Post
    @ Hobbit: I do understand it, but I was wondering when posting this, how long it would take for a mod to move this into the appropriate section.
    Fairly fast.
    STOP PM'ING ME

  12. #37
    Join Date
    Jun 2008
    Location
    Somewhere
    Posts
    117
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Nice Tut, I wish i could turn the road a different color but anyway back to the point, very nice and detailed.


    Rep++

  13. #38
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I've never used HSL autocoloring before, but I'm not sure if H-S, S-L, and H-L are the correct operations to use, or if they help you at all.

    When I first designed FindRoadColor long ago, there was one fundamental problem with it. When you first logged into a world, the minimap would be dark. You had to refresh the screen one time to get the 'normal' colors. So, if you hopped worlds and picked colors, you wouldn't get one range, you would get two. Like for Red, the first dark colors might be between 60-80 while the normal lighter colors would be 100-120. It was easily fixed by just refreshing the screen one time before autoing, but I noticed something. I noticed that ALL the values were reduced by a similar amount. So even though Red or Green values might be very different, Red-Green would be in a stable range for all the road colors.

    So that's the history behind using Red - Green, etc. I don't know if Hue - Saturation actually helps anything. The simplest thing to do would be to plug all the values into a script those you posted here and see if doing a subtraction or addition or any other mathematical operation with the values helps you to identify a unique color. For example, it might be the Hue alone is a better characteristic for autocoloring purposes than Hue - Saturation would be. You want whatever gives you the narrowest, most unique range to check your color against.


  14. #39
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, you have a good point. The thing is: I personally only use RGB autocoloring the way you applied it in your autocoloring (btw, great fan of your autocolor.scar functions ), and I'm content with that. But, HSL is a different perspectiv on colors, and even if it isn't really needed at all, and I don't want to teach "this is one way and it is the only way" in my tutorials, but rather create a full view perspective. That way you can be more creative while scripting and experiment around a bit. And hey, there is no punishment for not reading the HSL part ^^.
    There is nothing right in my left brain and there is nothing left in my right brain.

  15. #40
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    @Update2: Fail:
    procedure HSLTools;
    begin
    ColorToXYZ(TheColor,H,S,L); <--
    XYZ?

    Otherwise REALLY great tut.

    Make another one like this one and I'll kill myself if you don't get a cup.

  16. #41
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Omg, I must have been REALLY sidetracked when I wrote that part... -.-
    Thanks a lot for pointing that out
    Hmm... I might write another tut, but first of all I'll keep my tut runner up and running (or better yet GET him up and running as well as I want it )... but, don't kill yourself if I don't get a cup, it won't be the same without you!
    There is nothing right in my left brain and there is nothing left in my right brain.

  17. #42
    Join Date
    Aug 2007
    Posts
    172
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Have got to say fantastic, Now that I have started to learn to script, tut`s like these that explain why we do the things we do, Make learning easier. keep it up.

    rep added as soon as i figure out how. lol

  18. #43
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Small suggestion: add a table of contents at the very start of that sexy tut to make it somewhat more organized.

    Quote Originally Posted by jas0npc View Post
    Have got to say fantastic, Now that I have started to learn to script, tut`s like these that explain why we do the things we do, Make learning easier. keep it up.

    rep added as soon as i figure out how. lol
    Blue box next to the red cross beneath the "location" thingy in his name, to the very right.

  19. #44
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm, sounds like a good idea... I'll post it after the update of my script, which should be quite soon
    Thanks for all the suggestions/notifications on problems ^^
    There is nothing right in my left brain and there is nothing left in my right brain.

  20. #45
    Join Date
    Aug 2007
    Posts
    172
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)
    [QUOTE=Blue box next to the red cross beneath the "location" thingy in his name, to the very right.[/QUOTE]

    Many thanks, its very well hidden.

  21. #46
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow man just wow massive improvement since last time i saw it

    "you deserve the tut writer cup for this tutorial man"

    rep++ again

  22. #47
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Me thinks me gets it!!!!
    Me wants to gives you thanks!
    I is much happy that me did a good grammar !

    Ok, now Im going to be a "know it all SRL member"

    Correct me if im wrong but i believe this:

    SCAR Code:
    if InRange(Red - Blue, 24, 30) then
            if InRange(Red - Green, 4, 14) then
              if InRange(Green - Blue, 15, 23) then
                if InRange(Round(H - L), 0, 8) then
                  if InRange(Round(S - H), -2, 5) then
                    if InRange(Round(S - L), 1, 9) then
                      if GetColor(P[i].x + 2, P[i].y + 2) = TestColor then
                        if GetColor(P[i].x + 1, P[i].y + 1) = TestColor then
                          if GetColor(P[i].x, P[i].y + 2) = TestColor then
                            if GetColor(P[i].x + 2, P[i].y) = TestColor then
                              if GetColor(P[i].x, P[i].y + 1) = TestColor then
                                if GetColor(P[i].x + 1, P[i].y) = TestColor then
                                  if GetColor(P[i].x + 2, P[i].y + 1) = TestColor then
                                    if GetColor(P[i].x + 1, P[i].y + 2) = TestColor then
                                    begin
                                      Result := TestColor;
                                      Writeln(' Lumbridge Road Color = '+IntToStr(Result));
                                      exit;
                                    end;

    can be this:

    SCAR Code:
    if InRange(Red - Blue, 24, 30)
            and InRange(Red - Green, 4, 14)
            and InRange(Green - Blue, 15, 23)
            and InRange(Round(H - L), 0, 8)
            and InRange(Round(S - H), -2, 5)
            and InRange(Round(S - L), 1, 9)
            and GetColor(P[i].x + 2, P[i].y + 2) = TestColor
            and GetColor(P[i].x + 1, P[i].y + 1) = TestColor
            and GetColor(P[i].x, P[i].y + 2) = TestColor
            and GetColor(P[i].x + 2, P[i].y) = TestColor
            and GetColor(P[i].x, P[i].y + 1) = TestColor
            and GetColor(P[i].x + 1, P[i].y) = TestColor
            and GetColor(P[i].x + 2, P[i].y + 1) = TestColor
            and GetColor(P[i].x + 1, P[i].y + 2) = TestColor then
            begin
              Result := TestColor;
              Writeln(' Lumbridge Road Color = '+IntToStr(Result));
              exit;
            end;

    I just like it better that way for some reason...lol


    Now that I have pissed you off...Amazing tutorial! I finally understand autocolor. The visuals really help! It looks like you put a lot of time and effort into this and trust me, it paid off. Thanks so much for making this tut!

    Now that Iv made you feel good about yourself:

    I sort of got this when I read the tutorial, not everyone is a genius like you and me . So you may want to put, as a conclusion:

    In conclusion, autocolor uses a special kind of tolerance to find a color. This tolerance is customized to have more tolerance for certain parts of a color (such as red blue and green) based on how Jagex randomizes that specific color.

    I know, im pwnage

    Also, is there a function that goes through the procedure that this thread suggests? If there isnt; I call dibs on making it .

  23. #48
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @Scaper: thanks, me is honored.

    @Macrosoft: Wow, you gets it! me thinks now that you be smart! But me be pissed because you not likes me standardz.... xD
    [Correct grammar from this point onwards ]
    Well, everyone can choose their own style, BUT what if someone came along and had this porblem:
    "ZOMG! IT FAILS! ME NOT 1337 ANYM0RZ! ME N33D2 2 KN0W WH@TS WR0NG!" well, if that should happen, you could put a begin and end at the "if"'s, and make it write "found 1", found 2", found 3", etc. and find his incorrect value then, thats how I got around to get a feel for the right ranges ^^.
    Alright, now I have to say np at the thx's you gave me... hmmm... what next... oh yeah, now I need to feel smart because you said something like that, and I have to be pissed again because you downgraded me down to the same "stage" you are in (you called both of ous genius... -.-) /jk xD

    Now I have to say: good idea, I will add that as an intro though

    and about a function to go through these procedures??? me be confused, me gots no glue whatz you meanz...
    There is nothing right in my left brain and there is nothing left in my right brain.

  24. #49
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    The problem with 1 and 2 and 3 and 4 and 5 and 6 is that it will have to check the validity of all 6 every time.

    If you use if .. then for each of them, then the first time it missed one it skips all the rest. If you're checking through thousands of pixels, then it can add up.

    'And' works, but it's not as efficient.


  25. #50
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    my gets owned

    What I mean is a function you input like 4 or five colors (same color but from different worlds) that does the red-green green-blue etc thing and then finds the three positive ones and adds to the highest and subtracts from the lowest and then does the whole if if if if thingy.

    Basically its an autocolor function where you input the 4-6 colors and it does the rest for you.

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. 2 "new" AutoColor Functions
    By Pure1993 in forum Research & Development Lounge
    Replies: 12
    Last Post: 03-01-2008, 05:21 PM

Posting Permissions

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