Jump to content
Sign in to follow this  
Homer Johnston

Road Painter tool (development thread)

Recommended Posts

Thanks Shezan...

There are a few things mentioned in my last post which I would love to have help with, from you or anyone who is capable of it:

1) Create an addon for all road parts (basically, copy out the roads from Lester's/MapFact's Editor Update but use a HOMJ_ tag instead of MAP_). Thanks Sgt.Ace for giving me a start for this!

2) Create an application which can inject roads into a PEW file (maybe if you're Albert Einstein). :p

3) Create a very basic command window application to allow this:

  • ArmA sends one of the following strings to the clipboard:
    • ARMA2_HOMJPAINTER^WRITE^P:\FILENAME.TXT^LINE1^LINE2^LINE3^...
    • ARMA2_HOMJPAINTER^READOUT^P:\FILENAME.TXT

    [*]The application will wait to see the ARMA2_HOMJPAINTER tag in clipboard data, and either write or read data as specified, using ^ as a separator

    [*]The application will then send one of the following strings to the clipboard for ArmA to read:

    • ARMA2_HOMJPAINTER^RETURN --- tells arma that the write operation is done
    • ARMA2_HOMJPAINTER^READIN^LINE1^LINE2^LINE3^... --- tells arma file contents

If you, or anyone, wants to give any of these a shot then just post so here, and keep me informed with any progress you are able to make. :)

Also if anyone could actually do item (2), they would soon be a god to all island builders...

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

Sounds awesome.

If only we had our own program which could inject roads into PEW's.

Yes, if only.

BIS? You listening?

Share this post


Link to post
Share on other sites

Could be implemented into mikero's PboDll probably. Since I am working on another project I will ask him to do it. Maybe he has time :)

Share this post


Link to post
Share on other sites

Do you think it's possible T_D? I don't know anything about the PEW file format, how "accessible" it is... or what road networks look like in it.

If we could automatically inject roads & keyparts from txt files, then I suspect road building would become a matter of days, instead of months... :o

Share this post


Link to post
Share on other sites

PEW format is known so yeah it is possible.

Share this post


Link to post
Share on other sites

This isn't dead! But I'm also not releasing it just yet. I had some personal-life hiccups a couple of weeks back which derailed my personal projects a bit. I also needed a break from coding tons of SQF, so I learned C++!

Since last update, I've learned enough C++ to write my own program which will replace Leopotam's, so that I can better customize it to my needs - this means saving and loading data, and fixing that odd error message Visitor gave when importing.

With the in-game tool, I can now place key-parts, draw road sections starting from their connection points, and attach key parts to the end of road sections (in short: draw roads just like Visitor). The export button automatically writes each section to a separate file so you can draw several sections, hit export, then go import them sequentially in Visitor.

A few simple images to demonstrate:

Selecting/placing a keypart

Some road sections named R1, R2, R3 ... blue dots are keyparts

What happens when I press the export button

What I can't do yet:

-move entire roads by dragging/rotating keyparts

Why I haven't released anything yet:

-learning C++ / writing my own app

-trying to learn PEW file format

-I wrote the entire tool in far too big of a hurry last month, and have been having trouble cleaning it up (messy code, bugs and instability); I've been slowly rewriting large portions of it

-I've been playing too much Mount & Blade Warband :o

As always, comments or suggestions are welcome. I am really desperate for help on a way to write roads directly into a PEW - I just don't know enough about deep binary file contents to understand that BIKI page and match it to what I see when hex-editing a PEW. There are very few people in the community that know how to do this... maybe someone with a Computer Science degree would know more. If anyone has any tips for me, please share!

Share this post


Link to post
Share on other sites

I think we can "accept" the problem to pass through Visitor3 to have our roads...

Actually you did a fantastic work! Keep in mind your tool will never be a "1.000.000 dummy user's tool" but will be used only by island makers.

And island makers needs V3 to make everything else (so, V3 must be well known and used by everyone)

Do you need a beta tester? :)

Share this post


Link to post
Share on other sites

Updated root post contents:

- v0.1 (beta, non-preview) now available for download

- new youtube tutorial video

This is a buggy release. There's a lot of bugs that I know about. There's a lot that I don't. Feel free to share them all :) If you have ideas for other improvements, say them as well; this tool suffers from the fact that its designer hardly actually uses it, so he may be oblivious to its flaws.

This weekend I'll try to post an update which will allow for camera-rotation, and maybe some small fixes.

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

Homer, will certaintly try this out when i get home. Map makers will def appreciate this tool man

..Holy crap just watched that tut vid. really sweet tool

---------- Post added at 10:03 PM ---------- Previous post was at 08:16 PM ----------

Homer, i get an error saying

"P:\RoadPainter\HOMJ_RoadPainter.exe

The application has failed to start because its side by side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail."

Any idea?

Edited by ebanks129

Share this post


Link to post
Share on other sites

Link temporarily disabled; give me a day to figure out why that happened (I'm pretty new to C++ :p) Thanks for the heads up!

Share this post


Link to post
Share on other sites
Link temporarily disabled; give me a day to figure out why that happened (I'm pretty new to C++ :p) Thanks for the heads up!

no prob man. Other than trying to run the roadpainter.exe. Runs greats in Arma2! i can get roads done in 2 days with this tool rather than weeks. A big time saver. and thats for a 20km x 20km map.:cool:

sweet.

Share this post


Link to post
Share on other sites

Hi Homer!

Really like the improvements!

I've been happily using the previous version and getting on very well with it... I'd evolved a little routine of roadlaying, exporting, importing, placing the next keypart - copying those microexact six decimal place keyparts coords into the road painter for the next starting point... and... thats the little bit I see is missing in this version - being able to manually enter coords and direction for keyparts...

I quite liked that option... I notice the mousepointer reports its current coords so reasonably accurate placement would be possible - and, to be honest - if you're starting a new area or network it's fine... but if you're adding branch roads to a network you already have down - you're likely to have a keypart in place you'd like to branch a road from...

It would be nice to have the option to manually enter exact coords as well...

Other than that point its a big improvement all round - much more professional and immediate to grasp... I particularly like how in this version - as you're wiggling the spline line about the place deciding where to go next it's now an actual road you see... I'd got quite used to the previous dot arrangement - interpreting the colours and guessing the curves - but of course this is just so much better - you see the actual road - as it will be - before you commit to the placement.... just excellent! - eliminates guesswork entirely... Really like that bit!

Anyway.... I guess that's all for a first impression... I have plenty more roads to lay, so I'll give the new beta a longer workout over the next day or two... once I finish smoothing the last lot!

Great work all round mate! Road-laying is actually fun again!

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Thanks for the input; I'll see if I can put a dialog back in for placing with manual X,Y, Dir coordinates. :)

On another positive note, I've spent all evening doing some trial and error with a hex editor, and have finally started to understand the PEW file format a little... another couple evenings of experimentation to get my understanding solidified, and then I'll need to learn some more advanced file writing techniques in C++... and then after a few weeks of work, hopefully you won't need the manual X-Y dialog because exporting from ArmA & importing everything to PEW could be a one-button-process without using Visitor at all ;) it's starting to get pretty complicated at this point though, and could take a pretty long time - I have no idea what exactly I'm getting into yet.

Then if that concept all works I'll be able to get to work on an ability to save/load your progress in the Painter tool...

Share this post


Link to post
Share on other sites

Thx for the release! :thumbsup:

ArmedAssault.info Mirror and News:

9166467.gif

We have also added this release to your personal author profile

If a release or contact information is missing, feel free to drop a PM, it will then be added.

And here is the BBCode if you want to add our Mirror to your release post :

[url=http://www.armedassault.info/index.php?cat=utilities&game=1&id=89][img=http://www.armedassault.info/mirrorgen2/9166467.gif][/url]

If you prefer a text only BBCode please copy and paste the code below :

[b]ArmedAssault.info Mirror :[/b]
[url=http://www.armedassault.info/index.php?cat=addons&game=1&id=89]DOWNLOAD - Road Painter tool (v.01beta) - [131 KB] from ArmedAssault.info[/url][/spoiler]

Share this post


Link to post
Share on other sites
Thanks for the input; I'll see if I can put a dialog back in for placing with manual X,Y, Dir coordinates. :)

On another positive note, I've spent all evening doing some trial and error with a hex editor, and have finally started to understand the PEW file format a little... another couple evenings of experimentation to get my understanding solidified, and then I'll need to learn some more advanced file writing techniques in C++... and then after a few weeks of work, hopefully you won't need the manual X-Y dialog because exporting from ArmA & importing everything to PEW could be a one-button-process without using Visitor at all ;) it's starting to get pretty complicated at this point though, and could take a pretty long time - I have no idea what exactly I'm getting into yet.

Then if that concept all works I'll be able to get to work on an ability to save/load your progress in the Painter tool...

You are maybe interested in using mikero's DePbo.dll which provides methods to read, edit and save PEWs. I am pretty sure he would give you access to the source code if you ask him. Maybe saves you some time.

Share this post


Link to post
Share on other sites

I agree with bushlurker's request. Having a manual way to place keypoints should be veeery useful for precise laying.

Another small request (if it's possible, i dunno).

When i place road pieces in my "usual way" i use this method:

Bulldozer open, placed in "first person" slightly above the placed road.

In this way i will decide and see what's the slope of the valley i'm building so i insert 3-4 pieces in V3 and check the result coming back with focus to Bulldozer. This is a semi-visual method :)

My small question, for release 1392 :) : it is possible to change visualization from strict TOP view to something like a elevated first person view? Following the bottom of the valley will be very accurate (i'm currently placing some dirty roads outside satmap roads and sometimes elevation model doesn't match perfectly with roads...

Share this post


Link to post
Share on other sites
My small question, for release 1392 :) : it is possible to change visualization from strict TOP view to something like a elevated first person view? Following the bottom of the valley will be very accurate (i'm currently placing some dirty roads outside satmap roads and sometimes elevation model doesn't match perfectly with roads...

Yeh, I was about to suggest similar. The top-down view is fine for laying, but to visualise the landscape you are laying on, and to pick the best path (keep in mind I'm talking about non-reality based terrain, ie no roads already) around hills and slopes etc, it would be nice to have a key or button that would allow say a 45deg view that can rotate. But this view is not for laying (probably too difficult for you to code), it just to visualise the surroundings for a brief time.

BTW again, super cool software!

Share this post


Link to post
Share on other sites

I thought the same thing about the first beta... and "requested" a perspective view a few pages back - for exactly the same reasons as Shezan...

It would be nice to view the roadtool procedure from other angles than vertically downwards whilst roadlaying - to be able to pan around like Visitor would be nice... we're not all following perfectly matching google Map overlays for our road networks guides y'know - mine is a crazed jumble of shapefile layers and bits of satimage cobbled together in ENVI, for example, and since I've reduced scale so much - it's simply not practical to follow every turn of every road... being able to "see where we're going" from a sortof perspective view would be supernice - tho possibly not practical from a coding point of view?

I figured, like Gnat - it might actually be tricky to code roadlaying while in angle view - but to "see where you're going" now and then would be invaluable... essential in fact, when you're "improvising" minor roads and paths in particular...

I'm pretty sure Homer said he would be implementing such a feature - even quoted potential key-controls, So I'm fairly hopeful it'll appear in a future release...

I must admit that, though I prefer the new Beta in every way - I'm still using the older one... :o ... purely 'cause I'm adding secondary road networks at the moment... they all branch off the main highway - which is already in place - with T-junctions also in place - so I have those hyperexact keypart coordinate and direction figures, and really prefer to enter them manually for the sake of precision...

B

Share this post


Link to post
Share on other sites

Thanks T_D, that could help! I will be looking into that.

Cam controls are relatively easy, you guys will see them at some point, when I get around to it...

I must admit that, though I prefer the new Beta in every way - I'm still using the older one...

Whatever gets the job done. ;)

Share this post


Link to post
Share on other sites

v0.11 Beta: this is not a new release and will not be posted on the first page (although it should be fully functional, I think). This is to demonstrate a possible new camera script - I ask for volunteers to please download this, try it out, and give me any feedback to improve it before the weekend.

TEST VERSION

http://dl.dropbox.com/u/4621600/RoadPainter_v11_CAMTEST.zip

I want to know:

- Does it feel easy enough to get used to and use? (it took me a few minutes of moving around with it to get used to it - how about you?)

- Do you have any ideas for alternate control schemes which might work better? (bearing in mind that most road-laying will probably be done from a top-down view, so I'm trying to keep the RTS-style mouse-panning instead of operating it like a first person view)

How to test:

1) Load in editor as usual

2) Use WSAD to control camera pitch & direction

3) Mousewheel controls camera height (and influences pitch slightly as well)

Edited by Homer Johnston

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×