Jump to content
Sign in to follow this  
m1lkm8n

M1lkm8ns roadpainting source files for quantum gis

Recommended Posts

hey guys I wanted to do a quick tutorial in quantum gis for to show you don't need to spend a ton of money on global mapper when It can be done just as easy in qgis.

I made a video tutorial because I found it easier to explain. also included are the files to get you going.

hope this helps you guys.

source files:

https://www.dropbox.com/sh/v7xxbi8i2368c08/lC6JAuBDOU

youtube:

finished picture:

http://i.imgur.com/3RhCZ4C.jpg

a few edits-

1) make sure that .cfg, .shp, .dbf, .shx and .prj are all added to the list of files to copy directly in binpbo otherwise they will not be copied during binarization.

ps I stole zerogs naming scheme. hope you don't mind :)

Edited by M1lkm8n

Share this post


Link to post
Share on other sites

hey M1lkm8n, i followed your tutorial but i must do something wrong because everytime i save my roads into a .shp file it is empty (weight 1kb, no vectors inside).

Did i miss something ?

Share this post


Link to post
Share on other sites

Hi

thanks for work on Tutorial .

I had some problem linking vocal to visual but thats the free cam softawre :)

cheers

Edited by Sealife

Share this post


Link to post
Share on other sites

Ok, i solved my issue.

At the end of your video, you should specify that you need to save your layer as a vector file with UTF-8.

Also, if you use binpbo to pack your map, the "roads" folder is probably missing. I had to unpack it and add the folder manually and finally repack it with cpbo.

Anyway, i should also say thank you for showing us the way. You rock Milkman !

Share this post


Link to post
Share on other sites

Yea I need to update it. I was gonna redo it with better video. Also make sure in binpbo that under options .cfg,.shp,.dbf,.prj,.shx are added to list to copy directly or like you said the roads folder won't be copied

Share this post


Link to post
Share on other sites

hmm doest it need all them or just the .shp file ? thats all i see in the terain config that is linked ?

Also this UTF-8 i cant see it , does he mean the WGS84 -- 31n ?

Share this post


Link to post
Share on other sites

Yea in the terrain config that's all that's linked in there but it requires all of those files listed. When you export your vector shape file those files will be created for you.

Share this post


Link to post
Share on other sites
hmm doest it need all them or just the .shp file ? thats all i see in the terain config that is linked ?

Also this UTF-8 i cant see it , does he mean the WGS84 -- 31n ?

I mean when you do "save selection as vector file" (final step) :

QSvXfd6.png

Share this post


Link to post
Share on other sites
I mean when you do "save selection as vector file" (final step) :

g[/url]

AH thanks Both

Share this post


Link to post
Share on other sites

I have some questions ,seems something is not right for my terrain , hopefully you can Help

The 200000 for bottom left point in the raster you mention what is it based on ?

I use the 20840*20840 mask for the raster pic

I have a 2048 terrain at 40m cells giving me 81920m

so bottom left i give 200000 aand 0

so top right i give 281920 and 81920 (map size)

So if i use for instance the stratis Shp fie etc the roads show in the bottom left corner of my map as expected [0,0,0] is bottom left in Game world space .

Now my roads from th suggest coord you gave when i use that .shp are way out in space (on land but maybe 100,000 km out)

i then open qgis and import the stratis .shp and again it shows that my coord are way out ,

Have you any advice ?

Cheers

Share this post


Link to post
Share on other sites

When placing your gcp points the bottom left should be 200000 and 0 and the top right 281920 and 81920. Then from there you should be able to lay down vector lines which will be your roads in game.

Maybe you are not exporting them correctly?

Are you saying once you rectify your image then load the actual stratis roads they show correctly in the bottom left corner of your map?

If so your raster imaging is then correctly rectified so you may be exporting them incorrectly.

Share this post


Link to post
Share on other sites

Hi my GCP points are as you say but when i import the startis point so see corrolation they a not bottom corner of my map buts about 100,000 km ( guess) south west from th bottom of my map .

could be me but i usually have a good handle on things , i will look at the Startis WGS84 is it also using 31N , maybe this could be the problem ?

I Use startis sat long lat in my CPP just or corelation not sur it effects anything though .

Share this post


Link to post
Share on other sites

Hmm at the start of georeferencing what zone did you put it in?

Share this post


Link to post
Share on other sites

WDGS84 /UTM Zone 31 N

is that correct ?

thanks for help btw

Share this post


Link to post
Share on other sites
WDGS84 /UTM Zone 31 N

is that correct ?

thanks for help btw

That's what i use and it is working perfectly.

Share this post


Link to post
Share on other sites

hi

what size map may i ask ?

If it work for you i think its fault on my end , i scan pbo and all files are in and .cpp newRoadsShape = right path

Share this post


Link to post
Share on other sites

I use a sat map of 20480x20480.

The only thing i can think of is that you dont place your GCP points correctly.

Share this post


Link to post
Share on other sites
I use a sat map of 20480x20480.

The only thing i can think of is that you dont place your GCP points correctly.

my cell size is 40M so 81920m or 81.92km Square

I place bottom left of image and top right with respective co-ord 200000 and 0 and 281920 and 81920

I am retry now , i think maybe my mistake is possibly , you see in video he start with Road raster/vctor already there i dont see how he does it , unlss i open his own file rectified.qgs maybe this where i go wron , because i do this then i set out new raster and do the points etc.

Share this post


Link to post
Share on other sites
my cell size is 40M so 81920m or 81.92km Square

I place bottom left of image and top right with respective co-ord 200000 and 0 and 281920 and 81920

I am retry now , i think maybe my mistake is possibly , you see in video he start with Road raster/vctor already there i dont see how he does it , unlss i open his own file rectified.qgs maybe this where i go wron , because i do this then i set out new raster and do the points etc.

When you open the rectified.qgs file I included inside should have a layer called roads. The only thing that's included on it is the attribute table for the roads. You have to rectify your raster to the cordinates I talked about in the video. The cell size of you map doesn't matter(apart from it making you island size bigger)

Which I should mention is enormous. If this is your first island I may suggest trying something a little smaller. Frankly unless your making a giant space for air battles I don't see the point in making an island that big.

Your day map will be stretched beyond 1 pixel per meter making it not a high resolution. I would try something smaller then move on to a project that big.

Or do like I have for my a3 testing purposes a very small island.

I know the video is a bit hard to see. I'll try to redo it in the next day or so.

Share this post


Link to post
Share on other sites

No its not first Terrain , i made them since OFP , i play Single player only

Dont worry about size its easy to fill am map with when you know how to export from mission to Visitor using simple squares as place holdrs and changing in notepad before import to visitor.

Also small script can copy all objects on stratis ,takistan ,etc etc and import to Visitor if P:drive set up good, large map exact same as a smal , the ony difference being the time to Bniarize ;).

I think the problem for me is the a- a2 set up , it would seem if you work in A2 pdrive and Binarise with A3 things then yu wont get no doors open etc etc ,

thing like this are the mad thing i hate

Class Land_city_8m_f exists, but there is no property class in a3\structures_f\walls\city_8m_f.p3d

If you work in A3 Pdrive then Binpbo doesnt like the new inheritancte particularly Proficenamespace in the colourbackground section of the CPP.

I think best i leave roads till iget doors opening then come back,it seems your video and the added things in last 6 posts are all i need to be doing , i just need to get the Set up correct when Binarizing the whole package .

Share this post


Link to post
Share on other sites

My mistake then :)

I honestly have had no problems getting everything except the normal map sat layer working 100%. Doors and other animations were working fine last time I checked. Did u move all the a3 configs into your project folder?

Share this post


Link to post
Share on other sites

Yeah Moved them to my namespace folder ,

but that Breaks it now becasue of that Namespace in the cofig for Backgounds i think the line :

colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",

throws up the error

String STR_EVAL_TYPENAMESPACE not found

Error in expression <(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])>

this cuts of the process and Binpbo simply packs like nothing happened but obviously it dont pack the pbo properly.

think ill go back to A2 style and reflect , i was nearly there lol th terrain with no objects and roads work perfect But Binpbo dont like A3 for some reason.

Edited by Sealife

Share this post


Link to post
Share on other sites

So, I'm back to working on my Australian outback terrain, and one thing that is really killing the atmosphere for me is when you get to the map limits, where the outside terrain continues on to infinity as expected, the roads end abruptly, does anyone know if there is a way to get the roads made with the use of the shapefiles to continue on into the outside terrain? maybe including some classes in the outside terrain class?

if this is not possible, i think it would be a good feature for the Bohemia to include, not sure on other peoples opinion???

In my case i have a outback map where i have several roads that lead to the map limits and would IRL be leading to the next towns, which might be over 500km away, at the map limits i have signs similar to the image below, and i just want to be able to have the roads disappear into the distance in the outside terrain simulating those massive distances.

outback_fuel.jpg

Mongolia-steppe-dirt-road-disappearing-into-the-middle-distance-through-grassland-under-blue-skies-1-CKB.jpg

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×