Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Denim Script

Thu Jan 30, 2014 9:44 am

Image

This script is based on my Denim Tutorial and will create the basic denim background for you. It's up to you to create the seams, folds, stitching. :)

The attached zip file contains the script and pattern which is necessary to create the texture. Once added to GIMP, you can find the script under Filters > Render > Denim... You pick the color, hit OK and the script does the rest.

Enjoy!

Re: Denim Script

Thu Jan 30, 2014 11:37 am

Fantastic fencepost! Thank you. :)

Re: Denim Script

Thu Jan 30, 2014 12:18 pm

No problem!

Re: Denim Script

Thu Jan 30, 2014 4:21 pm

Thanks FP.

Re: Denim Script

Fri Dec 13, 2019 2:07 pm

I get an error when running this script:
Image

Re: Denim Script

Fri Dec 13, 2019 2:47 pm

The parameters it uses for bump-map are for older versions of Gimp and out of range for Gimp2.10x bump-map. You just need to edit the parameters to match the current bump-map range in the script. This will present a good opportunity for you to learn how to edit scripts....

Re: Denim Script

Fri Dec 13, 2019 2:53 pm

racer-x wrote:The parameters it uses for bump-map are for older versions of Gimp and out of range for Gimp2.10x bump-map. You just need to edit the parameters to match the current bump-map range in the script. This will present a good opportunity for you to learn how to edit scripts....


If I were to edit this script, what line would I change?

Re: Denim Script

Fri Dec 13, 2019 3:01 pm

I haven't installed this script, but reading it, I would guess you should start editing line 70.

Re: Denim Script

Fri Dec 13, 2019 3:10 pm

racer-x wrote:I haven't installed this script, but reading it, I would guess you should start editing line 70.


I'm not a coder and I looked at it. I'm not sure what numbers to change or if I have to change them each time I use the script. So I will leave it up to the coders.

Re: Denim Script

Fri Dec 13, 2019 3:48 pm

Well I just installed this script out of curiosity, I then edited it successfully by changing one parameter. The error reports water elevation out of range @255. If you run Bump-Map on an image, you will see that Water Elevation runs from 0 - 1.

So what number do you think you need to change in line 70?

Code:
(plug-in-bump-map RUN-NONINTERACTIVE image denimLayer patternLayer 135.0 45.0 3 0 0 255 0 TRUE TRUE 2)

Re: Denim Script

Fri Dec 13, 2019 4:27 pm

racer-x wrote:Well I just installed this script out of curiosity, I then edited it successfully by changing one parameter. The error reports water elevation out of range @255. If you run Bump-Map on an image, you will see that Water Elevation runs from 0 - 1.

So what number do you think you need to change in line 70?

Code:
(plug-in-bump-map RUN-NONINTERACTIVE image denimLayer patternLayer 135.0 45.0 3 0 0 255 0 TRUE TRUE 2)


I'd have to change 255. I will try that. I made the change and it works. :)

Re: Denim Script

Fri Dec 13, 2019 4:37 pm

Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for life.

Re: Denim Script

Fri Dec 13, 2019 4:52 pm

racer-x wrote:Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for life.


Agreed! :) I'm just not a coding person but I will try.

Re: Denim Script

Fri Dec 13, 2019 5:29 pm

I'm not a coder either. Something like this is like through spaghetti against a wall to see if it sticks.........

Re: Denim Script

Fri Dec 13, 2019 10:31 pm

I agree.

Re: Denim Script

Sat Dec 14, 2019 1:14 am

racer-x wrote:I'm not a coder either.
Something like this is like through spaghetti against a wall to see if it sticks.........

Love the "spaghetti against a wall" trick.
:hehe

Re: Denim Script

Sat Dec 14, 2019 4:22 am

change the line into:
(plug-in-bump-map RUN-NONINTERACTIVE image denimLayer patternLayer 135.0 45.0 3 0 0 1.0 0 TRUE TRUE 2) ;;;255>1.0

Re: Denim Script

Sat Dec 14, 2019 6:39 am

@Mackenzieh
If you prefer, this is the script converted into python
fp_denim_script_py.7z
(1.03 KiB) Downloaded 121 times

Re: Denim Script

Sat Dec 14, 2019 8:45 am

Remember the script requires
diagscanline3.pat
(138 Bytes) Downloaded 73 times

Re: Denim Script

Sat Dec 14, 2019 5:59 pm

Thanks for the python version. I have the scheme version working. :)
Post a reply