Xonotic Forums

Full Version: Img2Map Tool
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think SavageX made this but i cant visit alietrap my sriron browser cant open...

This tool calculates quite fast a landscape in a map format for netradiant all you need to do is to make a small picture in greyscales. ill explain later

First you need to Download JAVA
dont worry no virus etc...
BUT you have to choose your platform(linux/windows...32/64 bit)

YOU DONT HAVE TO REGISTER for those, who only see the two fields with username and password
cds.sun.com Wrote:Optional: Please Log In or Register for additional functionality and benefits.
Or, click "Continue" now to proceed without Log In or Registration.

then continue and click on the link and download it then install it fin


So now the interesting part the tool:
Download the ImgToMap Tool
extract where you want



and then i only know howto run in windows...
create a batch (.bat) file in the folder of the imgtomap.jar
i named my bat "RUN.bat"

RUN.bat Wrote:java -jar ImgToMap.jar
Howto make a bat file:

first create a new textducument (.txt) write the text ("java -jar ImgToMap.jar")
save and rename it replace .txt with .bat

thats all about the setup
now ill show you howto use it:
[Image: 56691170.th.jpg]


the tool:
[Image: 41501385.th.jpg]

for my map "final showdown" i used this greyscale picture:
[Image: e7c02e6582e8193eb7b927009e288f2b2g.jpg]
ORIGINAL SIZE!!


My opinion: the tool is very useful if you want to create good landscapes fast
but you have to play a bit with the settings to get the landscape you want

-Sven ;D
[Image: 29296372.th.jpg]

you can see the mini picture with the standard settings(i only disabled the skybox and gave it a texture) made a good level
it doesnt took a second for me you can see the green box it has the size of a player ingame

try it : right click on the mini picture save as(i mean the picture from final showdown)
and open it in imgtomap....
and then i compiled it in netradiant played the map (added 2-3 realtime lights to see the texture ingame)

[Image: xonotic000003.th.jpg]
[Image: xonotic000004.th.jpg]
[Image: xonotic000005.th.jpg]
[Image: xonotic000006.th.jpg]
I like this tutorial ... i've tried this software
Real cool and usefull for creating terrains but i prefer FATE for creating terrains
Try this script when using bash:
Code:
#!/bin/bash
echo "Running IMG2MAP..."
echo -e "\e[1;31mDo not close this window!\e[0m\n"
java -jar ImgToMap.jar
echo -e "\e[1;32mProgram closed.\e[0m"

Or this one with sh:
Code:
#!/bin/sh
echo "Running IMG2MAP..."
echo "Do not close this window!"
java -jar ImgToMap.jar
echo "Program closed."

Put it into the dir, and name it "run.sh" or something, then make it executable, ie. by chmod -x run.sh. There's no real difference between those two scripts, and the text is only a reminder not to close the terminal window. And the bash one got pretty colors.
Heh, it's nice to know people still find that little tool somewhat useful. The sources are available at http://svn.icculus.org/nexuiz/trunk/misc.../ImgToMap/ - and perhaps they should be moved to a better place or whatever.
It's also in the Xonotic repo (http://git.xonotic.org/?p=xonotic/xonoti...94;hb=HEAD). @Minkovsky, just run "java -jar ImgToMap.jar &" and it will run in the background, so it will not matter if you close your terminal emulator.
But then it won't give easily copiable debug info for debugging java exceptions.
You could also write stderr to a file like "java -jar ImgToMap.jar 2> i2m-errors.txt &". Then you can just cp i2m-errors.txt, but I guess it's just a matter of personal preference Smile