Thread: Recolored Textures

Results 1 to 7 of 7
  1. #1 Recolored Textures 
    nice


    Join Date
    Jul 2014
    Posts
    706
    Thanks given
    336
    Thanks received
    446
    Discord
    View profile
    Rep Power
    3589
    Recently i've added a way to recolor(Mix certain channels of the texture image with another color to modify the textures color) textures in my editor and with some effort(usually just takes like 30secs) it actually results in really nice recolors.
    I have now decided to just generate n(350 in this case) mixes/recolors of random textures in my cache and with basically no effort at all(it took under 5mins to write the method) it actually produced quite a few nice textures.
    Obviously not all of them are nice, but some are definitely useable(imo) and i believe this method can be improved greatly to a point where it produces decent results most of the time.

    I have also made a 4480x1280 atlas of the textures(35x10 textures) so u can preview them before downloading.




    Download: https://www.mediafire.com/file/e2972...tures.zip/file
    Reply With Quote  
     


  2. #2  
    Project Asgardia

    Gandalf's Avatar
    Join Date
    Nov 2011
    Posts
    918
    Thanks given
    82
    Thanks received
    634
    Rep Power
    4658
    These look nice, thanks for release!
    Reply With Quote  
     

  3. #3  
    Registered Member Bubz's Avatar
    Join Date
    Oct 2008
    Posts
    251
    Thanks given
    11
    Thanks received
    13
    Rep Power
    57
    Quote Originally Posted by Suic View Post
    Recently i've added a way to recolor(Mix certain channels of the texture image with another color to modify the textures color) textures in my editor and with some effort(usually just takes like 30secs) it actually results in really nice recolors.
    I have now decided to just generate n(350 in this case) mixes/recolors of random textures in my cache and with basically no effort at all(it took under 5mins to write the method) it actually produced quite a few nice textures.
    Obviously not all of them are nice, but some are definitely useable(imo) and i believe this method can be improved greatly to a point where it produces decent results most of the time.

    I have also made a 4480x1280 atlas of the textures(35x10 textures) so u can preview them before downloading.




    Download: https://www.mediafire.com/file/e2972...tures.zip/file
    i actually really like this. do you have any more ? i saw some textures on ur texture view you released that are on here.
    Reply With Quote  
     

  4. #4  
    nice


    Join Date
    Jul 2014
    Posts
    706
    Thanks given
    336
    Thanks received
    446
    Discord
    View profile
    Rep Power
    3589
    Quote Originally Posted by Bubz View Post
    i actually really like this. do you have any more ? i saw some textures on ur texture view you released that are on here.
    U can generate ur own easily, heres the code i used:
    Code:
        private void generateN(TextureWrapper srcTexture, int hueCount, int adjustmentCount, AdjustmentMode adjustmentMode, BlendMode blendMode) {
            Path path = Path.of("./generatedtextures");
            for (int i = 0; i < adjustmentCount; i++) {
                double adjustment = MathUtils.map(i, 0, adjustmentCount, -1f, 1f);
                for (int j = 0; j < hueCount; j++) {
                    int hue = (int) MathUtils.map(j, 0, hueCount, 0, 360);
                    Color mix = Color.hsb(hue, 1.0, 1.0);
                    ImageView source = new ImageView(srcTexture.getImage());
                    ImageView result = generate(source, adjustment, adjustmentMode, mix, blendMode);
                    WritableImage newTexture = result.snapshot(null, null);
                    try {
                        ImageIO.write(SwingFXUtils.fromFXImage(newTexture, null), "png", Path.of(path + "/" + currentIndex + ".png")
                                .toFile());
                        currentIndex++;
                        System.out.println("Wrote: " + currentIndex);
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }
    Code:
        private ImageView generate(ImageView source, double adjustment, AdjustmentMode adjustmentMode, Color mix, BlendMode blendMode) {
            ColorAdjust monochrome = new ColorAdjust();
            switch (adjustmentMode) {
                case HUE -> monochrome.setHue(adjustment);
                case SATURATION -> monochrome.setSaturation(adjustment);
                case BRIGHTNESS -> monochrome.setBrightness(adjustment);
                case CONTRAST -> monochrome.setContrast(adjustment);
            }
    
            ColorInput input = new ColorInput(
                    0,
                    0,
                    source.getImage().getWidth(),
                    source.getImage().getHeight(),
                    mix);
            Blend blend = new Blend(
                    blendMode,
                    monochrome,
                    input
            );
            source.setEffect(blend);
            return source;
        }
    Reply With Quote  
     

  5. #5  
    Registered Member Bubz's Avatar
    Join Date
    Oct 2008
    Posts
    251
    Thanks given
    11
    Thanks received
    13
    Rep Power
    57
    Quote Originally Posted by Suic View Post
    U can generate ur own easily, heres the code i used:
    Code:
        private void generateN(TextureWrapper srcTexture, int hueCount, int adjustmentCount, AdjustmentMode adjustmentMode, BlendMode blendMode) {
            Path path = Path.of("./generatedtextures");
            for (int i = 0; i < adjustmentCount; i++) {
                double adjustment = MathUtils.map(i, 0, adjustmentCount, -1f, 1f);
                for (int j = 0; j < hueCount; j++) {
                    int hue = (int) MathUtils.map(j, 0, hueCount, 0, 360);
                    Color mix = Color.hsb(hue, 1.0, 1.0);
                    ImageView source = new ImageView(srcTexture.getImage());
                    ImageView result = generate(source, adjustment, adjustmentMode, mix, blendMode);
                    WritableImage newTexture = result.snapshot(null, null);
                    try {
                        ImageIO.write(SwingFXUtils.fromFXImage(newTexture, null), "png", Path.of(path + "/" + currentIndex + ".png")
                                .toFile());
                        currentIndex++;
                        System.out.println("Wrote: " + currentIndex);
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }
    Code:
        private ImageView generate(ImageView source, double adjustment, AdjustmentMode adjustmentMode, Color mix, BlendMode blendMode) {
            ColorAdjust monochrome = new ColorAdjust();
            switch (adjustmentMode) {
                case HUE -> monochrome.setHue(adjustment);
                case SATURATION -> monochrome.setSaturation(adjustment);
                case BRIGHTNESS -> monochrome.setBrightness(adjustment);
                case CONTRAST -> monochrome.setContrast(adjustment);
            }
    
            ColorInput input = new ColorInput(
                    0,
                    0,
                    source.getImage().getWidth(),
                    source.getImage().getHeight(),
                    mix);
            Blend blend = new Blend(
                    blendMode,
                    monochrome,
                    input
            );
            source.setEffect(blend);
            return source;
        }
    do i put this into the client? i am very new to this and just now experimenting with textures!
    Reply With Quote  
     

  6. #6  
    nice


    Join Date
    Jul 2014
    Posts
    706
    Thanks given
    336
    Thanks received
    446
    Discord
    View profile
    Rep Power
    3589
    Quote Originally Posted by Bubz View Post
    do i put this into the client? i am very new to this and just now experimenting with textures!
    If u wanted u could put this in a client but i'd make a standalone application(Most of the classes there are from JavaFX) if ur new to programming don't even bother tho
    Reply With Quote  
     

  7. #7  
    Bossman

    ISAI's Avatar
    Join Date
    Sep 2012
    Posts
    1,827
    Thanks given
    592
    Thanks received
    939
    Discord
    View profile
    Rep Power
    5000
    Nice release, good work
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 29
    Last Post: 04-18-2008, 02:44 AM
  2. Recoloring the whole interface and stuff!!!!!!
    By Ninja Cat in forum Tutorials
    Replies: 19
    Last Post: 12-09-2007, 07:03 AM
  3. Textured Text
    By Looted in forum Tutorials
    Replies: 1
    Last Post: 10-05-2007, 10:02 AM
  4. Recolored Items
    By Lovey in forum Showcase
    Replies: 116
    Last Post: 09-08-2007, 09:19 PM
  5. Edited;Modified;Recolored thread
    By adolfo in forum Showcase
    Replies: 39
    Last Post: 08-27-2007, 12:29 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •