Jump to content

Reptillian

Members
  • Posts

    1,239
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Reptillian

  1. Submitted pull request to G'MIC Community so that mosaic filter can be tested soon. Also, aspect ratio cropping is another new filter of mine, and the command was used in mosaic filter. Also, there's a bug with mosaic filter. I don't know why the end result shrinks. But, it isn't coming from my end since it works fine without folder input option assuming 3 or more images are used using 'All' input layers inside GIMP, and Krita. So, Paint.NET users will need to hold out a bit for a working version. You may have to manually resize the image. There's still the option of copying the mosaic code which I will copy and paste into here if there's any filter developers interested into such a filter. #@cli rep_mosaic_gen: autocrop_median_bool[0=Do not autocrop||1=Autocrop by median],aspect_ratio_linear_interpolation[0=Nearest Neighborhood||1=Linear],0>=dithering>=1,image_scale_interpolation,0>=tile_width,0>=tile_height #@cli: Generates mosaic using multiple pictures using indexing methodology, and uses average to determine the mapping based on colors. Tile_Width and Tile_Height cannot be both zero! rep_mosaic_gen: skip ${1=0},${2=1},${4=5},${6=0} #Set variable to number when no inputs# if {$!<=2} v + error "You need to have at least 3 images to generate a mosaic!" fi #Condition for working mosaic filter# fim_number={$!-1} #Total images number# in_a={int($5)} #Width# in_b={int($6)} #Height# in_c={$in_a*$in_b} #Used to validate if one of those variable is 0# v={$in_a+$in_b} #Used as a variable to compute mini-images size# iw={w} #Image Width# ih={h} #Image Height# vw={$in_c==0?floor(w>h?$v:w/h*$v):$in_a} #If width or height is 0, then either the width or height is automatically calculated based on image ratio# vh={$in_c==0?floor(h>w?$v:h/w*$v):$in_b} #If width or height is 0, then either the width or height is automatically calculated based on image ratio# mini_width={ceil(w/$vw)} #Width for backend image used for indexing based on palettes of all reference images# mini_height={ceil(h/$vh)} #Height for used for indexing based on palettes of all reference images# full_width={$mini_width*$vw} #Scaled backend image used for finding areas where to place images# full_height={$mini_height*$vh} #Scaled backend image used for finding areas where to place images# to_a if $1 autocrop[^0] {ic} fi #Automatically crop images. The median is cropped out.# +rep_lbchstatfunc_to_pal[^0] ia #Converts images to use as mini-images into palettes of average color based on image# rep_aspect_crop_2d[^0,{$!-1}] {$vw},{$vh},,$2 #Fit images into aspect ratio. Needed for making the filter working as expected.# r[^0,{$!-1}] {$vw},{$vh},1,4,$4 #Resize all images into vw, and vh factor# +r[0] {$mini_width},{$mini_height},1,4,$4 #Create backend image# split_opacity. #Split the opacity of backend image# index.. ...,$3,1 #Index with the palettes of average colors of images used as mini-images# a[-1,-2] c #Append backend image color and alpha channels# rv[0,{$!-1}] rm. #Replace original image with indexed image and remove original image.# r[0] {$full_width},{$full_height},1,4,1 #Resize the new image width into the nearestwidthto vw# r[0-{$fim_number}] {$iw},{$ih},1,4,0,2 #Resize the new image height into the nearest height image to vh# pal_l. #Convert Palette to Layer# r[^0-{$fim_number}] {$iw},{$ih},1,3,1 #Resize palette layers into original image size# split_opacity[0-{$fim_number}] #Split opacity of tiled images and the replacement of the original image# repeat {$fim_number} l[0,{$!-$fim_number+$>}] f. "i#0==i#1?255:0" to_gray. endl done #Change the palette layer into the alpha based on the similarity of the replacement to the original image and the palette layer# repeat {$fim_number} l[{($>*2)+3},{$!-$fim_number+$>}] +blend multiply rv[0,2] rm. endl done #Multiply the palette target alpha image and the tiled image alpha# rm[{$!-$fim_number}-{$!-1}] #Remove the layers that is used to calculating where the mini-images will go# repeat {$fim_number} a[{$>+2},{$>+3}] c done #Append the tile image and resulting tile image alpha# blend[^0-1] alpha #Flatten the appended tile images# rv[0,2] rm. #Remove the backend color image with the color flattened image# split_opacity[0] #Split Opacity of the flattened image# blend[^0] multiply #Multiply the back image alpha by the tiled image alpha# a c #Append the color and alpha channel#
  2. All I need to do is to find out how to import pictures specifying only the directory on the GUI filter. I don't know how to do that yet. I changed the algorithm, and it is vastly improved in accuracy. Note that there's more random pictures, but also more clarity. You can also specify dithering factor. Also, note that the picture is transparent. Yes, it supports alpha images too. For target, and reference pictures.
  3. New filter is on development. Result of the filter
  4. Disregard earlier message about get cli. It's replaced with a different command.
  5. If I was to critique the icons, the duplicate icon doesn't look very distinguishing. To clarify, they look more like paper than colored glass on top of each other. Dents icon doesn't actually tell me what's the effect is, but that's ignorable. Colors in gradient icon in toolbar needs to be more distinguishable. Paint Bucket icon in toolbar, it should be a brighter color. Bright Red would do for the paint. Shape could be in Red, Green, Blue instead of Purple, Blue, and Green. Distinguish-ability is the only thing I would address.
  6. Unexpected news. The main maintainer of G'MIC has added new commands which means there'll be even more updates on the upcoming new updated color modulo texture. He made rgb2ryb/ryb2rgb, and he also added a new feature with apply_channel which is that you can apply command to ryb model. Color modulo texture will have RYB - Additive mode ; RYB - Subtractive Mode ; RYB - Painting Pigment Based Mode. The last one is based on my own command translating pigment based codes. What this means is that you'll have the option to use Yellow instead of green. The first 2 don't lose any colors. The last one loses blue-green solely because of its property. Sample Image of Color Modulo Texture with RYB8-P Beautiful, huh?
  7. That's not the same filter. Update using the arrow that looks like the recycle icon. Then, type in search 'emboss', you'll see my filter under Testing -> Reptorian -> Emboss-Relief
  8. From what I found, the RYB bar doesn't seem very accurate. Here's what I got with my own g'mic command, looks more like the reference you posted in the original link. This is more based on painting, and the only downfall is the blue is terrible. EDIT: Never mind. Just making this more saturated alone the desaturation issue.
  9. @lifeday Another update! Samj at discuss.pixls forum found the solution. It's settled - https://discuss.pixls.us/t/reptorian-gmic-filters/9165/96?u=reptorian The solution was to add 'to_a'. You don't need to file issue or verify that it works. All is fine and dandy now. The reason why I had to add 'to_a' is that GIMP has this weirdness where layers could have no alpha channel at all, and that's not the behavior of literally almost every other application that works with alpha channels. That's the downfall of G'MIC scripting unfortunately, though its universality makes it worth pursuing in the end.
  10. http://nishitalab.org/user/UEI/publication/Sugita_SIG2015.pdf Would the above be of any help? Just found it when searching for an answer to color space.
  11. There, I believe I should have fixed it. Here, meanwhile, you could do this to verify for me. First update gmic, then do these steps. 1) Type in "%appdata%/gmic" in Windows Explorer 2) If you have something like Kate or notepad++, right-click, and click edit updatexxxx.gmic where xxxx represent latest .gmic version. 3) Search "#@gui Emboss-Relief" 4) Replace the existing code by highlighting it, and then copy and paste this #@gui Emboss-Relief : fx_emboss_relief, fx_emboss_relief_preview(0) #@gui : sep = separator(), Enable Extreme Emboss or Relief? = bool(0), sep = separator() #@gui : Angle = float(0,0,360) #@gui : Depth (%) = float(100,0,500) #@gui : Depth (%) = float(500,500,5000) #@gui : Smoothness = float(0,0,10) #@gui : Invert Embossing? = bool(0) #@gui : Preserve Alpha? = bool(1) #@gui : sep = separator(), note = note("Relief Section") #@gui : Apply Relief? = bool(1) #@gui : Blending Opacity (%) = float(100,0,100) #@gui : sep = separator(), Preview Type = choice("Full","Forward Horizontal","Forward Vertical","Backward Horizontal","Backward Vertical","Duplicate Top","Duplicate Left","Duplicate Bottom","Duplicate Right","Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inverse"), Preview split = point(50,50,0,0,200,200,200,0,10,0) #@gui : sep = separator(), note = note("<small>Author: Reptorian. Latest Update: <i>2019/3/19</i>.</small>") fx_emboss_relief : repeat $! l[$>] split_opacity if $8 +em[0] {$6?$2+180:$2},{$1?$4/100:$3/100},$5 blend[^1] grainmerge,{$9/100} else em[0] {$6?$2+180:$2},{$1?$4/100:$3/100},$5 fi if $7 a c else k[0] fi endl done fx_emboss_relief_preview : gui_split_preview "fx_emboss_relief $*",${-3--1} u "{$1}"\ "{$2}"\ "{$3}_"{$1==1?0:2}\ "{$4}_"{$1==1?2:0}\ "{$5}"\ "{$6}"\ "{$7}"\ "{$8}"\ "{$9}_"{$8==1?2:1}\ "{$10}{$11,$12}"
  12. Since I do not use GIMP as my main program at all nor installed G'MIC there, can you please file a issue in here - https://github.com/Reptorian1125/gmic-community Insert details like what does it do when you tried the relief mode? What do you expect? Error message? You can also post a log.
  13. Emboss-Relief update and Color Modulo Texture fix are now here. Now, color modulo texture no longer has a issue with image that aren't 2^x dimensions. Mirror x code has been removed with formula-based code and the functionality is still the same. I might add the option to put 0 or 255 per channel on Color Modulo Texture, but that will have to wait for another week or two. There's also the possibility to add x/y shifting to color modulo texture. I am going to fix the concrete texture filter and updating it with lab a-b contrast, and it'll have dynamic gui as well next week or two as well. @lynxster4 - Only a reminder to update the tutorial of yours. Though, I don't think it'll change things too much as extreme emboss/relief is disabled by default.
  14. Thank you very much. There's actually more update that will come to the filter. I added extreme embossing option. The reason why I decided to add a checkmark option for extreme embossing is that it's hard to control the smaller end of embossing with extreme embossing setting. Here's how it looks like right now on my end. Mind the bad cropping though. If Enable Extreme Emboss or Relief? is on, then Depth (%) can go up to 5000%. If not, it'll go up to 500%.
  15. Improved Emboss-Relief command! Now, I set it to go up to 500%. Also, multi-level embossing has been improved. Also, after this update arrive around this week or next week, I'd like a bit of a test with code[local] to see just much level of embossing is ok. I could do 5000% embossing. 10000% is overkill though. Here's a test.
  16. @SeeRose About the earlier thing, you can definitely save settings on G'MIC. You can also clone them too. Right-click -> Add fave. Then, on your fave section, you can clone those fave and remove fave.
  17. The older transfer color [reduced colors] will be replaced with a better version with new features including dynamic GUI. Just have submitted change to it. Speaking of which, I may actually change my earlier filters to take advantage of dynamic gui support. So, you wouldn't need to be overwhelmed by 80 options at once, but you still can use 80+ options if desired. I might make simplified option with dynamic gui for those that hates using 40+ options on a filter.
  18. Too much info has been destroyed. Maybe with GANs, some info could be recovered with ease, but you don't have access to that. You will have to manually recover details one by one, and I'll give you three weeks to finish. You might have to replace grass entirely though
  19. New filter has been made and will be landing soon - Still haven't done the pal_t cli to a gui filter thing as I haven't figured it out yet. Guess time is over, it's the G'MIC version based off Color Modulo by @MadJik . New features: Channel Value Restriction Color Space (RGB, CMY,CMYK,LAB,LCH,YIQ,YUV,XYZ) Modulo Styles (Modulo (What the regular version did),Divisive Modulo, Divisive Modulo-Continuous) Channel Swapping Diagonal Flipping Alpha Channel
  20. Okay, seem like I am done with the pal_t cli command (now with 19 options though upscale option is not going to work on PDN due to PDN filter limitations), and now I am replacing my transfer color[reduced colors] with dynamic options. Though, the dynamic option for G'MIC is something I have yet to understand. pal_t hardware emulation is at least usable though it's not fast enough. Other than that, the filter works fast enough. Most of the time you aren't going to need hardware emulation. This might take a few weeks of work though.
  21. You're supposed to copy a image you want to use first, and change layer input to active and below or something like that.
  22. Actually, Krita g'mic stylize do have a bug where it fails to render though it might be address this year or so. This isn't a Krita forum though there are multi-software users. Also .gmic is a file where all the g'mic filter codes reside in. Very easily accessible and does not require compilation. So, even non-programmer could make their filter when they learn a little about g'mic coding, and doesn't need as many lines as C# or C++ to do the same, and also allows non-paint net users to use those filters as well though it comes with the caveat of the code being open which isn't what some coders want. Considering how sometimes code breaks as a result of changes, that's not really being fussy. I been there breaking things when I update to g'mic community.
  23. Actually, never mind. I thought changed setting for all images means seerose figured out how to change default setting permanently.
  24. Ok, I may have found a much faster way to generate hardware restriction at the cost of accuracy. And by faster, I mean from 20 mins down to 45 seconds. Here's a bit of code +at "s c f "ia" a c",25,25 +colormap. 8,1,1 index.. .,0,1 l[1] repeat 7 [0] done endl + means add new layer at means apply by tiles 25,25 is the tile size s c means split channel f means fill, and "ia" means average a c means append channel, so it is now a single image in that tile. colormap converts a image to a palette that match closest to the image index basically restrict image by colors l means the image is going to be processed locally repeat done basically repeat this command for x amount of time [0] [1]......[n] all refers to layer number So, all I need to do is to figure out how to use the palette map as a reference to extract segment generated from the tiles. And for reference, here's the segment of colors to stimulate hardware restriction
  25. Ok, all changes I did should be here on G'MIC 2.5. Just click refresh or update and you should see those. @mottoman Since you asked about the palettes, how are they working out for you? Search 'Premade Palette' via search box or find it under testing->reptorian->premade palette. You can also use those palette to change colors of image via transfer color reduced. And there's the experimental pal_t to do what transfer color reduced does with more options though it will be turned into a filter later. Word of note though, lctwp has been renamed to pal_t. Reason: pal_t is more easier to remember, and pal_t has more in common with pal than lctwp in names. Syntax of pal_t is the same as lctwp. Most of the time, all you really end is the first 3 syntax to 7 syntax. Alpha Colors to 0 or 1 will remove alpha. pal_t will be transformed to a filter later when I feel like doing that.
×
×
  • Create New...