It is currently Wed Apr 30, 2025 11:30 pm

RUNNING WITH RIFLES Multiplayer

test

Game servers 48 List provided by EpocDotFr | Players online 55


All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Custom map tutorial
PostPosted: Tue Aug 09, 2011 10:17 am 
Offline

Joined: Fri Jul 22, 2011 11:49 am
Posts: 42
Map making is considerable easy once you know what to do.
The condensed version:

Programs needed
Inkscape (Vector Graphics for placing elements)
ImageMagick (For bulk photo conversion, not really needed but it is well suited plus pasik left in some assets for it)
And any 'good' raster graphics program (Photoshop, gimp or paint.net)
7zip (should come prepacked with every distro, although there are some very easy workarounds for both your sake and simplicity sake just get it)

Map assets
objects.svg (vector graphics format image used for placement)
terrain5_alpha_(road, sand, grass).png (texture placement of the ground)
terrain5_heightmap.png (height map, determines height)

Step 1.
Open objects.svg in incscape, it proved as good base to work with and provides everything you will need. Different layers hold different types (Ctrl+shift+L to view the layers tab) All of the road, sand, grass ... are to my knowledge (untested) not used in the map they do provide a neat way to work on them all.
Walls, objects and bases have tags used by RWR to determine their subclasses (They can be seen in object property's in the description a variable along the line of
Code:
name=Airport;
In the example the variable determines the written name of the base)

Step 2. Assuming you know your way around inkscape just dive in and layout everything, roads, bases etc (If not take a lesson in incscape 101 very basic skill would be needed to create the map). Be careful placing walls as they don't follow the height map so they must be on flat consistent ground. It is a good idea to use the old map as a point of scale

Step 3. Export all the things, open the potential terrain5 layers (sand, dirt, height) individually and got to File-export bitmap since incscape saves prefrances religiously the correct setting should be already set up (2048p square) just change the fiulename and directory and you are set to go. Make all the names respectively sand.png, road.png, asphalt.png and height.png, ignore dirt. Place all the new files into a zip folder called map.zip. (At this stage it could be a good idea to export all desired elements for the ingame map)

Step 4
Working on the heightmap, open up height.png (ignoring that you just needlessly put it in a zip folder) in your favorite raster editor (I'll be using photoshop, everything is pretty simple and should be easy in everything else), in a new layer go filer-render-cloud to create a random blotchy noise type scenario make sure this is under your once-vector heightmap. Blur the old height map so it keeps its form but allows for some smooth transitioning (Might need to trial and errors it a bit), I find blurring individual elements one by one the best way. when done save as an 2048 square png and add it to map.zip.

Step 5.
Working with magic is surprisingly easy, once all your files are ready run process.bat (Or make your own .bat file with the following source)
Code:
mkdir temp
cd temp

rem configure your zip application here:

"c:\Program Files\7-Zip\7z.exe" e ..\map.zip
cd..

rem you need ImageMagick convert.exe

rem splat files: extract alpha channel, 8-bit greyscale, apply some gaussian blur
convert.exe temp\grass.png -alpha extract -depth 8 -gaussian-blur 3x3 terrain5_alpha_grass.png
convert.exe temp\sand.png -alpha extract -depth 8 -gaussian-blur 3x3 terrain5_alpha_sand.png
convert.exe temp\asphalt.png -alpha extract -depth 8 -gaussian-blur 3x3 terrain5_alpha_asphalt.png
convert.exe temp\road.png -alpha extract -depth 8 -gaussian-blur 3x3 terrain5_alpha_road.png

rem heightmap to 513x513, 8-bit greyscale
convert.exe temp\height.png -type Grayscale -resize 513x513 -depth 8 terrain5_heightmap.png
pause
rmdir /s /q temp


Additional notes due to what is presumably a bug clean up all your sand.png-like files from any RWR directories. Since they share the same name as the textures you get some very terrible looking sand.

I may have missed some stuff but i think you should be able to fill in any gaps.
EDIT: Made this before i saw pasik's tutorial, well i think mine is still better so it can stay :)

_________________
Image
Oasis. Less Running, more rifle.


Last edited by Mystery on Wed Aug 10, 2011 8:11 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Tue Aug 09, 2011 11:09 am 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
This is greatly appreciated, thanks for the tutorial!

Btw, the correct size for textures is 2048x0248.

My tutorial wasn't even a real tutorial, it was just to quickly mention what kind of steps there are if you end up trying to mod a map :)

My way to deal with the Step 3. is to save the file in inkscape as JessyInk zip, which automatically saves all the layers as separate png-files in a zip, to avoid some manual work there. It's somewhat slow at processing (but did I say it's automatic?), but you only need to do this if you modify the terrain, i.e. sand, grass, dirt, asphalt or road. If you only work with the various objects, you can get away by just saving the objects.svg.

I nowadays also work with the heightmap directly in inkscape. Inkscape filters can create just fine random noise (there's a heightmap filter in objects.svg as an example), and then I add some blurred rectangles to even out certain areas in the height map for buildings. The trenches can also be digged in the heightmap by copying the trench sections into the heightmap layer and filling them with black with some certain amount of opacity.

You can create trenches also on a curvy heightmap area by making the trench path have enough nodes. Each segment of wall gets separately positioned according to the height at the segment center.


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Wed Aug 10, 2011 9:06 am 
Offline

Joined: Fri Jul 22, 2011 11:49 am
Posts: 42
Fixed the dimensions.
I think i'll expand to this later with some of the trick for map making in inkscape (Once i actually learn a few more)

I find dealing with the height map is mostly about effectively blurring, personally i get a whole lot more control in Photoshop plus inkscape is terribly slow at rendering blur.

_________________
Image
Oasis. Less Running, more rifle.


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Wed Aug 10, 2011 9:20 am 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
Mystery wrote:
Fixed the dimensions.
I think i'll expand to this later with some of the trick for map making in inkscape (Once i actually learn a few more)

I find dealing with the height map is mostly about effectively blurring, personally i get a whole lot more control in Photoshop plus inkscape is terribly slow at rendering blur.


I know what you mean. I'm myself just fine with trading off the rastering control Photoshop/Gimp provides in favor of being able to move around and modify the heightmap objects when I make changes to buildings or walls + using single application for the whole process. Blur rendering is a bit slow though, but I can live with it. There are options in preferences in inkscape to use multithreading for gaussian blur which helps a bit if you have a multicore CPU.


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Fri Apr 27, 2012 10:50 pm 
Offline

Joined: Sun Apr 22, 2012 5:19 pm
Posts: 72
Heyho,

could you upload a simple template map?

Just everything flat + 2 Basis with Startpoints.

Thanks in advance!

_________________
Open Red Alert:
http://openra.res0l.net/


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Fri Apr 27, 2012 11:32 pm 
Offline

Joined: Sun Apr 22, 2012 5:19 pm
Posts: 72
Also what does this mean?

Quote:
Step 3. Export all the things, open the potential terrain5 layers (sand, dirt, height) individually and got to File-export bitmap since incscape saves prefrances religiously the correct setting should be already set up (2048p square) just change the fiulename and directory and you are set to go. Make all the names respectively sand.png, road.png, asphalt.png and height.png, ignore dirt. Place all the new files into a zip folder called map.zip. (At this stage it could be a good idea to export all desired elements for the ingame map)

_________________
Open Red Alert:
http://openra.res0l.net/


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Fri Apr 27, 2012 11:41 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:58 am
Posts: 1662
Location: Western Europe
Petrenko wrote:
Heyho,

could you upload a simple template map?

Just everything flat + 2 Basis with Startpoints.

Thanks in advance!


Just open: ../media/maps/map2/objects.svg with http://inkscape.org/ for example. In the layer window (ctrl+shift+L) you can see all the layers. Just delete every object apart 2 spawnpoints "rectangles" (sublayer of layer1 called "spawnpoints") and 2 bases rectangles (layer "bases").


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Fri Apr 27, 2012 11:46 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
Petrenko wrote:
Also what does this mean?

Quote:
Step 3. Export all the things, open the potential terrain5 layers (sand, dirt, height) individually and got to File-export bitmap since incscape saves prefrances religiously the correct setting should be already set up (2048p square) just change the fiulename and directory and you are set to go. Make all the names respectively sand.png, road.png, asphalt.png and height.png, ignore dirt. Place all the new files into a zip folder called map.zip. (At this stage it could be a good idea to export all desired elements for the ingame map)


Basically it's same as this:

pasik wrote:
My way to deal with the Step 3. is to save the file in inkscape as JessyInk zip, which automatically saves all the layers as separate png-files in a zip, to avoid some manual work there. It's somewhat slow at processing (but did I say it's automatic?), but you only need to do this if you modify the terrain, i.e. sand, grass, dirt, asphalt or road. If you only work with the various objects, you can get away by just saving the objects.svg.


The idea is to get the "terrain splat" layers (sand, grass, asphalt, road) out from inkscape as separate image files to be processed by process.bat in order to become something RWR expects to get.


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Sat Apr 28, 2012 3:30 am 
Offline

Joined: Fri Apr 27, 2012 3:27 am
Posts: 7
Hopefully this means we'll get to see some unique, creative maps. I look forward to seeing what everybody comes up with!


Top
 Profile  
 
 Post subject: Re: Custom map tutorial
PostPosted: Sat Apr 28, 2012 8:09 am 
Offline

Joined: Sun Apr 22, 2012 5:19 pm
Posts: 72
Hi,

where do i have to install imagemagick?

Do i have to edit the process.bat? i got my 7zip installed somewhere else.

Also i only found a portable imagemagick-installation.

_________________
Open Red Alert:
http://openra.res0l.net/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group