Comments (12)
I'm not too familiar on how Factorio manages the difference surfaces in details, but that should be largely doable I imagine. Currently, the mod only generates for nauvis indeed. The take_screenshot calls allow to specify the surface to render, so it should be possible to do a render per surface. As far as I can tell, it is also possible to automatically list surface.
Some metadata would be needed in mapshot.json
files but that would be trivial. Some thoughts would be needed for exact UI, but the UI library used (leaflet) has support for multiple layers, so something should be doable (it would be a different base layers, which is different from overlays, but still).
[to be clear - I have no immediate plan to write this feature myself for now though]
from mapshot.
/c for _, s in pairs(game.surfaces) do game.take_screenshot{surface = s, daytime = 1.0, path = s.name .. ".png" } end
This worked as expected after a bit of coaching from discord. I'll take a look at the mod code and see if it is beyond my noob lua skills to fix.
from mapshot.
If you are on discord we could have a conversation. Otherwise, I'm looking at control.lua. There are a few things to be done I think.
- Decompose
mapshot
into two functions, one that deals with 'all' the data, and one that deals with a particular surface - Modify
gen_layer
to take the surface and use it in thetake_screenshot
call - Put the layer name into file names
The simplest version of this would simply generate a uniquely named mapshot instance per layer per game. The more complex version would bundle up the layers for a single game into a flipbook of maps.
from mapshot.
Ok, I started digging a bit in the code to remember the details, one thing led to another and now there is support for other surfaces in https://github.com/Palats/mapshot/tree/surfaces ( 202364c ).
This is not in the main branch for now as I don't have anything to test it with - would you have by any chance a modded save with non default surfaces that you can give me for me to test?
from mapshot.
Yes, I do. Sorry for the delay - real life happened. What's the best way to share some saves with you?
from mapshot.
Also, is there an 'all' option?
from mapshot.
For sharing the save - any file sharing thing like google drive, dropbox or microsoft onedrive would do the trick. If you prefer to not have a public link, you can send it to my mail (I've updated my github profile with it) - though in that case, please indicate whether it is fine or not to share screenshot of that save.
For the all
option - yeah, that would make sense. I might change the final approach a tiny bit, which will make it more natural to have a all
option.
from mapshot.
Actually, with mod https://mods.factorio.com/mod/ParallelWorlds I can easily do some basic testing of multi-surfaces (without having to do a run with SpaceExploration that is :) .
from mapshot.
Try this one:
https://drive.google.com/file/d/1PMYjI8orR1edLyavYDr6gJcPYYZGBj74/view?usp=sharing
Feel free to share anything about or from this save. Use it for screenshots for your mod for all I care. It should have several surfaces, each with something there to look at. The nauvis world also has a range of scales that seems to not work super well with the default map rendering settings - at some zooms it appears a bit too pixelated or blurry. I've not figured out exactly what setting tweaks will fix that though.
from mapshot.
Thanks for the save!
I have now a better version of the support for surfaces, which will render all surfaces by default. I haven't uploaded it yet, as I still need to update the viewer UI to allow switching between those.
(for the zoom level at which it is blurry - the default settings of mapshot are fairly conservative to avoid prohibitive rendering time, so the most zoom tiles are not that detailed. That can be changed by changing the tilemin
setting to a smaller value.)
from mapshot.
Ok, so release 0.0.14 which I just uploaded should now render all surfaces by default and allow to switch between them in the viewer.
There might be some corner cases where some of the surfaces do not render - when I tried on the save provided in #14 (comment) (which was very useful, thanks), some screenshots do not render it seems. I think that's because I do not have all the necessary mods installed, though I'm not 100% sure - there might be some way the surfaces are used in the mods that I do not understand.
from mapshot.
It is possible that one or more of the special interstellar map views do magics rather than the usual map gen stuff, so I am not surprised that one or more of them may be entirely blank.
from mapshot.
Related Issues (20)
- Serve requires factorio binary HOT 2
- Can you also compile your releases to ARM architecture? HOT 1
- Question on running in headless linux server using xvfb HOT 2
- Failed to run(linux nogui with xvfb+virtualgl) after 1.1.36 update. HOT 4
- Support listing saves versions from just the static files
- Detect which mod to load
- Suggestion of Steam issue solution HOT 3
- Option ‘disable-audio’ does not exist HOT 2
- Dynamic render resolution HOT 2
- Option ‘disable-prototype-history’ does not exist HOT 2
- Mod incompatibility: allow filtering of mods HOT 3
- Always exits with error? HOT 4
- Hide "flying-text" entities. HOT 1
- Surface setting not used HOT 2
- Should not include pictures of non-generated chunks HOT 1
- Timelapse feature HOT 1
- Add static link to the latest mapshot for a given save HOT 1
- Garbage collection of old exported maps
- Headless, OpenGL context: Could not create GL context: BadValue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapshot.