Changelog - picture heavy

Started by Andy ONeill, January 02, 2018, 02:08:07 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dr D Ezra Sidran

Our Indiegogo half off pre-release sale is about to end. To take advantage of reserving the General Staff Wargaming System (Army Editor, Map Editor, Scenario Editor + Game) for half off the retail price (i. e. the Steam price) please see:
https://www.indiegogo.com/projects/general-staff-wargaming-system#/

Andy ONeill

Hill Shaper

Fix ( rather nasty ) bug in calculations when X dimension was bigger than Y.
Avoid error when part of hill is off map.
Give a warning the hill process can take a while to process.

Experimental work on drawing ridges / valleys.
Assuming I can get a practical version working...
The idea is you would define a width for the ridge and where the ridge line is in relation to that.
And a peak height.
You then draw a ridge line.

All

Added Compass Rose.


As usual, this is a first cut.
It's in one of the shared libraries but as yet only used in MapEditor.
The google process now also calculates the angle to north.
Still need to allow the user to rotate in map editor, use in scenario editor and decide when it's appropriate to be shown.

bayonetbrant

Hills look nice.  Not necessarily the most realistic, but appropriate for the game :)
The key to surviving this site is to not say something which ends up as someone's tag line - Steelgrave

"their citizens (all of them counted as such) glorified their mythology of 'rights'...and lost track of their duties. No nation, so constituted, can endure." Robert Heinlein, Starship Troopers

Andy ONeill

Thanks.

You raise a good point there.
It's worth bearing in mind there are different audiences with different expectations.
We want to support all of them as well as we can.
These hills will not be for everyone.
There again, real hills won't be for everyone.
These aren't the droids hills you're looking for?
Then there are other options.

Shapers... most of them... aren't really intended to be used for complicated "realistic" maps.
If you just want a big valley and or 3 or 4 simple hills for a quick game then wham bam they'll do that fairly painlessly.
If you want to "fix up" slightly a set of elevations you have already drawn or imported then they'll do that.

The only shaper I think I'm personally likely to use would be the flatten.
Erasing motorways and lions mounds.
I think I'd rather pick a random piece of the real world rather than draw stuff.
But that's just my personal preference.

The "best" way to get a realistic map elevation-wise is google data.
There will also be an interface allows you to import data you obtain from any other source.
At best that is likely to be way less convenient than google.

Different people have different expectations or real though.
If you want maps that match historical maps you see in books then you will find some of these are sketch maps and don't match reality so well.
People have probably been "making stuff up" about battles ever since someone tied a sharp rock on the end of a stick.
Reality changed as well - some battle sites are now heavily urbanised, drained and developed or whatever and the landscape has changed a fair bit.
If current reality doesn't match expectations then photoshop and a greyscale image are your best bet.
You need skillz to use that stuff properly though.
Not my thing.
Ed-the-graphics-guy is a whizz at that sort of stuff though.

If you don't do photoshop then there's drawing contours.
I should think most people will only be using contours for fairly simple requirements.

bayonetbrant

I was just commenting on how they looked on the screen, which I think will make them imminently playable.

I'm totally fine getting detailed with maps

(see attached sample from one of my older games :) )
The key to surviving this site is to not say something which ends up as someone's tag line - Steelgrave

"their citizens (all of them counted as such) glorified their mythology of 'rights'...and lost track of their duties. No nation, so constituted, can endure." Robert Heinlein, Starship Troopers

Andy ONeill

Compass Rose

Now fully implemented in both map editor and scenario editor


The angle defaults to straight up.
Angle to north is calculated for you when you use google data.
You can (also) rotate it using the mouse scroll wheel (only) when the edit terrain tab is selected.
Uncheck the menu option and it's gone.

Andy ONeill

Ridges

Proof of concept. This is in a totally separate experimental solution.
This works using greyscale which will then be interpreted into elevation to add ( a negative peak will give valleys ).

You draw a line which is then processed to add progressively bigger layers of the same shape.
You can choose to have just a rounded end or "pointy" and narrowing from where you start drawing to the end.
Pointy ones also need to have the narrow lines shortened. This is because ink draws using numerous circles, whose diameter is the width of the line.  Reduce the width and you increase how steep the narrow end would be.

The layers's z index is adjusted so later lines don't have "lower" layers on top of higher ones.
In this way you can draw a set of connected ridges or river valleys.
The layers will then be blurred like they are in the contours processing.
That would also even out some of my wobbly drawing.

The sliders in my proof of concept control how blurred everything is ( zero for this screen shot so you can see the layers ).
Also how wide the line is drawn.
I had to reduce the width to draw the two pointy ridges connected to the bigger main one.



When you draw in the map editor, there will be no visible black background. That'll be added very briefly as you commit.  It's black in the proof of concept so I can see what it'll look like.

Andy ONeill

Improving smoothness of drawn ridges.


Ink is a bit strange.
There's a two stage process. If you watch closely your line is initially drawn with whatever squiggles and jiggles you draw.
Once you finish a line it is then redrawn with any smoothing.
If you watch closely you can see it seems to move.
In order to grab that smoother ink I need to defer processing input until after that smoothing is finished.
Which I've now done.
I deliberately tried to add jiggly awkward bits when drawing those ridges and they're still smoothed out.

Andy ONeill

Ridges

First iteration of ridges in map editor.
You draw a ridge line.
The settings you have are then used to build ten layers in greyscale black ( for low ) through to white ( for the peak ) for a ridge.
One of the sliders lets you control how blurred the picture you're drawing is.
You adjust that until you can't see any steps in the greys.
This has to be manual because there are way too many variables to attempt to do it automagically.

You can choose to have just a rounded end on a ridge.
Which would probably do for simple stylised hills.
Alternatively, you can make it tapered - much more natural.

If you choose a negative value for the peak then it'll gouge out a valley.
You'd want to raise the base level first of course...  coming soon.... you'll be able to do that with another shaper.

I've not been particularly careful with these, you can easily do more natural looking shapes.
You can draw any number of shapes you like.
There's an undo button which will remove them last first.
Meaning you can try something and see what it looks like, undo, give it another go.
You'll definitely want that when drawing a ridge attached to another in order to get it looking good.

The sliders have tooltips that say what they do.
I left off headings to save space but I may add small headings as well.





Once you commit by clicking Apply then the hypsometric representation is recalculated.
Note that these hills valleys and the like don't have any "look" other than this hypsometric representation.



Andy ONeill

Bug Fix Scenario Editor
Close button on edit movement rates was left justified.
I have no idea how that crept in.

Map Editor
Added labels on ridge shaper sliders


Raise Shaper.
This applies the value across the whole map.
If you check the checkbox, it will add to all cell values.
If you un check the checkbox it will set all cell values.

You can therefore reset the elevations completely if you've made some sort of a mistake.
You need some elevation before you can "gouge" anything out of it.
Negative elevations are not supported and something to be avoided.
You would therefore want to use this before using any shapers with negative values for dips or valleys.

Andy ONeill

Map Editor

Cone shaper.

This is an ellipse shape rather like a hill, but way faster.

The downside being it's kind of cone shaped rather than the more natural rounded shape of the hill shaper.
By maxing out the blur you can effectively alter that shape by blending everything in and get a more rounded effect.

You can alter height and width, the mouse scroll wheel rotates the ellipse.
You click and hold - drag the ellipse to where you want it and right click to add one.
You can add any number.
Apply then uses greyscale manipulation and the value you set as usual to add the various elevations to the relevant cells.



Because these are additive, you can use shapers together to give more complicated results.
EG
Several connected ridges are best done in one go but you will have the same height along them, tapering off towards the end.
If you draw several connected.


Here I've drawn tapered ridges from the center out.

I then position a large sized cone in the middle and add that.


I now have a mountain with reasonably realistic ridges.

I can then refine that by gouging out valleys or do another one.



Andy ONeill

Map Editor

Bug Fix.
Avoid error if you try and drag a shaper you can't drag

Gradient Shaper


This applies a linear gradient in the direction of the arrow.
By linear  -  this would be a straight line in cross section.
This shaper is intended for fairly gradual changes in elevation across the entire map.  For natural results you should probably only use it the once on a given map.
If you used this from the top down and then from the bottom up, you'd get a rather unnatural sort of V shaped valley across the map.
If the values added were relatively low and or you then did a bit more land sculpting you may not particularly notice how unnatural that was.

You can rotate the gradient using the scroll on your mouse, whilst over the gradient on the map.
White is always highest so in this picture I've rotated through 130 degrees or thereabouts.
The highest part is the white and bottom right corner.
Lowest is top left.



When you click apply the gradient still covers the map so you can't really see it's done anything much.
The hypsometric representation for this looks like:



This is additive so you could draw a river valley and apply a gradient to that before or after so the water is flowing downhill.

Andy ONeill

Brow Shaper

This is intended to give you a long hill brow which can extend at any angle across the map.
You can use two of these to give you a valley.

The Breadth of the brow is how far it is between the bottom and top of the brow.  If that's a low amount it's steep, larger distances mean a more gradual slope.
The slope itself is calculated using smootherstep as explained in a previous shaper. It eases off the slope at the top and bottom.
You can rotate using the mousewheel and drag using click and hold.
It's possible to position the brow in a way doesn't cover the whole map - it's up to you to ensure that doesn't happen.

Let's create a brow across the north part of the map.
Drag the brow up.

Click apply.

Rotate it and drag down.

Apply that.

Giving





Andy ONeill

Custom Shaper

This works using a picture file you create. Since this is converted to greyscale internally you could theoretically use a coloured picture but I'd recommend drawing in grey and white.
It can be any size you like.
Clicking the open file button lets you select your file.
The Scale slider lets you scale it up or down.
You can rotate your loaded picture using the scroll wheel and drag it around.

For demonstration purposes I created a file in MS Paint.
I started by flood filling in black.
I then used the spray can to draw an interesting sort of ridge in white, outlined that in grey and then dark grey.
I then opened the file in paint.net and flood filled the background black as transparent.
Saved the file as png.

This is the result:


Because the spray can sprays loads of dots this is fairly heavily textured.

Opening it in the map editor , I can then set blur on it which smooths out that texture:


Blur is effectively optional since you can set it to zero but I'd want a cleaner picture if I was doing that.
This way I can work quick and dirty.

I then clicked apply, moved the shape off to one side and scaled it down a bit.





Andy ONeill

In seconds you can knock together a picture with some small hilly bits in it.


Applying these a few times, you can rough up the map for a bit of interest.



You'd maybe want bigger hills or lower values - there's a lot of valleys to hide in there.