Jump to content
Sign in to follow this  
Homer Johnston

Road Painter tool (development thread)

Recommended Posts

Hi Homer!

OK - gave this a try on a couple of test roads... as you say - took a couple of minutes to get used to... I settled into a "chase view" sort of angle most of the time - with mousewheel used to scroll to a higher perspective occasionally... Worked great!

This is MUCH better than a fixed top-down view.... its nice to be able to scroll up and look down on the road you've laid - checking for "unnatural" bends or angles - but the main drawback of that perspective is you lose a lot of the sense of elevation... If you're laying a road "blind" between two hills, from directly above it can be hard to see exactly where you're putting the road... from a "chase view" angle you can clearly see the "valley" and stick to it, from above you might find yourself wandering "upslope" a little - and that can cause major damage to the hill when you try to "smooth roads" later...

A little tricky keeping the action "centre stage" using the WSAD keys - mousewheel essentially already does the same thing as W&S... I found myself expecting W&S (or the arrow keys) to keep the view at the same angle - just move the "camera" forwards or backwards - mainly 'cause thats close to how I have visitor setup... camera view locked on cursor, mouse left/right for 360 pan around the cursor, forward/back for vertical angle - scrollwheel for zoom, and the arrow keys for actually physically moving the cursor around the landscape...

Speaking of buldozer keys...

Would it be possible for you to code to "read" the <name>.arma2profile file that everyone has, check to see which keys are defined for basic buldozer movement - and just use them?? - How hard would that be?

It would mean that, however you happen to have buldozer setup - the roadtool would behave the same way... no keys to learn or setup required!

Just a wild idea.....

No other problems with this version... I'd still like that manual coords & direction entry option sometime though... ;)

Fantastic work! Community Utility of the Year!

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

The new camera views gives this tool way more flexibility and took very little time to get used to. My only gripe would have to be the mouse not being able to control to position of the overhead view. It only just collides with the edges when you expect it to move the camera. Very minor but you might want to consider adding a guide(info popup on startup?) that lists all the controls. Excellent work so far!

I have been placing roads like crazy tonight and one small thing I would like to see in the future, the ability to "step back" while constructing a road and make corrections to specific sections. But I already mentioned that earlier.

Also it would be nice to see the angle for a keypart in the GUI(information box with position/angle?). Then I would just have to place a keypart in visitor, input the angle and the Y/Z and import my road work with very little tweaking. Food for thought.

Hope these suggestions make sense :o

Looking forward to your next update!

Edited by prowler.wolf

Share this post


Link to post
Share on other sites

Homer, i think the "perspective view" will be the most used view type. IMHO it should be considered as the "default" view, so keys must be optimized for this mode.

It's my opinion, of course :)

Nice work ;)

Share this post


Link to post
Share on other sites

I have tested the tool in the "vanilla" version and it rocks ...

That kind of tool as the Mask Mapper item is going to change map-making.

Nice to have people working on the tools enhancement !

Share this post


Link to post
Share on other sites

Homer... 10 days passed since your last post, don't leave us alone :)

Where are you? i'm waiting for your road placement tool! :p

Share this post


Link to post
Share on other sites

I'm having a quite critical problem with the roadpainter tool, sometimes it generates invalid roads according to visitor, when you check road angles some of the objects turn out red, BUT this happens to me with in-visitor made roads as well only now they wont render in bulldozer or the game. Have i set up the roads badly or what?

Share this post


Link to post
Share on other sites

Homer this has been a great tool to use, although my islands only small I've managed to throw in a road network very quickly using this tool, thanks alot for the effort, nice too see all you clever tools guys helping each other out aswell.

Share this post


Link to post
Share on other sites

Unfortunately, I think I'm going to have to disappear for about a month... it's complicated, but basically I have deadlines for other things in life for the end of June (moving apartments, projects with other people who are moving away, other odd things)

I have been doing a lot of other general coding-learning, and I think what I'm going to do is rewrite this tool from the ground up with everything I've learnt so far. I still plan on having something which will completely replace all usage of the Visitor tool, sometime this summer. Thanks for the kind words guys, they make it worth it :)

I'll certainly post any updates, but they will be sparse at least until I find a new place to live near the end of June...

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

I've only tinkered with the program so far and love it. Just wanted to say thank you for the time and effort. I'll definitely keep an ear to the ground for the new program.

Share this post


Link to post
Share on other sites

Real Life has to take priority Homer... Fascinating endless fun island making may be, but it's just a game... ;)

I've been using this program to death over the last week... a combination of the first version where I want to use the precision of manual coords entry - and the recent camtest version for everything else... A couple of evenings and you use the mouse/KB controls without even thinking - quick, easy, efficient... just brilliant...

(interesting side question - IS there a way to measure total road mileage in a project??... anyone know?)...

I reckon that were it not for this program I would have eventually given up on my project - it's just so big... now I'm about 75% roads done and I'm starting to look at Shezan's new tool and actually believe I may even get to that stage soon!

Thanks for all the effort and development you've put into this... a whole quantum leap better than anything we've had previously...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Take your time homer, we will be there when you will come back :)

Share this post


Link to post
Share on other sites
I still plan on having something which will completely replace all usage of the Visitor tool, sometime this summer.

That'll be definetly my summer Christmas :):)

Wish you luck with your RL projects, Homer...:cool:

Share this post


Link to post
Share on other sites

Hey guys, I've just started trying to use this tool. I've set it up correctly I think and managed to draw some roads and export to a text file. Problem is, when it comes to importing the text file into Visitor, it doesn't work. Comes up with an error "Unknown component 'ca\roads2\asf1_25 (skipping)". If I press OK it goes through every road section in the text file. If I cancel it does nothing.

Few questions as well:

- Do I still need to use Leopotams "Arma Offline Storage Monitor" for 0.1Beta version?

- Does export file need to have same name as that of name of road network in Visitor?

Any ideas what's wrong?

Share this post


Link to post
Share on other sites

Hi waterman

Before importing roads you must have them defined as objects in our road definition.

A road definition is the set of pieces that can be used from a road type. Includes straight parts, turns (with radius) and special parts.

If you're able to deploy a road using Visitor 3 functions you will be formally able to import roads.

Something is on V3 manual:

http://community.bistudio.com/wiki/Visitor_3_Manual

Edited by shezan74

Share this post


Link to post
Share on other sites

Hi shezan,

Thanks, but I alread know this and road sections have been defined in Visitor. I can place them normally in Visitor, but it will not import from text file properly.

Share this post


Link to post
Share on other sites

Are they pre-defined in your working pew/open island in Visitor BEFORE you try the import ?

(We'd assume you have them de-pbo'ed and available because you said you've placed them in Visitor before.)

Share this post


Link to post
Share on other sites
Gnat;1647580']Are they pre-defined in your working pew/open island in Visitor BEFORE you try the import ?

(We'd assume you have them de-pbo'ed and available because you said you've placed them in Visitor before.)

Yes, they are pre-defined before I try and import the text file. I've only defined the asf1 road sections at the minute as that's all that im using in the road painter tool.

Maybe im not doing something right with the key part in visitor? I've placed it (asf1_12) section pointing in same direction as I had in road painter tool and at the exact same coordinates though.

Also need answers to these questions still:

- Do I still need to use Leopotams "Arma Offline Storage Monitor" for 0.1Beta version?

- Does export file need to have same name as that of name of road network in Visitor?

Share this post


Link to post
Share on other sites

Hi Waterman...

I was just re-reading this thread and noticed nobody answered you on this one...

Do I still need to use Leopotams "Arma Offline Storage Monitor" for 0.1Beta version?

Only on the first release I think... after that, the supplied "HomJ_RoadPainter.exe" should do the same job...

Does export file need to have same name as that of name of road network in Visitor?

You've named your road networks individually in Visitor? In that case I dunno... but as far as I'm aware the export filename can be anything... the import process does however, assume and require that you have the road parts defined in the road tool - as has been explained already...

B

Share this post


Link to post
Share on other sites

I'm a little late to be of any use, but everything others have said is correct. The only other thing is that my tool assumes your roads are in the CA namespace, i.e. P:\Ca\Roads2\

Anyways, I've started thinking about what else to do to the tool for the summer... I've learned how to do binary file operations with C++ (i.e. I can read/write in PEW's now). I think I'm going to *try* to cut straight to the point and make it open/save your actual PEW file - example, start up tool in ArmA, load PEW (probably have to manually type in the filepath the first time), RoadTool loads roads in-game, draw roads as you wish, save PEW. It seems like it's possible... I should know for sure fairly soon.

Cheers,

Share this post


Link to post
Share on other sites

this will be really nice Homer :)

From what source you got references to do this?

Share this post


Link to post
Share on other sites

Mainly inject objects directly into .pew files. Could be useful for World Tools interaction to the actual pew

it's academic curiosity, due the fact i will prefere in any case the import way, but i agree that making roads is really different from placing fences.

Share this post


Link to post
Share on other sites

I haven't done it successfully yet, but I have learned enough that I should be able to. A few topics need to be understood:

1) Generic binary-file manipulation in your language of choice. For C++ I use similar processes as this tutorial:

http://www.angelfire.com/country/aldev0/cpphowto/cpp_BinaryFileIO.html

2) Endianness, hexadecimal, reading bytes, how to look at a file with a hex program and understand it:

http://en.wikipedia.org/wiki/Endianness#Diagram_for_mapping_registers_to_memory_locations

(PEW is little-endian, so bytes containing numbers are read "backwards"; e.g. a "ulong" in hex may read 0B 00 00 00, which would equate to an integer value of 11 ... )

3) Floats: converting bytes to an actual number, IEEE encoding (this allows you to find specific numbers in the hex file, to understand the file contents - try making a small 16x16 terrain and edit one vertex height, then find it in the .PEW and hex-edit it :)):

http://www.h-schmidt.net/FloatApplet/IEEE754.html

4) The PEW (POSE v60) file structure:

http://community.bistudio.com/wiki/POSE_v60_File_Format

http://community.bistudio.com/wiki/Generic_FileFormat_Data_Types

If you open up a PEW with a hex editor you can theoretically follow the PEW File Format, passing through it section-by-section, byte-per-byte. You just have to make a simple test island with some objects and examine things for a while until you match things up. Make sure you match up the "Data type" with the bytes you're looking at. It took me a few nights to figure things out. If you're curious for more info or explanation, I will try. :)

As a simple example, this is the PoseHeader, with the file length:

Pose Header parts in hex

[Edit] Another idea that is really tempting is to abandon road networks and use roads as individual objects - in fact, "road networks" are only for Visitor/PEW's. Once you export to WRP, I believe all roads turn into individual objects just like trees, houses, etc. The benefit of this would be to allow for custom road pieces (in turn making it infinitely easy to lay down curved paths). The downside is that you could not use Visitor scripts (i.e. smoothroads) on roads created this way... for this reason I'm not pursuing it now, but it's an idea I'm keeping in mind...

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

Thank you Homer! i'm downloading all documents for my hot summer! :)

Share this post


Link to post
Share on other sites

this tool was like.. epic!

wow, it was really just to paint the roads. If anyone ever mention bugs, or list of features, screw them. This tool do magic already and only greedy people would ask for me.

Thanks, over and out.

Share this post


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

×