PDA

View Full Version : Natural-looking, rugged cavern walls automatically generated by a line in Photoshop?



Mapspork
09-04-2013, 11:52 AM
Hi guys! Maybe this question is sort of silly, but I thought it was worth a shot anyway. If anyone would know how to do this, you guys would. I searched a bit but couldn't find any info on this.

Is there any way in Photoshop to automatically "corrupt" a line to make it look like a natural cavern wall? Essentially, drawing a smooth line and then crinkling it.

Of course I could just draw this manually, but often you can get some great natural effects by using randomness in Photoshop, and I was just wondering if there was some technique I didn't know about, or if some technique could be devised.

This is basically what I am wondering about:

http://i.imgur.com/tyVDew4.jpg

Any thoughts?

RobA
09-04-2013, 12:54 PM
It would be difficult to distort lines without them getting broken up, but it is very possible to distort spaces. - i.e. solid is black and open (coridoors and rooms) is white. Then distort using one of many options (displacement mapping, noise, water, etc). Then magic wand select the black regions invert and fill with white (to get rid of any non-connected bits caused by the distortion) and majic wand the white then invert and fill with black. To get back to lines, just do an edge detect, or stroke the selection on a blank layer.

This is basically what the distortion option does in my gimp dungeon maker script.

You should be able to make it a Photoshop action - someone more PS savvy should be able to give more information.

-Rob A>

Mapspork
09-04-2013, 01:21 PM
It would be difficult to distort lines without them getting broken up, but it is very possible to distort spaces. - i.e. solid is black and open (coridoors and rooms) is white. Then distort using one of many options (displacement mapping, noise, water, etc). Then magic wand select the black regions invert and fill with white (to get rid of any non-connected bits caused by the distortion) and majic wand the white then invert and fill with black. To get back to lines, just do an edge detect, or stroke the selection on a blank layer.

This is basically what the distortion option does in my gimp dungeon maker script.

You should be able to make it a Photoshop action - someone more PS savvy should be able to give more information.

-Rob A>

That's true, and that's fine for my purposes, it doesn't have to be a line.

I'm looking to create mostly one or two tile corridors for ease of use in play, but that still look somewhat natural.

The important thing is that it is directed randomness...there are a lot of tutorials for using clouds or other methods to generate landmasses and such, but these are usually completely random and you find an island that you like.

I suppose I could do something fairly similar, generate islands and look for a generally straight line and use it. But I'd like to know more about good distortion options using the method you mention.

RobA
09-04-2013, 03:09 PM
Just google for "photoshop displacement map" and you will find examples of how to create a displacement map from an image (or noise) and use apply that to a source image (your wall lines).

-Rob A>

Mapspork
09-04-2013, 03:24 PM
Alright, thanks, I'll see what I can find.

Actually your Subterranean Map Prettier looks awesome and exactly what I wanted, I might try out Gimp!

Does your script do some pretty complex stuff under the hood, or is it something that could be replicated by a series of instructions?

Mapspork
09-05-2013, 07:15 AM
I feel dumb, just took some more playing around to realize that Photoshop's pixelate -> crystalize filter is great for this.

Make walls black on white, crystalize with a high number, crystalize again with a lower number to break it up further, adjustments -> threshold to reduce again to black and white and you have a jagged mask you can use on anything.

57460

Also I didn't notice you were an admin before! Thanks for taking the time to reply to me even during yesterday's problems with the site.