Gimp-Forum.net
Autocad hatch - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Autocad hatch (/Thread-Autocad-hatch)



Autocad hatch - Gabe - 11-06-2023

So I'm building a custom Cad hatch fill pattern for a software I use and like to make the individual travertine stones look like they have a little bit of depth. See attached. I was able to piece together one single stone with three or four different actions but, what a pain. Anyone know a quick way to do this?


RE: Autocad hatch - rich2005 - 11-06-2023

You could try Bump Mapping

Duplicate the pattern to a new layer Layer -> New Layer
Apply Colors -> Threshold to get black dividing lines on white.
Apply Filters -> Blur -> Gaussian blur with a small value
Hide this layer
Onto the original layer and apply Filters -> Map -> Bump Map using the top layer as the Aux Input.
Adjust sliders to suit.

This a 50 second animation of that https://i.imgur.com/zHrK9xr.mp4 Probably too much blur on the bump map, it is just a demo. Just experiment.


RE: Autocad hatch - Gabe - 11-06-2023

Rich, I sent you an email


RE: Autocad hatch - rich2005 - 11-06-2023

You want it "...so the edges are black instead of white?" Getting depth on a flat image always involves a light direction with a light side and a shadow side. Looking again at your image, maybe a bevel will work. Applied twice from opposing directions to give a uniform effect.

[attachment=10562]

This is using an old script gt-bevel299b.scm (attached) Unzip and put in your scripts folder C:\Users\"yourname"\AppData\Roaming\GIMP\2.10\scripts It registers in the Filters -> Decor menu. looks like this.

[attachment=10563]

The procedure is:
Select the squares. You can use any method you like but the threshold'd black lines on white is a good option for a color select.
Switch to the pattern layer
Apply the gt-bevel script. Repeat the gt-bevel script with the light direction reversed.

If you keep the effect as a separate layer, it is possible to adjust, make it darker.

Again a quick demo https://i.imgur.com/TDO08ek.mp4 50 seconds, do not blink.

There will be other ways. Keep looking in, maybe someone else will contribute.