New Mapping Tool - "SpringMapEdit" - r321 - Page 2

New Mapping Tool - "SpringMapEdit" - r321

Tutorials & Resources For Mappers

Moderator: Moderators

Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: New Mapping Tool - "SpringMapEdit"

Post by Frostregen »

To 1.:
Yep, LUA is an an area I do not intend to touch.
Features are part of the main map files, so I include them.
But Units/movement/pathing/scripts are not, so that's where your work will shine.


To 2.:
This is already on my TODO List ;)
Currently I'm coding a GUI for selecting different brushes.
Those brushes will be 8bit images, which will be resized to current brush size.
Texture painting occurs via the same sort of brushes.
There will be options for modulo-painting (repeat pattern), or stamp where you click (splatting).
The image format is not really important, as i can load everything what java can load. At least for small images, like textures or splats this is ok. For 100mb+ textureMaps i use my own Bitmap loader, which directly copies from disk to array, without an intermediate memory image. (Thus only BMP+RAW are supported for this ;) )

Airbrush mode is quite complex... I do not think this works without layers. But we will see :)

There will always be the option to save it to disk, and do some photoshopping.


To 3.:
There is already Hydraulic and Thermic erosion included (Press E or T).
Thermic is quite fast, but needs some work to look better.
Hydraulic is a bit slower, but looks really good (in my opinion).
Where can I find info/images of RogerN's erosion stuff?
Erosion is quite fun to code, because it is a kind of mini-simulation of water/rain, solved soil, etc...


I do not see this as competiton too.
As you say, we are working on different aspects anyway.
I made it mainly for my personal entertainment. If it is of use for some people, the better.
When it is in usable state I will upload the code to Spring-SVN anyway, for the community to maintain(or leave dying ;) )

@smoth: Feature placement is already done and works. (ok, needs small alignment fixes and x/z rotation based on ground added. But basically its finished)

@All: Did anyone actually test it? Errors? Crashes? (Crappy GUI? ;))
Does it work on linux? osx?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: New Mapping Tool - "SpringMapEdit"

Post by Argh »

1. Hey, Feature placement's all well and good, and I'm not suggesting that you remove it or anything. I'm just trying to say that I really think that the future is with Lua and engine-based solutions. Once a Featuremap is made, it's static. With the World Builder Editor, you can edit, re-edit, etc., forever, and you're not committed once you compile the map. Makes a big difference, trust me.

I'll take a look at this in a bit, see if I have any suggestions about how to make this work in a better fashion, in terms of final output products. Sorry I can't comment in any detail yet, I'm a little busy ATM.

One nice idea, though, would be to be produce a final Feature TDF file ready-made, so that people just need to include that and the S3O / 3DO files, and voila, their map works. That would be easy to automate.

2. I'll play around with the erosion stuff, and comment once I have something intelligent to say. I love that kind of tool for adding a lifelike feel, and I'd like to see better tools for that available. L3DT is really nice in that respect.

As for RogerN... he's around here, and his post about his heightmap editor is down below somewhere. I suspect that if you two teamed up, we could see some really incredible progress on this stuff very quickly.

3. Whatever texture format is used for "splatting" probably needs to support an alpha channel, simply because it'll make editing for people who want to add to this a snap.

Or, as an alternative, allow people to pair a texture with a grayscale image used as the "splat" template. In fact, that might be even more ideal- people could make various fancy "splats" and apply them to all sorts of base textures, for a huge variety of looks.

4. In a similar vein to no. 1, a Sun editor would be a very valuable thing to have. Again, I believe RogerN already made a simulation of same, and outputting the correct values to a text file is trivial.

5. In the "crazy ideas" category... I think it would be cool to be able to do a specular map, and then bake it into the final texture with the light being used to generate the specular details. Having seen the rendered maps done in Bryce, I think that this could make a really big deal, in terms of how maps look and feel.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: New Mapping Tool - "SpringMapEdit"

Post by Forboding Angel »

Argh wrote: Or, as an alternative, allow people to pair a texture with a grayscale image used as the "splat" template. In fact, that might be even more ideal- people could make various fancy "splats" and apply them to all sorts of base textures, for a huge variety of looks.
IN a general sense, this is exactly the way that sm3 works.

Forgot to mention. L3dt makes attribute maps (essentially it's a layout telling you where it is going to splat what textures which are perfect for this, however if you already have l3dt, meh, you can do pretty much everything here. Stuff is starting to overlap...
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: New Mapping Tool - "SpringMapEdit"

Post by KaiserJ »

i played around with this today for a while, it was a lot of fun and i can see this turning into something really useful for spring mappers.

everything worked great, no bugs or anything like that, tried each of the 3 windows batch files, didn't need those libraries.

a few points & suggestions

it would be nice to get tool info in a third window, showing things like the map location as well as the height beneath the pointer; the type & rotation of hovered-over features would be a nice touch for an info window as well.

would be cool if brush size & pressure applied to altering features, you could fill the map up with them and scrub around with a small high pressure brush and get some nice effects of randomness.

the viewing filters (f1, f2 etc) should indicate that they are being displayed (buttons on the GUI? text on the map window?) i enabled multiple filters at one point and got confused as to which ones were on and which werent.

im looking forward to an improved GUI, which is a good plan, and i'd love to see how the different brush shapes work... the auto texturing is really cool; i tried substituting my own images into the textures folder and it seemed to work fine; it'll be awesome if you can make it to change with an interface as you've said.

the ability to open multiple windows showing different angles / filters to be able to see the map from different angles as you edit it would be really useful (having one window showing texture map, the other showing slope map would be awesome)

something else i thought of as i played around is a balancing / mirroring mode for maps to be able to balance or mirror on any axes (producing mirrored maps like Tau10, or symmetrical maps like Tabula, or mirroring on multiple axes like castles.)

i'm sorry if it sounds like im asking for a lot, but i love the prospects of this program and using it has me all excited. i need moar, MOAR!

i'd love to offer some sort of assistance to such a cool project; but my lack of coding talents limit any contribution to be in the form of graphics. (buttons, logo, loadscreen etc) if you have any interest, pm me.

keep up the good work!
User avatar
Marmoth
Posts: 63
Joined: 26 Mar 2008, 20:44

Re: New Mapping Tool - "SpringMapEdit"

Post by Marmoth »

Very nice perspectives here!

About other existing solutions (l3dt, worldbuilder): I would like to empasize on the fact that an INTEGRATED solution to make spring maps is what spring needs. I don't say that currently active (pro) map maker need it, but any (new) contributor that is more creative than IT oriented will get the opportunity to bring his nice ideas to (virtual) reality much faster and with less headache. (l3dt can make it more or less, but its not centered on spring: you have to choose between thousand of options and import/export to spring maps with a module... and its not opensource as far as i know).

Idea about brushes: Brushes could have alpha properties according to slope / altitude (or anything else). This could be a nice solution between entirely generated maps and entirely painted ones: you paint the cliffs you want with each brush, even if they share the same caracteristics in terms of slope, altitude, orientation etc. In the same time, you cant make freely paint without the risk of painting flat areas with cliff rock brush.

About roads (rough idea): Roads would perhaps be easier to model if you give them a "priority" tag: if a low priority road comes to a big one, just put a "stop" and just paint the big above. Tiles for different crossing style could be added too.

It was my penny on it. Thanks for the work anyway!

Marmoth
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: New Mapping Tool - "SpringMapEdit"

Post by AF »

If you need file hosting I would be happy for you to set up some 'splat/texture' repository at darkstars so users can submit or download from inside the application itself. That and you get to use my copious amounts of disk space and bandwidth. If you need an svn too I can sort that out. PM me if your interested.
User avatar
RogerN
Posts: 238
Joined: 24 Jul 2006, 23:29

Re: New Mapping Tool - "SpringMapEdit"

Post by RogerN »

The original thread for my HeightMapTweak utility is here. There are a few screenshots of the erosion output. The algorithm is mostly simple:

1) Use perlin noise to generate a "max slope" value for each pixel of the height map. This prevents all the slopes from being uniform after lots of erosion.

2) Use simulated water droplets to carry small amounts of dirt from heigh spots to low spots. Erosion only occurs in areas where the height map is steeper than the max slope value from step 1. The amount of dirt that is moved is controlled by user-defined parameters, but it's basically a percentage of the difference between the current value and the max slope.

It's painfully slow but looks pretty good. One downside is that the erosion looks the same on any map - there are no scale parameters or anything like that.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: New Mapping Tool - "SpringMapEdit"

Post by Frostregen »

@All:
One final goal is to make the tool view/edit/export ALL things a sm2 map consists. This inlcudes SMD/SMT/SMF + Feature files.
Maybe even 7zip it for you.

@Argh:
To 1.: See above.
To 2.: Thx, I'll wait for your comments
To 3.: It will support both. Alpha from brush + alpha from Splat. Even combined.
To 4.: See 1.
To 5.: Hmm, specular highlighting is view dependant, so it would be strange to bake it into the map. (A highlight is were sunlight is directly reflected into the view-camera). But could be a nice effekt :)

@Forboding Angel:
I will not but tooooo much work into texture generation, as there are already good tools for this. But at least some basic functionality will be included.

@KaiserJ:
everything worked great, no bugs or anything like that, tried each of the 3 windows batch files, didn't need those libraries.
Thx for testing!

1. Info window: Good idea, will be done.
2. brush size+features: Already coded, just not linked to GUI (same is true for many aspects)
3. View filters: I will add F5 for textureMap view, so it is no on/off for every map, but a switch between them.
4. Multiple view windows: Will be done. This this is quite easy, as i just need seperate rendersettings for each window, and render it.
5. Copy&Paste: good idea, will be done.
6. Thx, I will come back to this later.

@Marmoth:
1. Brush Idea: Something similar is in the works: A brush mode which autogenerates the texture based on your autogen settings below the brush. This will be useful to test your autogen settings locally too.

@AF:
Hosting splats/textures/brushes: Thx. This is a feature which may be added later. (Makes only sense if all formats are fixed/thought of)
SVN: Thx. Currently it is on my own SVN repository. So it will just need to be transfered to your/springs SVN when I release the code.

@RogerN:
1. Sounds like a good idea. I will experiment with it for my thermic erosion.
2. My hydraulic erosion works slightly different: It is applied to all slopes. This gives nice riverbed-like waves of sand. (See Image)

But as you will know this is just a thing of personal taste + type of terrain you want. Your algorithm looks really good for rocky mountains. Mine fits better to sand/desert like stuff.
The output hugely depends on very small parameters anyway.
Best would be to offer those parameters to the user.

-Frostregen
Attachments
soil.jpg
(14.77 KiB) Downloaded 54 times
User avatar
IllvilJa
Posts: 90
Joined: 08 Sep 2008, 00:01

Re: New Mapping Tool - "SpringMapEdit"

Post by IllvilJa »

Hmm... Sauerbraten aka Cube 2 uses an ingame map editor. That is, you move around in the map itself in 1st person whilst designing things. Even collaborative design is possible with multiple ppl joining the same server and working on the same map.

Maybe create something like that for Spring?

(Honestly, I've tried to figure out if this message is off-topic or not but I still don't know...)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: New Mapping Tool - "SpringMapEdit"

Post by Argh »

Hmm... Sauerbraten aka Cube 2 uses an ingame map editor. That is, you move around in the map itself in 1st person whilst designing things. Even collaborative design is possible with multiple ppl joining the same server and working on the same map.

Maybe create something like that for Spring?
That kind of work will be possible (in fact, already is) with the World Builder Editor. That said, there are fundamental limitations to the way that the map format works that currently prevent a completely end-to-end development cycle. You can't do painting of a map directly in Spring, for example- that information is just data, insofar as the engine is concerned. And we're unlikely to see an outside tool like this one that encompasses every possible thing that you can do within Spring itself, like run Lua code.

There might be solutions that can be done in-engine, but I'm still not sure what they would be, without requiring a new map format.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: New Mapping Tool - "SpringMapEdit"

Post by smoth »

Sorry man, I have not gotten to try it yet, about to go out to a bar with some friends. A co-worker is leaving.

I am really interested, I look forward to trying it out!
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: New Mapping Tool - "SpringMapEdit"

Post by Gota »

I tryed reading all posts really..
Can this tool edit the typemap?
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: New Mapping Tool - "SpringMapEdit"

Post by Frostregen »

Then somehow you must have missed the first posts text + images ;)

Edit:
Added updated version.
-Brush patterns are selectable & loadable
-Brush textures are selectable & loadable (though it is still not very useful. Brush Pattern currently has no effekt on texture painting)
-Overlay is directly selected by F1-F5 now. (No confusing toggle anymore)
Attachments
springedit32.jpg
springedit32.jpg (22.52 KiB) Viewed 9795 times
springedit31.jpg
springedit31.jpg (45.35 KiB) Viewed 9801 times
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: New Mapping Tool - "SpringMapEdit" - r509

Post by Satirik »

seems awesome, didn't get how the texturing works to not texture with square only (selected different brush but it didn't change anything) anyway pretty good job
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: New Mapping Tool - "SpringMapEdit" - r509

Post by KaiserJ »

nice progress man; i really like how this is coming along.

can i suggest that you layer the auto-painted textures differently from the brush-added textures? that would allow you to sort of draw over top of the painted texture in order to make paths and roads and other sorts of terrain features and touchups; or erase the painted texture to go back to the autopainted layer.

even if you keep the terrain auto texturing as it is now but with the ability to change which textures go where (with the methods that are currently used, just make the tolerances and textures selectable) i can imagine you'll be able to make some really amazing looking maps using a "touchup with the brush" technique after the auto paint.

as far as adding roads goes : im sure it would be possible to photoshop some road templates to use as loadable brushes in this program, different intersections, curves and straight roads... and with the hand texturing mode, put some corresponding textures over top...

also: i was fiddling with the features editor and trying to get more features in by adding them into the directories; i managed to add a feature for testing but it would be cool to automate adding more features to your library: an "add feature" button that would allow you to browse and select feature files (model, texture etc) from your computer and copy them over to the appropriate directory in the editor folder (not a necessary feature by any means, but it might make it more nub friendly)

anyways, im loving this program, keep up the good work, i hope some of my ideas and suggestions are helpful :D
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Re: New Mapping Tool - "SpringMapEdit" - r509

Post by SpikedHelmet »

With a bit more work this could turn into one of if not the the most important development programs to come out of Spring.
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: New Mapping Tool - "SpringMapEdit" - r509

Post by Hoi »

Could you make a proper camera? like the one in wings 3d
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: New Mapping Tool - "SpringMapEdit" - r509

Post by TradeMark »

looks good.

but the camera needs fixing... mousewheel should be zoom etc. could we have some file where we can define own keys for actions?

I think this thread should be moved somewhere else, quite hidden here.
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: New Mapping Tool - "SpringMapEdit" - r509

Post by KaiserJ »

ImageImageImageImageImage

so i made this... first real attempt ever at making a map for spring, dont hate on me too much XD

pic 1 : overview
pic 2 : view from one of the "castles"
pic 3 : details of my sexy dam (not really springmapedit related :P)

it's using the auto-generated texture, i plan on changing the textures in the folder for springmapedit in order to use this program as much as possible (i like it! can you tell?) but i figured i might as well just leave these to show people what it's like making a map from scratch with exactly what comes with the alpha.

made a heightmap that was roughly half the size of the map i wanted, saved it, exported it, mirrored it, brought it back in and textured it.

apart from that, the dock areas were made using a vector image program after i blatantly stole the idea from folsom dam. i must say, being able to have springmapedit and my image editor open at the same time was a huge plus, just save a new texture and load it up in springmapedit to check to see if everything is lined up (which it wasnt, but it's because im a noob, eventually fixed it.) drew the flat surfaces using the "set to level" brush.

map is intended for 1v1 play, as it is only 6x4 :mrgreen:

now, for the questions (slash demands)
1) do pngs work at all with this program? if not, could they?
2) what's up with the feature map format? not what i was expecting, is there any way i can use the feature map export from this yet?
3) what sort of program can i use to work with the .raw texture files?
4) i had a strange error when i loaded a 24bit raw file, it seemed to load as an 8bit file (the map looked all jagged and nasty so i could tell) and then no matter what i loaded, it all looked like 8bit. eventually i closed the program and opened it again and everything was back to normal; wasn't able to reproduce the error.
5) it would be awesome if you packaged in a few more different features, saves having to go and poke around for them (not really a big deal, i suppose if a feature maker saw this, they might offer to give you some to include)
6) i tried using the "make a directory of your *mapname.dds*" method to test my map (didn't 7zip yet, i'll probably sleep after this post, maybe tomorrow) but it didn't seem to work, does the output from the "create spring map" save mode work in the version i have?

update us when you can, i'd love to hear how your project is coming along, and i'd love to test a new version when it becomes available.

*edit* 7) a view mode that shows the greyscale heightmap? would be handy sometimes
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: New Mapping Tool - "SpringMapEdit" - r509

Post by Frostregen »

@Satirik:
Yep, texture painting currently ignores the brush pattern. (as I mentioned in my last post)

@SpikedHelmet: Thx :)

@Hoi&TradeMark:
As this is just a matter of personal taste, there will be different modes.
(Like in Spring itself). Could you describe how the camera in Wings3D works? (Is it really suited for a terrain editor?)

Keys will be customizable later.

@KaiserJ:
Wow, big thx for doing a map with this editor!
Texture painting: Good ideas. (I hope I'm able to implement them)
Easy Feature import: Will be done.

To 1.:
Currently they work for autotexturing/textures + brush patterns.
Heightmaps/Texturemaps currently do not support other than raw/bmp.
I think i will add PNG support later, to save some disk space.

To 2:
The features are saved in the spring .SMF format.
Problem with a mapconv-compatible image:
-rotation is lost
-ID <-> feature translation is lost.
So I choose to use the existing format.
(Besides this, it fully reuses the SMF export/import code.)

To 3:
There is a RAW texture file?
I guess you mean heightmap file.
Most editors should be able to load it, but you have to specify the width yourself.
Beware there are 2 RAW formats:
1. RAW 16 bit: Just the image data (->real raw)
2. RAW 16 bit + Simple Header: 32bit Integer Width, 32 bit Integer Height + image data. (->fake raw, just for ease of use with SME)
To load a type 2 image in another editor, you would have to skip the first 8 bytes and specify the width yourself.

To 4.:
24bit RAW is unsupported atm. All RAW you feed in is taken as 16bit.
(As this is what Spring uses (loads) internally, there is no need for higher bit depth)
The errors afterwards are strange. Should not happen ;)

To 5.:
This was a decision the keep the packages filesize small.
I think I will ask some feature authors for their work, and create a separate feature-pack, which just needs to be extracted.

To 6.:
I did not try the "directory" method.
The SM2 export + .sd7 method definitely works.

To 7.:
Sounds good, will be done.

Currently I just restructured the GUI, so nothing releaseworthy.
Post Reply

Return to “Map Tutorials & Resources”