![]() |
Nw2png
2 Attachment(s)
Hello everyone ;)
I've made a new tool in java which generates an PNG Image from a given level - The latest download is attached below - For the developers under you I've also attached the source code Please gimme comments + Ideas of what I should add / change =D ------------------------------------------------------------------ Latest version is 2.1, by Dusty! Patch Notes: Quote:
|
HTML Code:
'java' is not recognized as an internal or external command, |
@ Andrew you can download the java runtime (JRE) here:
http://java.com/en/download/inc/windows_upgrade_xpi.jsp Oh and I just saw I had a quick typo when parsing the gmap file (Width was Height and Height was Width) Ive attached the changed one 1.1 now I always prefer Java since you only have to compile it once and you can run it under every OS |
1 Attachment(s)
Haha cool-alot quicker than using the map editor!
Can you please add a tileset changer on to it- ie the tileset you want to use (I know you can just re-name pics1.png, but would be cool of an option) rep++ |
Already done it, but that's pretty cool. I'm still working on the new version of mine with GMAP support so I guess you beat me to that :p.
Nice work. |
The image looks so smooth <3
Thanks for repp + uploading your picture =) The changer will be added in the next version 2.0 until then we will have an auto parse of the level to read the addtiledefs =P Also im doing a GUI version soon Programs written in C++ / Java gives more possibilites like you can see the image is Rendered Intepolated (very smooth) not like the usuall horrible pixeled M map (no Interpolation rendering) Did I already mentioned that it also supports pics1.png's with alpha =) ? oh and you can also skip Levels when creating the gmap - just dont add the .nw level to skip in the folder and the NW2PNG will auto skip this level if it doesnt exist so you have an alpha hole where this level should be Actually this is the very first Alpha version I just started with this Project a few hours ago =o |
Wow, this is awesome man!
Thanks alot :D rep+ |
NW2PNG v1.2 released
Here comes v1.2 - including several changes + support for Tilelayers ;) Please read the readme.txt file in the folder |
Add anti-aliasing ;) Maybe as an option
PHP Code:
|
Mhm I already played around with the rendering to get the best quality
Bicubic Interpolation > everything else with the Quality I just wish I could use the Lanczos sinc Interpolation in Java =( |
Quote:
Edit: Here is Chromium's implementation of Lanczos in C++ http://src.chromium.org/svn/trunk/sr..._operations.cc |
Quote:
(Even Bicubic is already perfect) PHP Code:
|
I haven't downloaded the program yet as I don't really need it, but it sounds like some nice work.
|
2 Attachment(s)
NW2PNG v1.3 released
Again a new version =) Changelog: - Added support for normal NPC images - Added ignorecase for "pics1.png" npcs and npcs containing "light" in their name (Parsing of setimgpart() not added yet) - Small source code changes |
Quote:
|
Quote:
(Selection on beginning where you can select the default tileset when there wasnt an addtiledef in the level-script) But currently I dont hesitate with makeing the GUI since you can just replace pics1.png with an other tileset image to get this tileset as default (can have alpha) ;-) addtiledef / addtiledef2 + npc-script parsings will be added soon |
Hmm Im gotta pausing this project for some time since im getting really busy with irl and other things D=
(Purrr only one download after 3 days which was a test to see if the download counter works so far) Im going to continue it pretty soon or do at least a few small fixes before I continue it (currently it reads npcs x/y only as integers -> next small fix will make it possible to have them also on decimal positions) Maybe a few more comments to the current version (+Downloads) would help to speed up the development =o (If you need the tool at all >.<) |
lol well it's great- I generate bravo's map with it!! :D
Please continue :( |
Quote:
Quote:
Quote:
oh and, a common way to show images on a level is with showimgpart.. so that might be a bit tricky :o Quote:
(not sure how to do this, but i could research.) |
|
If it were bigger that'd probably be possible.
|
Quote:
The counter doesnt increase for every new download - it only counts 1 download per account |
would be interesting if the map image was real size, as in taking screenshots of each level and just piecing it without resizing. i've always wanted this feature or atleast some kind of size toggle :(
|
Quote:
|
What about half-size? :)
|
Quote:
dusty did it by hand in the last level collab: http://forums.graalonline.com/forums...1&d=1213546629 |
It probably wouldn't work very well with lots of levels, even if you had enough memory on your computer. I have a 1:1 of Era's GMAP from a week ago or so and it's 70 MB.
|
yeah but for 2x2 or 3x3 gmaps it should be fine
|
1 Attachment(s)
Hmm lemme just modify my script to also create full / half sized gmaps
Edit: Attached - just replace the .jar file with the NW2PNG.jar in your NW2PNG folder Be warned you can easily run out of memory since when the image is rendered he works with RAW data meaning a 50x50 gmap could be like 1gb of ram while generating the level image before its finaly saved as .png Also like it is scripted now he will create two raw images one for tiles and one for npcs and just mix them together in the end -> in the next release this will be fixed (So currently its useing twice the ram you usually need =s) |
eh tried to run it for once and it said java isnt recognized as an internal or external blahblah
i already have jre installed |
Requesting sticky on this thread, such an awesome feature. :cool:
|
http://forums.graalonline.com/forums...0&postcount=51
yes just look at my gmap it rendered. (Note that I had to add in the NPCs but was simple and took like 5 mins maybe :P) |
sticky plx
|
fu this aint no democracy >:[
also i still havent got mine to work...halp :( |
Quote:
(This is for windows 7, it should be similar for all other windows based OSs) Go to Control Panel -> System -> Advanced system settings. http://i135.photobucket.com/albums/q130/Seichleon/1.png Then click on the Environmental Variables button on the Advanced tab. http://i135.photobucket.com/albums/q130/Seichleon/2.png Look for the Path Variable in System variables. http://i135.photobucket.com/albums/q130/Seichleon/3.png Once you find it click on edit then, try adding something like: ";C:\Program Files\Java\jre6\bin" to the end of the string in the variable value textbox. Make sure to have the semi-colon dividing it from the variable that's before this new one. http://i135.photobucket.com/albums/q130/Seichleon/4.png Then click ok and ok again and try it. Hopefully it should work now. |
This is great, thanks :D
|
2 Attachment(s)
I created a GUI for this.
http://u.graalcenter.org/i/Capture%2...17.59%20AM.pnghttp://u.graalcenter.org/i/windoze.png The source and the binary are attached. To use it, download NW2PNG.jar.zip, and launch the JAR file inside the ZIP. Most operating systems should let you double click it to open it, otherwise launch it via a command prompt with the command "java -jar NW2PNG.jar". Changes from the original:
If you're generating an image for a large map or the program freezes in the middle of generating an image, you probably need to increase the heap size so it can use more memory. Open a command prompt and run the program with "java -Xmx3000m -jar NW2PNG.jar", replacing 3000 with the amount of memory (in MB) you want it to be able to use. I tested this on Ubuntu, Windows 7, and Mac. It was able to generate a 27 MB 1:1 image of Era's map (which is 14x19), although it took about 10 minutes to generate since there was a lot of memory swapping involved. I haven't gotten born2kill's permission to do this, but since he published his source code I assume he's okay with it. My source code is released into the public domain. |
noiz
|
Quote:
i think his idea was that, this code was going to be open sourced because he was talking about putting it on github or something along those lines. i'll tell him that you updated the code when i see him online. |
Just stops at "Generating..." no matter what I do.
|
| All times are GMT +2. The time now is 06:48 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.