Feature requests - Page 4

Feature requests

gajop's in-engine scenario and map editor

Moderators: Moderators, Content Developer

aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

gajop wrote: You should have things like this in your config:
LinkIncomingMaxPacketRate = 64000
LinkIncomingMaxWaitingPackets = 512000
LinkIncomingPeakBandwidth = 32768000
LinkIncomingSustainedBandwidth = 2048000
LinkOutgoingBandwidth = 65536000
MaximumTransmissionUnit = 140000
Derp ok, now I got it working. :P The slowdown due to recalculating the pathing is very obvious in shape mode. I also obviously need to fix most of the brushes so that they don't produce square edges. That's not a huge problem though. One thing I noticed is that it seems to produce distortions due to the perspective changing as the terrain changes. Camera orientation seems to be very important for avoiding that, but I think an auto-align widget would be a better solution. Coming up with a sensible interface for that is an exercise for another time. I also noticed that scened seems to be able to ignore the max height limit set in mapinfo.lua (I guess ZK terraform can too, then). I'm not sure if that's a good thing or not, but I could see it leading to strange results.
gajop wrote:They work differently and can be used in combination, thus separate options.
Ah that's true. XD Not really a big deal though, since its main usage is normal mode anyway.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

Other issues I noticed. Sometimes terrain shape operations fail to make it to the undo/redo stack, which is problematic. General raise/lower scaling doesn't make much sense either. The highest setting isn't enough in some situations, and if you could get it scaled just right with a single click then the need for a fancy alignment widget could probably be avoided. I think height should also obey mapinfo.lua for consistency. The ability to edit mapinfo.lua from within scened is something I've thought about as well, although with text entry broken in ZK that wouldn't be very practical atm. I don't know if things like lighting changes can be updated in game or not, either, or if that would have performance/consistency issues. There is dynamic sky, so maybe, but the fact that mapinfo.lua is lua may complicate things.

Now to sort out my own to-do list..

EDIT: argh I take that back, the easiest way to make a volcano is still to line up the same brush over the same spot and use lower to create the caldera.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

aeonios wrote:The slowdown due to recalculating the pathing is very obvious in shape mode.
It's slow in the first few frames as it loads the height brush. This is not something that's easy to work around. It would probably be faster if I cached all those values so and bundled it with scened, but it's not a route I plan to take right now.

Also, the initial calculation will get a bit more slower when I introduce interpolation, but will get rid of the noisy effects which you may notice if the height brush is large.
aeonios wrote:I also obviously need to fix most of the brushes so that they don't produce square edges. That's not a huge problem though.
I think I can make them have a falloff with distance, but tests have shown uwanted effects, so yeah do that. Also it might be best to invert some images.
aeonios wrote: One thing I noticed is that it seems to produce distortions due to the perspective changing as the terrain changes. Camera orientation seems to be very important for avoiding that, but I think an auto-align widget would be a better solution. Coming up with a sensible interface for that is an exercise for another time.
Fixed. Check out the new behavior.
aeonios wrote: I also noticed that scened seems to be able to ignore the max height limit set in mapinfo.lua (I guess ZK terraform can too, then). I'm not sure if that's a good thing or not, but I could see it leading to strange results.
wontfix -> if people don't want to increase the heightmap above a certain height, then they just bloody well shouldn't. Any other behavior (such as invisible ceilings) would just make the map maker's job hard. Saving/exporting the map should modify the mapinfo.lua values accordingly.
aeonios wrote:Other issues I noticed. Sometimes terrain shape operations fail to make it to the undo/redo stack, which is problematic.
Fixed. (I should probably note that I knew about both issues as I coded it :oops: )
aeonios wrote: General raise/lower scaling doesn't make much sense either.
Fixed (this one is new though!).
aeonios wrote: The highest setting isn't enough in some situations, and if you could get it scaled just right with a single click then the need for a fancy alignment widget could probably be avoided.
Increased the range. Also, kinda wish those trackbars were logarithmic in scale. It's kinda hard to get a small value now.
aeonios wrote: The ability to edit mapinfo.lua from within scened is something I've thought about as well, although with text entry broken in ZK that wouldn't be very practical atm.
Maybe as a way of exporting it, although it should fill the necessarily fields itself.
ZK merged my pull request so it should be usable. (I can confirm it works for me).
aeonios wrote: I don't know if things like lighting changes can be updated in game or not, either, or if that would have performance/consistency issues. There is dynamic sky, so maybe, but the fact that mapinfo.lua is lua may complicate things.
Ideally I want to allow sky/water editing too, it's planned as a part of this release.
Not sure what else is in mapinfo.lua
aeonios wrote: EDIT: argh I take that back, the easiest way to make a volcano is still to line up the same brush over the same spot and use lower to create the caldera.
What :?: 8)
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

gajop wrote:It's slow in the first few frames as it loads the height brush. This is not something that's easy to work around. It would probably be faster if I cached all those values so and bundled it with scened, but it's not a route I plan to take right now.

Also, the initial calculation will get a bit more slower when I introduce interpolation, but will get rid of the noisy effects which you may notice if the height brush is large.
Ah, interpolation. That explains a lot. :P
gajop wrote:I think I can make them have a falloff with distance, but tests have shown uwanted effects, so yeah do that. Also it might be best to invert some images.
Alright I sorted that out along with some other texture stuff and pushed that.
gajop wrote:
aeonios wrote: One thing I noticed is that it seems to produce distortions due to the perspective changing as the terrain changes. Camera orientation seems to be very important for avoiding that, but I think an auto-align widget would be a better solution. Coming up with a sensible interface for that is an exercise for another time.
Fixed. Check out the new behavior.
Whatever you did seems to work well enough.
gajop wrote:wontfix -> if people don't want to increase the heightmap above a certain height, then they just bloody well shouldn't. Any other behavior (such as invisible ceilings) would just make the map maker's job hard. Saving/exporting the map should modify the mapinfo.lua values accordingly.
I think it should at least be an option. I think it would also be fair to have a mode where the absolute pos/neg limits of spring are the only limits. Even in world machine they actually suggest setting height limits before building your terrain in their manual though. The 'invisible ceiling' can also be useful for creating certain effects, I think I'll make up a quick demo so you can see what I'm talking about. :P
gajop wrote:
aeonios wrote:Other issues I noticed. Sometimes terrain shape operations fail to make it to the undo/redo stack, which is problematic.
Fixed. (I should probably note that I knew about both issues as I coded it :oops: )
Confirmed working.
gajop wrote:
aeonios wrote: General raise/lower scaling doesn't make much sense either.
Fixed (this one is new though!).
I still think you should just use elmos. With a standard cursor and space bar you can actually measure heights in elmos in game, which is one of the big reasons I want to use scened. I mean it does work a bit better, but what if I want a 1250 elmo high mountain? or 750? Those are numbers that have meaning to me after having made only two maps. (well, and a third that was never finished or released)
gajop wrote:Increased the range. Also, kinda wish those trackbars were logarithmic in scale. It's kinda hard to get a small value now.
Pulling the latest ZK from ZKL into spring lobby fixed text entry, which helps a lot with that. One thing that sucks though is since brush intensity is shared between all brushes you lose whatever settings you had if you have to switch to a different mode that requires a different intensity.
gajop wrote:
aeonios wrote: The ability to edit mapinfo.lua from within scened is something I've thought about as well, although with text entry broken in ZK that wouldn't be very practical atm.
Maybe as a way of exporting it, although it should fill the necessarily fields itself.
ZK merged my pull request so it should be usable. (I can confirm it works for me).
aeonios wrote: I don't know if things like lighting changes can be updated in game or not, either, or if that would have performance/consistency issues. There is dynamic sky, so maybe, but the fact that mapinfo.lua is lua may complicate things.
Ideally I want to allow sky/water editing too, it's planned as a part of this release.
Not sure what else is in mapinfo.lua
See above. Mapinfo.lua also contains things like map name, credits, links to resource files such as splats, emits, normals, speculars etc, water, sky and other atmosphere settings (ie fog), ground hardness, terrain types, and start locations. It also contains settings for other widgets like precipitation and fog machine (which is distinct from the fog setting in atmosphere). If you were using mapconv as a backend compiler, you'd also have to specify links to the smf and smt files in mapinfo.lua, since the map files it generates don't work otherwise for whatever reason. You can take a look at the mapinfo in the demo I made to see the usual settings.
gajop wrote:
aeonios wrote: EDIT: argh I take that back, the easiest way to make a volcano is still to line up the same brush over the same spot and use lower to create the caldera.
What :?: 8)
This: https://www.dropbox.com/s/s8qncssmw59wz ... o.sd7?dl=0

One mountain was raised to the 'invisible ceiling' to flatten the top, the other the same except then it was lowered using the same shape to create a 'volcano'. I used sand because it was the only thing that didn't look like utter garbage that I actually had in SME. :P
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

I also did a bit of digging into WICed. WICed's terrain features are actually pretty good. Aside from other typical modes they also have ramp and road tools which would be really useful. BTW, I had also intended brush shapes to be usable in any mode (with some exceptions). I can add a hard circle and fuzzy square brush so that the 'add', 'square' and 'shape' modes would all be basically equivalent. Smooth, level and set modes could also probably use shapes, just not fuzzy shapes.

The way WICed does textures on the other hand is rather.. complicated. Basically they use distribution textures for splatting diffuse textures onto the map, which is then rendered. That requires making distribution textures in gimp or photoshop, which is also rather far from WYSIWYG.

I had some different ideas about how to approach that. One thing that struck me about aberdeen was how well the cliff textures were lined up with the very-irregular-shaped cliffs that also curved around at least 180 degrees. I think both terrain and texture brushes should have a rotation option, preferably in either 1 degree or 5 degree increments (5 might be more practical), and also an option to have the brush always point 'uphill', so that you can align things like brick walls and cliff textures easily along arbitrary slope directions. I dunno about hotkeys for all that though, since both control and alt+mousewheel are already assigned to camera actions.

A texture x,y alignment option would also be useful, for example if you wanted to line up the center of a fractal with the terrain at a given location. (I plan to make a map out of this as soon as glowfx are available :P)
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

aeonios wrote: Ah, interpolation. That explains a lot. :P
This is the difference between interpolation off and on. For the demonstration, I downscaled the heightmap brush size to 32x32 from 256x256 so it becomes a lot more apparent.
screen00007.png
(3.08 MiB) Not downloaded yet
(I realize now that I should've probably used a different camera, but I think it's still clear).
aeonios wrote: Alright I sorted that out along with some other texture stuff and pushed that.
These are all much better now. I think we need some to make rivers as well.
aeonios wrote: I still think you should just use elmos. With a standard cursor and space bar you can actually measure heights in elmos in game, which is one of the big reasons I want to use scened. I mean it does work a bit better, but what if I want a 1250 elmo high mountain? or 750? Those are numbers that have meaning to me after having made only two maps. (well, and a third that was never finished or released)
I've added a "precise map editing controls" issue. I've yet to decide how this gets implemented though.
aeonios wrote:Pulling the latest ZK from ZKL into spring lobby fixed text entry, which helps a lot with that. One thing that sucks though is since brush intensity is shared between all brushes you lose whatever settings you had if you have to switch to a different mode that requires a different intensity.
Looking at it from another angle, that way you don't have to keep changing your brush settings, and your "current" setting persists.
I could make it keep a setting per brush, and maybe even have custom brushes that can be saved (can also make it persist through game start/end) - which sounds like a better option to me.
I kinda want to try making a map on my own to try and figure out how best to optimize these things.
aeonios wrote: See above. Mapinfo.lua also contains things like map name, credits, links to resource files such as splats, emits, normals, speculars etc, water, sky and other atmosphere settings (ie fog), ground hardness, terrain types, and start locations. It also contains settings for other widgets like precipitation and fog machine (which is distinct from the fog setting in atmosphere). If you were using mapconv as a backend compiler, you'd also have to specify links to the smf and smt files in mapinfo.lua, since the map files it generates don't work otherwise for whatever reason. You can take a look at the mapinfo in the demo I made to see the usual settings.
The main issue right now is editing those values ingame. Most options are not available so I'll work to extend the Lua API there.
Saving to mapinfo.lua is not a problem, but I want to avoid blind editing (changing those values without seeing how they look), as it defeats the purpose of using scened.
aeonios wrote: This: https://www.dropbox.com/s/s8qncssmw59wz ... o.sd7?dl=0

One mountain was raised to the 'invisible ceiling' to flatten the top, the other the same except then it was lowered using the same shape to create a 'volcano'. I used sand because it was the only thing that didn't look like utter garbage that I actually had in SME. :P
Could've just used the SME equivalent of the level command.
I'm still not convinced limiting the height is needed while editing with brushes. Imo, it's only useful when generating the map, but that's a different concept entirely.
aeonios wrote:I also did a bit of digging into WICed. WICed's terrain features are actually pretty good. Aside from other typical modes they also have ramp and road tools which would be really useful.
Ramp will be added. Road is rather advanced and along with walls, probably won't be added in this milestone.
aeonios wrote: BTW, I had also intended brush shapes to be usable in any mode (with some exceptions). I can add a hard circle and fuzzy square brush so that the 'add', 'square' and 'shape' modes would all be basically equivalent.
If a higher quality circle were to be added, the default one might be dropped, but as it is, the implementation I have is a bit more accurate. (Speed is same once the shape gets loaded).
I guess this would make us have only add, smooth and level, which wouldn't be a bad thing (a simplified interface is always good).
I'm not sure how shapes would be used for smooth or level.
Set will be added, and shapes obviously make sense here.
aeonios wrote: I had some different ideas about how to approach that. One thing that struck me about aberdeen was how well the cliff textures were lined up with the very-irregular-shaped cliffs that also curved around at least 180 degrees.
Editing normals would help here.
aeonios wrote: I think both terrain and texture brushes should have a rotation option, preferably in either 1 degree or 5 degree increments (5 might be more practical), and also an option to have the brush always point 'uphill', so that you can align things like brick walls and cliff textures easily along arbitrary slope directions. I dunno about hotkeys for all that though, since both control and alt+mousewheel are already assigned to camera actions.
Agreed about adding it. Leaving hotkeys aside, it can always be added as a numeric option for now.
aeonios wrote: A texture x,y alignment option would also be useful, for example if you wanted to line up the center of a fractal with the terrain at a given location. (I plan to make a map out of this as soon as glowfx are available :P)
Will add this too.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

gajop wrote:This is the difference between interpolation off and on. For the demonstration, I downscaled the heightmap brush size to 32x32 from 256x256 so it becomes a lot more apparent.
screen00007.png
(I realize now that I should've probably used a different camera, but I think it's still clear).
I think those brushes are so large that even at the maximum scale they still produce sharp artifacts. :P That's a major difference even at a tiny scale though.
gajop wrote:These are all much better now. I think we need some to make rivers as well.
Added rivers and crevice brushes to my to-do.
gajop wrote:I've added a "precise map editing controls" issue. I've yet to decide how this gets implemented though.
Appreciated. Being able to edit the min/max height in game (respecting water level as well) would be optimal, but that's part of mapinfo.lua.
gajop wrote:Looking at it from another angle, that way you don't have to keep changing your brush settings, and your "current" setting persists.
I could make it keep a setting per brush, and maybe even have custom brushes that can be saved (can also make it persist through game start/end) - which sounds like a better option to me.
I kinda want to try making a map on my own to try and figure out how best to optimize these things.
Custom brushes might be the best solution. They're a bit more complicated to use but they ensure that you never lose your settings. It might be best to associate them with the maps that they're used on, ie as part of the map 'source', since they may only be reusable within that scope.

Also, I think making a map would be awesome for learning more about how the tools are used. Do you have anything in mind, like even a vague concept of what you think would be cool for a map?
gajop wrote:The main issue right now is editing those values ingame. Most options are not available so I'll work to extend the Lua API there.
Saving to mapinfo.lua is not a problem, but I want to avoid blind editing (changing those values without seeing how they look), as it defeats the purpose of using scened.
Urg, engine limitations. Good luck I guess. :P
gajop wrote:Could've just used the SME equivalent of the level command.
I'm still not convinced limiting the height is needed while editing with brushes. Imo, it's only useful when generating the map, but that's a different concept entirely.
Set and level tend to produce rigid shapes and more contrast than hitting the 'ceiling' does. SME's set brush is square only, which is even worse. I wasn't able to do the same thing in scened because of that. :| Note how the shape of the flat topped mountain has a mountain-shaped outline. That's ultimately what becomes the neat caldera.
gajop wrote:Ramp will be added. Road is rather advanced and along with walls, probably won't be added in this milestone.
Road would indeed be complicated, but walls should be fairly easy. It would be a little more complicated if you wanted the wall to follow the height of the underlying terrain, but not that much more complicated.
gajop wrote:If a higher quality circle were to be added, the default one might be dropped, but as it is, the implementation I have is a bit more accurate. (Speed is same once the shape gets loaded).
I guess this would make us have only add, smooth and level, which wouldn't be a bad thing (a simplified interface is always good).
I'm not sure how shapes would be used for smooth or level.
Set will be added, and shapes obviously make sense here.
Smooth and level are probably fine as is. I think set might benefit from something a little more sophisticated than just shapes. I've been playing around with world machine a bit and figured out quite a few things. One of the things it does is let you draw shapes with natural looking 'fractal' edges, which is really difficult to use in WM because of the absurd scaling, but could be adapted without too much trouble I think.
gajop wrote:Editing normals would help here.
I can think of quite a few uses for those, too. It'll take some experimentation to see what looks best in what situation though.
gajop wrote:
aeonios wrote: I think both terrain and texture brushes should have a rotation option, preferably in either 1 degree or 5 degree increments (5 might be more practical), and also an option to have the brush always point 'uphill', so that you can align things like brick walls and cliff textures easily along arbitrary slope directions. I dunno about hotkeys for all that though, since both control and alt+mousewheel are already assigned to camera actions.
Agreed about adding it. Leaving hotkeys aside, it can always be added as a numeric option for now.
aeonios wrote: A texture x,y alignment option would also be useful, for example if you wanted to line up the center of a fractal with the terrain at a given location. (I plan to make a map out of this as soon as glowfx are available :P)
Will add this too.
More awesome. It's ridiculous how fast you get some of this stuff working.

Some other things that I learned from world machine. Erosion is very important for getting natural looking terrain. It probably makes up most of the effect you get from WM, aside from the texturing tools. I also figured out how to use the erosion tools in SME, which it turns out work surprisingly well if you know what you're doing. SME has whole map smooth, water erode and thermal erode, all of which are extremely useful. Water erode is also very slow both in SME and in WM, and thermal erode has to be applied many times in SME to get a decent effect. With the path recalculation issue obviously all of that stuff would be slower in scened, but I figure if you can combine operations (like several repetitions of water erode and several more of thermal, plus a post smoothing) you might be able to avoid excess recalculations. I hope, anyway.

TBH I think I'd be willing to sit through the lag just to be able to have arbitrary terrain brush sizes. It would have to be really slow to be any worse than not having undo/redo in SME, and as is SMEs brush size goes much larger. Note also that SME has an 'erode' brush mode, but that's basically useless since natural erosion always acts uniformly over the terrain.

I've started experimenting with getting fairly realistic cliffs/canyons/mesas, and the results are very promising if I can figure out how to texture it well.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

aeonios wrote:I think those brushes are so large that even at the maximum scale they still produce sharp artifacts. :P That's a major difference even at a tiny scale though.
Even so, it helps, and means we can use low res height brushes.
aeonios wrote:Do you have anything in mind, like even a vague concept of what you think would be cool for a map?
Not at the moment. I've only been thinking about adding map effects that would make them feel more alive, but nothing regarding the layout.
Just to be clear, I would advise against using scened until 0.5 gets released. There are many critical issues still in need of resolving that would drastically improve the quality of the editor.
aeonios wrote:Road would indeed be complicated, but walls should be fairly easy. It would be a little more complicated if you wanted the wall to follow the height of the underlying terrain, but not that much more complicated.
It really depends what kind of roads/walls you want to allow. It would be trivial if you constrained them to just north/south/east/west facing, made no variations, allowed only two side connections and used a fix size.
However if you lifted any of those restrictions and we were suddenly talking about curved walls/roads of arbitrary size that can be linked in multiple directions and even be of different height.. then it becomes hard.
Both features would also be pretty game specific, and afaik, no Spring game relies on either.
aeonios wrote:I think set might benefit from something a little more sophisticated than just shapes. I've been playing around with world machine a bit and figured out quite a few things. One of the things it does is let you draw shapes with natural looking 'fractal' edges, which is really difficult to use in WM because of the absurd scaling, but could be adapted without too much trouble I think.
How is this different than just custom shapes? Creating those would fall out of scened scope and users that are advanced enough to create those might as well do so in image editors.
aeonios wrote: Some other things that I learned from world machine. Erosion is very important for getting natural looking terrain. It probably makes up most of the effect you get from WM, aside from the texturing tools. I also figured out how to use the erosion tools in SME, which it turns out work surprisingly well if you know what you're doing. SME has whole map smooth, water erode and thermal erode, all of which are extremely useful. Water erode is also very slow both in SME and in WM, and thermal erode has to be applied many times in SME to get a decent effect. With the path recalculation issue obviously all of that stuff would be slower in scened, but I figure if you can combine operations (like several repetitions of water erode and several more of thermal, plus a post smoothing) you might be able to avoid excess recalculations. I hope, anyway.
All of that is great, but it's not something planned for the current milestone. It's rather advanced and focuses on map generation, which while awesome, is also a different approach than what I've been doing for now.
aeonios wrote: TBH I think I'd be willing to sit through the lag just to be able to have arbitrary terrain brush sizes. It would have to be really slow to be any worse than not having undo/redo in SME, and as is SMEs brush size goes much larger. Note also that SME has an 'erode' brush mode, but that's basically useless since natural erosion always acts uniformly over the terrain.
For now, I'd be more interested in a brush mode erode than to edit the entire terrain with brushes. How does the erode work? (provide before/after images + expl. please)
Brushes really need to be instant and allow for smooth editing which is why I might even reduce the maximum size of some if the speed can't be improved. This might be possible by disabling pathfinding or by introducing some other engine option for faster heightmap (visual) updates.

PS: I'd like you to check for prefabs in SME, blender, and other editors if they have them: how exactly do they work and what is considered a prefab (is it both the height and texture of a certain area?).
PSS: Also investigate void maps.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

gajop wrote:Even so, it helps, and means we can use low res height brushes.
Scaling large brushes down also uses interpolation, so it should make the current brushes look better as well. 512x is about average for height brushes anyway.
gajop wrote:Not at the moment. I've only been thinking about adding map effects that would make them feel more alive, but nothing regarding the layout.
Just to be clear, I would advise against using scened until 0.5 gets released. There are many critical issues still in need of resolving that would drastically improve the quality of the editor.
Yeah, it'll take quite a bit more work before it's really usable for specific map making tasks. So far I've just been playing around to see what works and how well. If I do find it usable for something I probably wouldn't hesitate to use it though.
gajop wrote:It really depends what kind of roads/walls you want to allow. It would be trivial if you constrained them to just north/south/east/west facing, made no variations, allowed only two side connections and used a fix size.
However if you lifted any of those restrictions and we were suddenly talking about curved walls/roads of arbitrary size that can be linked in multiple directions and even be of different height.. then it becomes hard.
Both features would also be pretty game specific, and afaik, no Spring game relies on either.
Actually after thinking about it I realized that walls would be trivial to do with height layers. If you draw the walls on a layer set to add then the walls will automatically follow the underlying terrain height and you can control their height via the layer opacity. I could do it in 5 minutes in krita. :P You might have to smooth the terrain under the walls to prevent terrain 'bleed-through', but that's the only cleanup it'd require. That said, it wouldn't be practical to implement atm, but as you mentioned there aren't any games or maps using them anyway.
gajop wrote:
aeonios wrote:I think set might benefit from something a little more sophisticated than just shapes. I've been playing around with world machine a bit and figured out quite a few things. One of the things it does is let you draw shapes with natural looking 'fractal' edges, which is really difficult to use in WM because of the absurd scaling, but could be adapted without too much trouble I think.
How is this different than just custom shapes? Creating those would fall out of scened scope and users that are advanced enough to create those might as well do so in image editors.
The 'fractalization' works on smooth shapes that have already been drawn, and give a more natural 'in-place' feel. Getting that to work well by any means is one of my projects for today, so I guess I'll see what can be done and how it works. I hadn't considered image editing, but perhaps I should start looking through gimp filter plugins to see if I can find anything useful.
gajop wrote:All of that is great, but it's not something planned for the current milestone. It's rather advanced and focuses on map generation, which while awesome, is also a different approach than what I've been doing for now.
aeonios wrote: TBH I think I'd be willing to sit through the lag just to be able to have arbitrary terrain brush sizes. It would have to be really slow to be any worse than not having undo/redo in SME, and as is SMEs brush size goes much larger. Note also that SME has an 'erode' brush mode, but that's basically useless since natural erosion always acts uniformly over the terrain.
For now, I'd be more interested in a brush mode erode than to edit the entire terrain with brushes. How does the erode work? (provide before/after images + expl. please)
Brushes really need to be instant and allow for smooth editing which is why I might even reduce the maximum size of some if the speed can't be improved. This might be possible by disabling pathfinding or by introducing some other engine option for faster heightmap (visual) updates.
The problem is that erode looks terrible when applied to anything less than the whole map. Even slightly inconsistent erosions looks terribly unnatural. Map 'generation' on the other hand is more like painting a basic image then running a few filters over it to make it look more natural. It's actually a lot less complicated than I expected, and possibly even doable in scened although performance is another issue. I'll make a series of examples and post that later.

The thing about large brushes and/or whole map filtering is that it's generally acceptable to wait for the results. If I'm stamping dunes onto a map I'm not really painting them so much as stamping the pattern once and trying to get it lined up and scaled properly. If I'm stamping a mountain I want the result to be a mountain, with whatever size and height the mountain needs to be for the current map. The mountain might also be large in x,y but lower height and more rolling, or smaller in ground scale but taller and sharper, or it may be epic in every dimension, depending on whatever I'm trying to create. That's why precision in the scaling and click-to-click consistency are so important. For some tasks speed is much more important, like spot smoothing and such, but for large-scale terrain shaping, having maximum control and flexibility in the results is paramount to being able to actually make things.

One good reason for making a map, I guess.
gajop wrote:PS: I'd like you to check for prefabs in SME, blender, and other editors if they have them: how exactly do they work and what is considered a prefab (is it both the height and texture of a certain area?).
Hmm, that's not something I know too much about since I haven't used it. SME doesn't have very many prefabs so they're very recognizable. Intersection was made entirely with prefabs afaik, and the fortresses in sand castles are also SME prefabs. I'll have to see if I can figure out how to make that work. :P Blender doesn't do anything like that afaik, you'd just use texture paint.
gajop wrote:PSS: Also investigate void maps.
Void maps are just a 1-bit alpha channel added to the diffuse texture. It requires enabling void ground in mapinfo.lua, and void water as well for most uses, but no part of it is particularly complicated.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Feature requests

Post by Anarchid »

The 'fractalization' works on smooth shapes that have already been drawn, and give a more natural 'in-place' feel. Getting that to work well by any means is one of my projects for today, so I guess I'll see what can be done and how it works. I hadn't considered image editing, but perhaps I should start looking through gimp filter plugins to see if I can find anything useful.
AutoRealm also has such a feature, you can even draw fractals freehand.
Void maps are just a 1-bit alpha channel added to the diffuse texture. It requires enabling void ground in mapinfo.lua, and void water as well for most uses, but no part of it is particularly complicated.
SetMapTexture might break voidground unless some super special care is taken. I think terraforming void maptiles in ZK causes the void sections to become broken.
User avatar
The Yak
Posts: 351
Joined: 20 May 2012, 05:36

Re: Feature requests

Post by The Yak »

I remember a lot of water and atmosphere editing options being present in older toolbox that I can't find anymore in current Scenerio Editor. Have these tools been removed?

EDIT: Reading the thread more thoroughly, I guess these have been removed and are a goal for next version.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

aeonios wrote:Actually after thinking about it I realized that walls would be trivial to do with height layers. If you draw the walls on a layer set to add then the walls will automatically follow the underlying terrain height and you can control their height via the layer opacity. I could do it in 5 minutes in krita. :P You might have to smooth the terrain under the walls to prevent terrain 'bleed-through', but that's the only cleanup it'd require. That said, it wouldn't be practical to implement atm, but as you mentioned there aren't any games or maps using them anyway.
That would work and functionally be similar to walls, but the textures on them would look poor. They really need to be features, and then you get all the issues mentioned.
aeonios wrote:The 'fractalization' works on smooth shapes that have already been drawn, and give a more natural 'in-place' feel. Getting that to work well by any means is one of my projects for today, so I guess I'll see what can be done and how it works. I hadn't considered image editing, but perhaps I should start looking through gimp filter plugins to see if I can find anything useful.
Is that something like an inverse smooth?
What I've found is this: https://youtu.be/FK6Ly53vRh0?t=176 and the example wasn't really clear (couldn't be bothered to watch till the end). They also talk about a "felt" filter which I don't think we need.
Anarchid wrote:AutoRealm also has such a feature, you can even draw fractals freehand.
This is a much better example: https://youtu.be/ZrA9sSBJKos?t=110 , thanks Anarchid!
Also the program is open source, but alas only works on Windows so I'm a bit lazy to setup wine to test it right now.
aeonios wrote:I'll make a series of examples and post that later.
Cool. I'll wait for this and see =)
gajop wrote:Void maps are just a 1-bit alpha channel added to the diffuse texture. It requires enabling void ground in mapinfo.lua, and void water as well for most uses, but no part of it is particularly complicated.
I think it would be cool if I could paint void ground, but I've had no luck so far.
Anarchid wrote: SetMapTexture might break voidground unless some super special care is taken. I think terraforming void maptiles in ZK causes the void sections to become broken.
I can confirm it breaks stuff for me to :P
The Yak wrote:I remember a lot of water and atmosphere editing options being present in older toolbox that I can't find anymore in current Scenerio Editor. Have these tools been removed?
EDIT: Reading the thread more thoroughly, I guess these have been removed and are a goal for next version.
ToolBox is a separate and mostly unmaintained project: https://github.com/gajop/Toolbox . It has a widget made by jk for modifying water, but it's not yet ported to scened. I can't use it as it is, because it doesn't support undo/redo and isn't integrated in, but it's definitely a goal for this milestone.
I haven't found any atmosphere editing options though. Maybe I missed it.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Feature requests

Post by FLOZi »

Pretty sure TB has only water modifying widget.

also :( that I have no time to make it proper
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

There's not many useful things left in TB.
I'll port the waterconfig soon and probably some equivalent of a CEG spawner later on.
The only interesting things remaining are boxxy and animator I think.
The rest is just a mess from a bygone era.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

Hrm, alright well after fighting with WM and SME for two days now I can say that erosion/terrain generation are probably not going to be practical in scened any time soon. I should have a real map demonstrating that stuff soonish though. Both autorealm and WM use vector shapes for generating fractal shapes, which is not likely to be practical in scened, or would at least be complicated. The settings required to make that look right are also fairly complicated. Erosion in SME and WM are also different, or at least I don't know how to get the same effects in WM as of now. All the ridiculous variations in erosion alone would be a ridiculous project. A free/open source synthesis of WM and terragen would probably be much more interesting, but that's clearly outside the scope of scened.

Whole-map smoothing and flattening might still be useful though. Flattening can be used to 'blank the slate', and with smoothing it's nice to have it consistently applied so that you don't get weird artifacts. Spot smoothing is also useful, but for different reasons.

Random odds and ends:
The default rotation for the height brushes goes the wrong way. The default camera orientation for the map and the preview images for the brushes both line up the same way, but when you actually apply it to the terrain it's sideways (I think, but the wrong way anyway).

I don't understand how to save height and/or diffuse tex, if that's possible. I'm not sure if mapconv accepts pngs for diffuse (may only accept bmp, need to double check that), but everything uses 16bit png for height. Being able to do spot smoothing with pathing overlay on would be amazing in combination with this terrain generation nonsense I've been working with.

After thinking about it and playing around with it, my conclusion is that texture paint seems to be in greater need of performance optimization than anything terrain related. For most things loading the brush in height takes longer than actually applying them, even at max size. As I mentioned, stamping large patterns isn't particularly performance sensitive, nor are whole-map operations like post smoothing. The smooth brush actually is very slow and impractical at large sizes compared to whole-map smoothing, but for spot smoothing it seems to work just fine.

Texture paint is much more sensitive to performance since you're actually making brush strokes rather than just stamping, and because greater precision is required to make things look right. You also typically spend a whole lot more time painting textures than you do fussing with terrain. Even at its worst the actual application of terrain is a rather coarse process in comparison, with most of the work spent preparing brushes or messing with procedural generation settings.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

aeonios wrote:The default rotation for the height brushes goes the wrong way.
You're right. Fixed.
aeonios wrote:I don't understand how to save height and/or diffuse tex, if that's possible.
I was actually just about to do that, follow this: https://github.com/gajop/Scenario-Editor-Core/issues/45
For now I'd say "no", but it's going to be done soon.
I need to figure the maximum texture size Spring (OpenGL) supports. I might need to downscale and lose accuracy for some map sizes.

Now to be clear, this is only an import/export. For normal use, I'm saving it in my own format which is lossless, smaller and allows faster saves (it's currently possible to Ctrl-S like you would in normal editors and have it act responsively). Basically, it's the scened's "project save" vs import/export.
aeonios wrote:I'm not sure if mapconv accepts pngs for diffuse (may only accept bmp, need to double check that), but everything uses 16bit png for height.
Dunno. I'll try to match mapconv's inputs, but if not possible, I'll satisfy with exporting to PNGs. The user can then use pretty much any image editor to convert images.
aeonios wrote:After thinking about it and playing around with it, my conclusion is that texture paint seems to be in greater need of performance optimization than anything terrain related. For most things loading the brush in height takes longer than actually applying them, even at max size.
Personally I find it OK as it is. In any case, much more responsive than the height editing.
I'll implement some pre-caching for both diffuse and height editing, but it's also important to preserve memory.
aeonios wrote:The smooth brush actually is very slow and impractical at large sizes compared to whole-map smoothing, but for spot smoothing it seems to work just fine.
I'm aware of that. In general smoothing is bound to be slow because it needs to compute far more than other editing modes, but some optimizations are still possible.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

Oh, I also did get to mess with prefabs a bit in SME. It looks like the texture and terrain shape are both matched and scaled together so pretty much all you do is select the prefab and stamp it wherever. I haven't figured out how to control vertical scaling, so I don't know exactly how sand castles and intersection were made. :| I have yet to figure out how the prefab align feature works or what it's for, so that's still a project. It seems like prefabs would be fairly difficult to make though.

Re walls on the other hand, as long as you smooth them enough to hold a texture you shouldn't need to use features just to provide detail for them. Painting them would be a bit difficult, but things like that are what the 'rotate-brush-point-uphill' feature is intended for. :P Technically it should be possible to automate all of the wall-painting, but I'm not sure how complicated or difficult it would be, given all possible variations in wall size/shape and the need to make it actually look right.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

aeonios wrote:Oh, I also did get to mess with prefabs a bit in SME. It looks like the texture and terrain shape are both matched and scaled together so pretty much all you do is select the prefab and stamp it wherever. I haven't figured out how to control vertical scaling, so I don't know exactly how sand castles and intersection were made. :| I have yet to figure out how the prefab align feature works or what it's for, so that's still a project. It seems like prefabs would be fairly difficult to make though.
I played a bit with SME myself, and while I haven't gone as far as prefabs, I find the whole thing (UI, camera, GFX) really behind. I don't think there will be a reason to chose SME over Scened after next release.
aeonios wrote: Re walls on the other hand, as long as you smooth them enough to hold a texture you shouldn't need to use features just to provide detail for them. Painting them would be a bit difficult, but things like that are what the 'rotate-brush-point-uphill' feature is intended for. :P Technically it should be possible to automate all of the wall-painting, but I'm not sure how complicated or difficult it would be, given all possible variations in wall size/shape and the need to make it actually look right.
Automating is hard and something I want to leave for later.
You're right that it can look OK:
screen00008.png
(3.7 MiB) Not downloaded yet
, but still these walls don't resemble man-made structures at all and it would be a lot of effort to make something that does.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Feature requests

Post by aeonios »

gajop wrote:I played a bit with SME myself, and while I haven't gone as far as prefabs, I find the whole thing (UI, camera, GFX) really behind. I don't think there will be a reason to chose SME over Scened after next release.
SME has by far the worst interface of any program that I can ever remember using. :P That's also another reason I'm excited about scened. I did figure out something about prefabs, which is that they actually had to be modified in order to make sand castles and intersection. Apparently they don't really work well out of the box.
gajop wrote:Automating is hard and something I want to leave for later.
You're right that it can look OK:
screen00008.png
, but still these walls don't resemble man-made structures at all and it would be a lot of effort to make something that does.
Ah, smoothing was the wrong answer. You'd actually need to use a, equivalent straight-angle slope, which is doable but still fairly complicated. Using a more realistic pattern/scaling also helps. :P

Stuff..

I tried out the color picker and found out it doesn't do what I thought it would. I intended it to be used for selecting solid colors instead of a texture for use with special blending modes. Right now it does weird things to the color of the selected texture, which isn't all that useful. Also, HSV > RGB, and I have no idea why it includes an alpha channel.

I think textures could use a 'stamp mode' for use with non-tiling/alpha-bg textures. In stamp mode the texture is always centered under the center of the brush, so it's not meant to be used with click and drag. Stamping is useful for things like placing metal spot graphics, which SME can't really do since it doesn't properly support textures with alpha channels. Ironically the default metal spot graphic in SME tries to use one anyway. Maybe I'm just missing something, but regardless.

I'm almost done with my current map project, so I should be able to get back to doing productive stuff soon. :lol: I know scened-resources needs work. After looking over lots of maps I can say that it's not as bad as I thought though, and should continue to improve with my skills.

Wrt all the licensing stuff, I remember where most of the textures came from so I'll be able to sort that out when I get back to all that. Some of those are also from texturemate, and I already got explicit written permission for using them in scened-resources. I'll add attributions to those as well.

I've also found a lot of good stuff on pixgood/pixshark/imgkid, but I'm not sure about the licensing involved with those or if those sites are legitimate at all. I haven't added any of those to scened-resources until/if I can confirm that.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Feature requests

Post by gajop »

aeonios wrote:I tried out the color picker and found out it doesn't do what I thought it would. I intended it to be used for selecting solid colors instead of a texture for use with special blending modes. Right now it does weird things to the color of the selected texture, which isn't all that useful.
It's pretty useful as it is imo. It will color any texture which means you don't need a separate texture for each color combination you can think of, e.g. no need for "Red Bricks", "Blue Bricks", "Green Bricks" when all that's different is the color.
aeonios wrote: Also, HSV > RGB, and I have no idea why it includes an alpha channel.
I'm using chili's colorpicker, which comes with the alpha channel and works in RGB.
Implementing a HSV picker might not be that difficult, and some sort of HSV-ing might be needed for the Color/ColorDodge modes. It's certainly easier to switch colors in a HSV picker. Will investigate...
aeonios wrote: I think textures could use a 'stamp mode' for use with non-tiling/alpha-bg textures. In stamp mode the texture is always centered under the center of the brush, so it's not meant to be used with click and drag. Stamping is useful for things like placing metal spot graphics, which SME can't really do since it doesn't properly support textures with alpha channels. Ironically the default metal spot graphic in SME tries to use one anyway. Maybe I'm just missing something, but regardless.
Sure. However, this will need some new semi-transparent textures to use in this mode. Slightly related, I might also allow painting/stamping in rectangle shapes and not just circles.
Post Reply

Return to “SpringBoard”