Cliff terrain?

Make art for user-made content.

Moderator: Forum Moderators

Forum rules
Before posting critique in this forum, you must read the following thread:
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Cliff terrain?

Post by solsword »

I know this topic has been raised twice before, once by mesilliac and once by zookeeper, but I'm making a campaign that needs cliffs, so I thought I'd poke around to see if anyone is interested in helping out with the art. I've been trying my hand at cliffs for the last several days, with little/limited success. I've attached the best results from my efforts:
6 (out of ~30) desert-style cliff tiles. These are probably my best efforts, but still don't look good enough IMO.
6 (out of ~30) desert-style cliff tiles. These are probably my best efforts, but still don't look good enough IMO.
cliffs-dry.png (48.25 KiB) Viewed 5207 times
A single tile (plus a bit) of a cave-style cliff. I almost think that it looks reasonable when placed in a cave... but I need cliffs for outdoors :(
A single tile (plus a bit) of a cave-style cliff. I almost think that it looks reasonable when placed in a cave... but I need cliffs for outdoors :(
cliffs-cave.png (27.91 KiB) Viewed 5208 times
Sadly, they don't measure up to what I'd like (the cave variant is the better of the two, I think, but my cliffs will need to be outdoors). Existing cliff terrains also have shortcomings, including gaps between the images in a couple of places and general non-suitability for my setting. I'm looking for some cliffs that would look good with a pine forest at the top of them (in real life, I'm a bit flexible as to what Wesnoth textures get placed under the cliff overlays, but at least grassland should look reasonable). A reference picture (although I'm not constrained to this type of cliff):

http://www.jonathanstephens.com/england ... -Moher.jpg

Other things to note:

When I say "cliff terrain" I'm talking about a pair of terrains, one for north/west facing cliffs and one for south/east facing cliffs, each terrain is an alias of chasm. That is, the cliffs take up the entire hex, and are not placed at the border of the hex. The discussion about hex-border objects has been had several times already, if you post about that here, you'll be ignored or told to shut up. Thanks to mesilliac, I already have code that properly places the cliff images using the terrain graphics system. Thus, all I need now is a good set of cliff sprites. I don't need any fancy joint tiles, but that leaves all of the possible transitions for a cliff tile with one or two neighboring cliff tiles, times two for "front" and "back" variants. There are 6 variants each for 1 neighbor, and 15 variants each for 2 neighbors, for a total of 42 images (counting the doubling-up due to "front" and "back"). Technically, I don't need any of the sharpest corner variety (eliminates 12 required images), and if I were even more desperate, I could narrow down the list to exactly which variants I'm using in my map, but before that point I'd probably just use mesilliac's chasm-based cliffs. The easiest way to draw all of the required cliffs would be to draw convex cliffs in each of the 6 hexes surrounding an open middle hex, then repeat this for concave cliffs. Finally, take each of the circles that you've made and move each hex in the circle one hex directly outward from the center. Draw the connecting cliffs to complete the larger circle, making sure not to double up work because there are a total of 6 redundant connections at this level, and you're mostly done, having drawn 18 tiles. You just need to draw the 12 possible cliff-ends (1 for each of the six directions, times two for the two variants). You can do this from either larger circle by drawing over each of your straight connecting cliffs with both end variants. Then you'd just need to chop up the images and hold onto your sanity as you tried to name them all.

One final note: As was pointed out in mesilliac's thread, the terrain that you put under the cliffs (the cliffs are a strict overlay terrain, like forest or bridges in the dev version right now) shows at both the top and the bottom of the cliff. While less than ideal, this doesn't actually look bad in many situations, and so I'm not considering it a "problem" so much as an "it would be nice if". One potential solution is to use the new crop image path feature to try to code half-hex terrains for the WML... I may look into this if I have some good cliffs for it to work with. Alternatively, a bit of scripting and ImageMagick should be able to produce hard-coded cliffs for whatever terrains are desired, although their are some caveats when multiple terrain types abut the top edge of the cliff.

Anyways, as I've just pointed out, this is a significant undertaking. Armed with mesilliac's WML, I'm prepared to make sure that whatever cliffs this thread may produce work at the WML level (which to be honest probably won't involve any work at all). But as my posts demonstrate, I'm just not able to draw decent cliffs. So I'm hoping that someone else will be inspired by this and volunteer to do all of the hard work (yeah right... :lol2: ). I'm also going to continue my cliff-drawing efforts, so I'd appreciate constructive feedback from artists better than myself who have ideas about how cliffs should be drawn. I've tried to work closely with references, but my pixel-pushing skills just aren't up to par so far... :(

As another note: In my inability-to-draw-cliffs-fueled madness, I've gotten the idea of procedurally drawing cliffs. Basic results are almost approaching what I've done by hand, so maybe they could be the basis for hand-retouching that would result in a finished product. The procedurally-drawn cliffs currently look like this:
Procedurally generated cliff-faces.
Procedurally generated cliff-faces.
out.png (44.32 KiB) Viewed 5217 times
I'd appreciate comments on them, ideas about how to make them better procedurally, etc. My current technique involves picking a path for the top of the cliff and then drawing 1-pixel-thick layers with constant color below it. Every layer is missing some pixels randomly, which pulls up all of the layers beneath it. I also add some light or shadow to each column based on whether it is in front of or behind (has a larger or smaller y-value than) the neighboring columns, but some of this light is randomly missing as well. I choose the color for each layer from a bag of colors, and I make sure not to repeat colors too soon.
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: Cliff terrain?

Post by Mabuse »

yeah, cliffs.
i support this idea strongly :D

i wonder if there is a way with some color-changing magics to "convert" the, as you said resonable looking, cave-cliff into an outdoor cliff

however, i wont touch this (color changing attempt) atm, as i got a lot of other stuff to do - (for example lingering in the forums)

anyway, good idea, hope this can be realized somehow (and inspiring thread)

btw your handdrawn cliffs doesnt look THAT bad, from what i see, but you may know better how it actually looks in your map
The best bet is your own, good Taste.
User avatar
thespaceinvader
Retired Art Director
Posts: 8414
Joined: August 25th, 2007, 10:12 am
Location: Oxford, UK
Contact:

Re: Cliff terrain?

Post by thespaceinvader »

Whilst the idea is excellent (if a little difficult to implement - there's been a lot of discussions about making a dynamic cliffs terrain type which could have ranged attacks but not melee pass over it, only flying units pass over it etc etc), drawing them procedurally probably won't work, unfortunately - it could be a useful basis for a spriter to turn into cliffs, though. Currently, it just looks like a copy/pasted column of layers. Something more matching the other two examples you posted would be necessary, i fear...

/me wonders if he could find the other examples of cliff terrains that have been posted here in the past.
http://thespaceinvader.co.uk | http://thespaceinvader.deviantart.com
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Re: Cliff terrain?

Post by solsword »

thespaceinvader: You're absolutely right: I had no intention of putting procedural generation into Wesnoth: I was simply interested in using it as a basis for sprite terrains. With 30+ images to draw, having some of the work done automatically seems like a good thing, and mainly, I was frustrated with doing a lot of work on hand-drawn cliffs that came out very badly (there are several attempts of mine not worth mentioning here).

I realize that I should have linked to these in my first post, but here are the two older cliff threads (I've linked to the posts that have the graphics files attached):

http://www.wesnoth.org/forum/viewtopic. ... ff#p291945

http://www.wesnoth.org/forum/viewtopic. ... ff#p138474

Your comment about how they look bad made me want to fool around with things a bit. You're right, they do look bad, and I'll have to remedy that somehow, but 5 minutes in the GIMP spent creating basic fade transitions for the top and bottom, adding a shadow, and rendering some solid noise over the cliffs in soft light produces this result:
A quick retouch of the procedural cliff.
A quick retouch of the procedural cliff.
procedural-demo.png (73.9 KiB) Viewed 5176 times
Again, this still has a ways to go, and some of that distance probably needs to be made up by changes to the underlying generation. I'd love to hear ideas for this (anybody think of a good algorithm for generating a web of cracks?)... but this serves as a demo of how much better things can look with just a few alterations. Of course, much of the credit has to go to the desert terrain tiles placed alongside :).
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
User avatar
woodmouse
Posts: 1435
Joined: August 9th, 2008, 6:26 pm
Location: Finland
Contact:

Re: Cliff terrain?

Post by woodmouse »

If you make them great, will they be in mainline? Because I have been wishing for cliffes for a long time... And many other people too, probably.
Check out my sprites!
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Re: Cliff terrain?

Post by solsword »

I've got no objections, and would like to see cliffs in mainline myself. However, there are a couple of issues. The first and foremost is that the art quality needs to be there. And part of the reason I'm posting here is that I suspect that I'm not going to be posting any mainline-quality cliff sprites any time soon. I'm sure I'll work *something* out for my campaign, but mainline-quality is a different standard.

The other big issue is transitions. The WML that I'm using (from mesilliac's thread) just pastes the terrain as an overlay. It handles proper orientation into lines, but it doesn't change the base terrain. This means that you're constrained to having the same terrain at the top and bottom of the cliff. I don't mind this constraint, but having it might make the cliff terrain too inelegant for mainline standards. Like I said, I've thought about ways to get around it, and if there seems to be mainline potential at some point, I'll likely try them out.
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: Cliff terrain?

Post by Mabuse »

um, thx for the links, the cliffs posted by zookeeper seem a good base to start with to me, btw :D

and: sure, once you have cliffs you can start discussing wether you should be able to shoot over them and stuff, but just to haven them as a tool to design more appealing maps and add height they will work fine anyway

but as we are there - is it possible to make a terrain being entered by just one (or sevral) directions and/or excluding others ?

EDIT:
umm, and another problem is probably that you cannot look down a cliff ... so basically ...
hmm, overall the use is quite limited -

still it will better look on many maps to use cliffs than thin layers of cavewalls as a barrier (or always impassable mountains is also boring), so designwise its good to have them in any case

i also downloaded mesiliacs cliffs, im sure it wil come in handy in the future, great stuff in those threads
The best bet is your own, good Taste.
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Cliff terrain?

Post by Turuk »

For your retouch, the alterations did indeed make it better, but I think you are missing something to anchor the bottom of the cliff face to the ground visually. Right now my eye can follow it as sort of a floating ribbon and not a cliff face if I am not careful. I think this has to do with the fact that Wesnoth terrain is seen at a slight angle (not as noticeable on desert terrain of course), but my eye sees your cliff face as going straight down, flat and parallel to my screen. Then when the cliff reaches the bottom, it does not seem as if it is going into the sand but rather sitting above it.

Perhaps a change of the perspective? Zookeeper does a decent job of making the cliff appear to merge into the ground fairly well, which is achieved partially by the addition of a rough bottom with little bits of rubble while the cliff face is smooth. Possibly providing a distinct edge to the top in terms of broken terrain or visible line of the rock (similar to mesilliac) might help you out?
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
Sangel
Moderator Emeritus
Posts: 2232
Joined: March 26th, 2004, 10:58 pm
Location: New York, New York

Re: Cliff terrain?

Post by Sangel »

Just thought I'd chip in that I like what you're doing here, and that you seem to have the graphical talent necessary to achieve your aims. There's a whole lot of trickiness about cliffs that has so far thwarted their inclusion in Wesnoth, but you seem to be on the right track. :)
"Pure logic is the ruin of the spirit." - Antoine de Saint-Exupéry
User avatar
Urs
Art Contributor
Posts: 437
Joined: August 11th, 2007, 5:33 pm

Re: Cliff terrain?

Post by Urs »

Thumbs Up from me... I don't know about making it procedurally... but whatever. I don't know much about terrain things anyway. But I'm glad someone decided to tackle this head on (i.e. with art, and also gotten wml to work) rather than with idle banter and "what if" scenarios. :D
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Re: Cliff terrain?

Post by solsword »

I've made some more progress with my procedural generation methods: mostly I've just added shading, but I also finished a pattern-imitator that I'll try using to provide extra texture. A result from the new method:
Procedurally generated cliff overlaid on grassland texture.
Procedurally generated cliff overlaid on grassland texture.
cliff-demo.png (79.14 KiB) Viewed 4657 times
This image hasn't been retouched at all, besides adding the grassland tiles below the cliff image. Adding some sort of margin at the top and bottom is clearly necessary, but I'm not sure if it will be better to generate that procedurally or to just do it by hand.

In light of suggestions so far, I'm considering drawing a couple of tiny "detail" sprites and having the generator sprinkle them along the top and bottom of the cliff... but I will either need a general algorithm to cover the in-between space or I'll need to do some sort of top and bottom transitions by hand.

I'd love to hear comments on this cliff. I'm specifically interested in whether the texture of the cliff-face looks believable. Is it too shiny? Too pillowy? I'm also interested in any ideas for transitions for the top and bottom, especially ideas about algorithms to draw some basic blending so that I don't have to go over the *entire* cliff top and bottom by hand, although that's certainly an option.

Edit:
I've generated another version by overlaying some extra texture on the previous version. This step isn't completely automated yet, but it's automatable. Do people think that this version looks better or worse than the one above?
Same cliff with procedurally generated texture overlaid.
Same cliff with procedurally generated texture overlaid.
cliff-demo-extra-texture.png (79.96 KiB) Viewed 4653 times
Last edited by solsword on February 22nd, 2009, 10:47 pm, edited 1 time in total.
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
User avatar
thespaceinvader
Retired Art Director
Posts: 8414
Joined: August 25th, 2007, 10:12 am
Location: Oxford, UK
Contact:

Re: Cliff terrain?

Post by thespaceinvader »

That one looks convincingly cliff-like, much more so than the previous one. You just need to give it proper transitions.
http://thespaceinvader.co.uk | http://thespaceinvader.deviantart.com
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.
User avatar
Simons Mith
Posts: 821
Joined: January 27th, 2005, 10:46 pm
Location: Twickenham
Contact:

Re: Cliff terrain?

Post by Simons Mith »

Procedurally, I think it's very good. I'm a bit more dubious about the colour palette you've chosen. It looks like a slate cliff. In the rain. Which is fine, but it's not a common rock type, particularly for Wesnoth. And the 'wet' might be fine by a waterfall, but not normally.

Could you try a lighter grey, with the blue component turned down about 10-20%. In fact, as it's generated procedurally, could you do a spectrum of cliff colours? Sandstone might work well - perhaps try a colour about halfway between this grey one and the previous over-yellow sample you posted. Or , chalk, which would be a coarse mix of dirty greys.

Also, if your procedure can handle it, the odd random bit of green or brown might be a nice touch. Plants happily grow on cliffs after all.
 
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Re: Cliff terrain?

Post by solsword »

I've changed the way that the pattern overlays the cliff, opting for a softer feel, which I think looks better. The result:
The most recent cliff output.
The most recent cliff output.
cliff-demo.png (79.39 KiB) Viewed 4579 times
I haven't started to experiment with colors yet, but I think that that's the next step. However, I'm not a great judge of colors, so I'd appreciate help on this step from people who are more experienced. I've attached .png files containing the palettes for both varieties of cliff produced so far. The lower-contrast palette for the darker cliffs looks more natural to my eye, and the cracks texturing can be used to add some darker colors. For these palettes, the solid colors are the colors chosen randomly to compose the cliff face. The last four colors are all at least somewhat transparent, and they are the highlight color, the shadow color, the cracks color, and the border color in that order. The highlight and shadow colors are used to draw over the cliff face to produce the lighting, so they should be relatively light and dark respectively, with appropriate hues. The cracks color is used to draw a texture layer that consists of a randomized cracks pattern blended using "soft light" onto the cliff face. The border color is used to draw several pixels of partially transparent border at the top and bottom of the cliffs. This looks better against the grass background than no border, but doesn't look as good against the desert, so I'm not sure about this feature, but I think that it does make the cliff look more natural overall. This might be best if it varied according to the terrain underneath... I use a greenish hue for the dark cliffs and a yellowish hue for the desert.

In any case, I'd like help coming up with more/better palettes, so if people interested in trying their hand could PM me (to save space here) their palette ideas, I can try some out and PM results or post them here if they look good. If you have the GIMP, I have a script for reading in GIMP palette files directly, otherwise just attach a .png file like the ones I've attached here. I can put whatever terrain you want behind the cliff.

For the extra-adventurous, I'll attach a zipped copy of the code I'm using to another post (apparently there's a 3-attachment limit :( ) and you can download it and tinker around yourselves. All it needs is Python (I'm using 2.5) and PIL (the Python Imaging Library, available here: http://www.pythonware.com/products/pil/). You're welcome to tinker with it, modify it, use it for your own nefarious purposes, etc. I've GPLd it (which, to be clear, means that nefarious purposes can't include making Edit: proprietary :oops: software with it) for that purpose. The code is messy and in many places quite slow, so don't expect a shiny procedural generation library: this is hobby code at it's (ok maybe not quite) worst :oops: .
Attachments
The palette for the desert cliffs.
The palette for the desert cliffs.
palette-desertcliff.png (112 Bytes) Viewed 4577 times
The palette for the dark cliffs.
The palette for the dark cliffs.
palette-darkcliff.png (138 Bytes) Viewed 4579 times
Last edited by solsword on February 23rd, 2009, 11:38 pm, edited 1 time in total.
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
User avatar
solsword
Code Contributor
Posts: 291
Joined: January 12th, 2009, 10:21 pm
Location: Santa Cruz, CA
Contact:

Re: Cliff terrain?

Post by solsword »

As promised, here's the code for the cliffs. Again, I'd like to stress that this is hobby code... there are definitely places where I'd expect people to think "Why? Why would you *ever* do *that*?" and there are things about the code that make it much slower than it needs to be... but it is what it is, and I'm more interested in working on stuff for Wesnoth than cleaning up code that runs fast enough...

I've also attached a demo of the desert terrain using the updated algorithm:
A demo of the desert cliffs.
A demo of the desert cliffs.
cliff-demo.png (85.5 KiB) Viewed 4574 times
In my opinion it doesn't look nearly as good as the other cliff: it looks too blocky. Reducing the contrast in the palette would probably fix some of this, but I'm going to hold off on this and let other people have a shot at tinkering with colors for a bit.
Attachments
prim.zip
Zip file for "prim" containing all of the image generation code.
(80.85 KiB) Downloaded 284 times
The Knights of the Silver Spire campaign.

http://www.cs.hmc.edu/~pmawhorter - my website.

Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
Post Reply