PDA

Homer Johnston
Mar 26 2010, 02:24
Summary:
-This tool is intended to aid the process of road creation in Visitor. It allows you to easily "paint" long sections of road in between key-parts from within the ArmA mission editor. You can then generate a text file to import into a Visitor road-network.
-The tool is not intended to export/import key-parts (yet). Key-parts must be placed using Visitor, importing road sections as you go.

Current version:
0.1 - BETA

ArmaHolic Mirror:
ArmedAssault.info Mirror:

Usage instructions:

aEsTyUgUE1I

Things I need assistance with:
- A way to inject road sections and key parts into a PEW file using this information (http://community.bistudio.com/wiki/POSE_v60_File_Format). I am not a coder, and this level of hex editing/binary editing is currently beyond my understanding.

:627:

Beton
Mar 26 2010, 10:25
Homer that looks really promising.

If someone could tell me what exactly the numbers in the curves stand for i would try to modify some of the roads..for testing

IceBreakr
Mar 26 2010, 11:52
I think the last numbers are meters? 25,50,75,100?

Homer Johnston
Mar 26 2010, 13:29
if a road has one number it is straight, with the "approximate length". If it has two numbers it is a curve with angle + radius.

asf 6 = straight 6.25m
asf 12 = straight 12.5m
asf 25 = straight 25m

asf 10 25 = 10 deg. turn with 25m radius
asf 10 50 = 10 deg. turn with 50m radius
asf 0 1000 = 0.5 deg. turn with 1000m radius (unusable?)

Currently I believe the only curves we can use in visitor are 25, 50, 75, and 100m radius (since these are the only options in the dialog), and these all turn 10 degrees. Visitor does not specify degrees. I am expecting that 10-degree turns will be a hardcoded feature of Visitor 3 and not read from the road model, but it might be worth checking to find out anyway. If Visitor would use other degree turns, it would make this tool 10x more awesome :icon_neutral: sometimes it's difficult to match a SatMap with 10 degrees as your minimum turn amount...

It's interesting to note that ArmA2 uses some odd curve shapes: 0.? degrees with 2000m radius, 1 degree with 1000m radius, 7 degree with 100m radius, 60 degree with 10m radius ... BIS gave us the MLODs to use these roads, but not a tool capable of placing them :(

If you want to try this, you'll need some basic knowledge of O2. Maybe edit asf_1 10 100 ... delete half of its faces (on the "far" side, not the ones near XYZ origin), and then somehow move the memory points for the corners of the road back to the new corners... then save as asf_1 5 100, and try using it in visitor. Place some of the 10 100 curves and 5 100 curves in a row and see if there's any difference between them. I'm hoping that Visitor uses the Memory points to snap roads together. I'd REALLY appreciate it if you (or anyone) tried this for me...

[EDIT] Don't bother trying the model mod ... I tried loading the 15-deg 75 meter curve in and it treated it like it was 10-degrees :(

MemphisBelle
Mar 26 2010, 14:52
I think the last numbers are meters? 25,50,75,100?

compared to the different length of the road pieces....you are right. The numbers indeed are describing the length of respective roadpieces.

Homer Johnston
Mar 26 2010, 15:28
Memphis, please note that my post above correctly describes what the numbers mean :) for curved pieces, the 25/50/75/100 is not the "length" of the curve. It is the radius.

I managed to get mouse-movement working using camera/buldozer controls. It still needs keyboard buttons for commands - I am not sure yet if I will be able to use mouse movement and mouse buttons together... if anyone has seen anything which does this, please let me know so I can learn from it!

Homer Johnston
Mar 27 2010, 20:26
I added a video to the first post which sort of shows how the whole system works right now... Some random thoughts on how I think I will eventually set this up:

- it will have a basic dialog on-screen (like 3DE did, but many less options)
- moving your mouse will move the camera
- your mouse pointer will be visible and 'locked' somewheres on screen, probably near the bottom edge in the middle (this is an unfortunate side effect of dialogs, and displaying a dialog is the only way I can detect mouse-clicks)
- holding spacebar (?) will unlock mouse and allow you to use the GUI

Tentative controls:

Mouse:
motion: move brush
left click: place all pieces
shift + left click: place one piece
right click: erase one piece
middle click: ???

Keyboard:
spacebar (hold): interact with GUI instead of brush
A/D: camera rotation around brush
W/S: camera distance from brush
Q/Z: camera elevation above brush
Tab: copy road info to clipboard

GUI buttons:

prowler.wolf
Mar 27 2010, 23:52
Excellent I'll give this a try later tonight :)

Homer Johnston
Mar 28 2010, 01:40
No download yet; (well, there's a half-working concept version in the other thread) I'm hoping to advance this to a "beta-release" within a couple of weeks :) Cheers.

ZeroG
Mar 28 2010, 09:20
Looking awesomely easy!

One question: Have u pressed the "test direction" button for the road yet? I experienced some RED dots on a 20km road I once placed, because of some slope angles or sth..THAT was annoying, cause replacing the not working parts on a 20km road is...ARGH.

Wonder if your road tool does correct slope angles automatically? would certainly be great!!!

Regards

Homer Johnston
Mar 28 2010, 15:40
Ah! I didn't even know about that button. I actually haven't laid many roads in Visitor.

Can anyone tell me more about this - does this button check if the slope of the road is within limits? i.e. how steep it is to gain altitude; 5 degrees by default. What is the difference between "Max Bank" and "Max Angle" in the road settings?

Ignoring all coding issues for a second, what could be done to fix or help this?
- changing terrain properties? (this is what the SmoothRoads script is for, right??)
- alerting the user that the road will be out of limits?
- anything else??

ZeroG
Mar 28 2010, 17:50
I think this button will give u the information if ai can use it...I noticed some red parts once i placed an invisible road over a bridge, since AI has problems finding its way over...still they had problems...and later I found out that those red parts were causing the AI problems...is THAT the purpose of the "test direction" button..testing it ONLY for AI?

Homer Johnston
Mar 29 2010, 14:43
If anyone would have some time to experiment with that option and with what ZeroG said, it could benefit us all very greatly...

For now, a simple picture to show where this is going. The cursor is now always visible on-screen (but not in screenshot - just imagine the ArmA cursor showing at the last blue dot :p). The preview-line follows the cursor... left clicking places the road, and you can pan the view by holding right-click & dragging, and zoom with mousewheel (just like in the editor).

shezan74
Mar 29 2010, 15:35
Seems very promising :)
nice work!

Bartchie
Mar 29 2010, 16:58
Very nice. I love it :D

SenChi
Mar 29 2010, 17:48
Homer Johnston good work :D

Bushlurker
Mar 29 2010, 18:16
Looking amazingly promising so far Homer!!

I had a quick check over some roads I've already placed with the "test direction" button... (I'm following a lot of tight RL coastal and hill roads in a VERY hilly landscape, so theres little room for manoeuvre as to where the roads have to go)...

Several of my carefully hand-laid roads show red and orange sections - not many, but a few bits here and there... I looked more closely at the landscape - and the sections... it didn't seem to be a "slope" factor - sometimes the "warning sections" were on relatively flat areas...
One thing I DID notice was the choice of roadparts seemed to often be responsible for the "warnings"... these crazy scottish roads twist and turn a lot - and where I've used a sequence like ... "75 left turn, 75 right turn, 75 left turn" - one after the other - that tends to show red with the "test direction" button...
I'll have to check further to see if there's any other obvious combinations that seem dodgy...

In-game - the AI seem to follow these roads with "dodgy warning" sections about as well as any other so far... they hesitate a little generally on my roads - they don't confidently belt along (this could be because theres rarely even a 25m straight section), except when crossing the big bridges - the only real long continuous straight roads on my map, really - they seem to put the foot down there no problema - and confidently zoom across them... then they hit the next road section, and slow down to "tourist pace" again... ;)

Anyway.... looking forward enormously to trying this tool! keep up the good work!

B

Homer Johnston
Mar 29 2010, 18:41
In-game - the AI seem to follow these roads with "dodgy warning" sections about as well as any other so far...

F***ing marvelous - this is what I was really worried about. If you go into the edit-road dialog (Options>Roads) then you can alter the "max angle" and "max bank" settings, which are somehow related to the "Test Direction" button and its warnings.

If the AI are OK with it, then I am going to guess that these warnings are just to let you know that your road is "unrealistic" (steeper than you said it should be), because you can increase the previously mentioned "max" settings and the warnings go away.

Thanks Bushlurker!

Should be able to get a beta of this released sometime on the weekend, need to add a few more things to the GUI :) initial beta will require some copy/paste/Notepad++ find-replace labor. Next week, if everything else is going okay, I might look into using Nutty's addon to write to file automatically and remove the Notepad++ requirement.

Bushlurker
Mar 29 2010, 18:55
If the AI are OK with it, then I am going to guess that these warnings are just to let you know that your road is "unrealistic"

Thats my conclusion so far too... hard "left-right-left" turns aren't a feature of many RL roads (except maybe scottish ones), so it could be more an "asthetics" than a "AI practicality" button...
In my experience the AI will attempt some fairly scary slopes if they decide thats the way they want to go

B

IceBreakr
Mar 30 2010, 13:50
One more thing guys that we shouldn't forget: road smoothing script (aka terrain leveler). Does it work with these external tools? Since we can only move terrain +-1meter we pretty much depend on it.

Beton
Mar 30 2010, 14:29
About the road warnings... i think they are a remains of the former autoroadtool which does not work anymore. Accordings to the road´s settings this tool would have avoided big bank and angle values. As far as i know is only the ai taking unwanted shortcuts sometime but thats not really related to the roads.
The road smoothing tool should "work" as always more or less because the roads are imported into visitor and handeled like any other road.

I´m really happy that some dedicated guys are working on these tools... thank you

Homer Johnston
Mar 30 2010, 14:34
the generated road is no different than a road drawn in visitor, so the road smoothing script works no different either on an imported road section. Have I read that sometimes, the smooth roads script doesn't work? Maybe later this summer I (or someone) could write a new script... we'll see how things turn out.

After I have this tool working "as-is", I intend to try and expand it by allowing you to place T's and crossroads... you won't be able to import them into Visitor, but HOPEfully you'll be able to draw full road networks and import it section by section into Visitor (you will still have to place T's and crossroads manually in Visitor at the end/start of each section)

 Beton posted first :P

Homer Johnston
Mar 31 2010, 06:36
wasting more time photoshopping up preview pics...

GUI is mostly in-place, still a few placeholder-buttons. Still hoping I will release something usable by the end of next weekend.

All for now!

IceBreakr
Apr 2 2010, 07:49
Outstanding preview, you're doing more for the community than BIS right now, kudos for that! :)

Homer Johnston
Apr 4 2010, 06:57
Another preview... should be releasing something that looks this in the next day or two. It will feel a little bit "rough" and I'm expecting some bug reports, but that's what betas are for right? :D

A big thanks will go to Leopotam for allowing me to use & supply his "ArmA Offline Storage Monitor" tool to enable file exports from ArmA. :)

The first page of this thread will be updated with all important information when this is released, but for now I will mention using the beta tool will require:
- using Leopotam's "ArmA Offline Storage Monitor" (a simple console window which is left to run in the background), with an export script slightly modified by me
- using Lester's (MapFact) Editor Update addon

VhFCPnvbL_4

Again, high-res video is available if you watch it at Youtube.

Bushlurker
Apr 4 2010, 07:58
Truly impressive!
This will save weeks and weeks of work!
Absolutely amazing!

B

shezan74
Apr 4 2010, 08:57
Really amazing :) i think i must restart my island from scratch now :D
Thank you Homer Johnston!

Beton
Apr 4 2010, 09:40
Pff... i can´t believe what i see there...had the same thought as shezan, but no i won´t redo all of my islands.
This is an awesome masterpiece...
I´m wondering if this tool could be used to create walls, fences and plants too in the future?
Nice to hear that some of you guys are working together and share your knowledge, thats what community needs.

great....

mikebart
Apr 5 2010, 04:25
thats amazing!, im really starting to feel like i've gotten into terrain making at the right time, hehe :)

Homer Johnston
Apr 5 2010, 14:54
had a rather unusual weekend with personal stuff... didn't have time to do anything to this, but I've added some download links to the first page. It is an early preview version!! Right now I don't have time to "support" it, so you're on your own to try it out and see how it works. The youtube video I posted above should help. I will be back in a few days, hopefully...

[APS]Gnat
Apr 5 2010, 15:43
That is one awesome video! and hence an awesome tool.
Great work.

New Challenge for someone else;
Use the XY road points from the export file to "paint" a line of X colour onto a MASK file. Bingo then everything is done for you!

Beton
Apr 5 2010, 18:17
Thank you Homer... willtry asap...

Homer Johnston
Apr 5 2010, 18:43
Gnat, that is a pretty neat idea :) generating masks based on objects? hmm, maybe that's worth mentioning in the "suggestion box" thread?

Beton, to set it up, basically:
1) extract roadtool.utes folder into missions folder, so you can load it in the editor
2) rename .utes to another island extension, if you wish.
3) extract Leopotam's utility anywhere (I put it in P: with all my ArmA tool stuff)

Then follow the beta video (open Leo's utility, load mission in editor, hit preview & try stuff out)

also, if you turn off "auto radius" then Z & X change radius. I think those are the only relevant keyboard commands for the preview version...

Bushlurker
Apr 5 2010, 19:26
Ooh! A hands-on version!
I've allowed myself to get sidetracked with other aspects of my island and left roads on hold recently, waiting for a chance to try this tool...
I'll give it some extensive exercise this evening and report back...
Thanks Homer!

B

Homer Johnston
Apr 6 2010, 17:26
anyone try the preview yet? I'm not sure you could efficiently use it for island building yet unless you have a lot of long open roads, but certainly just to see what it will "feel" like...

I'm planning on doing a major code rewrite to allow me more freedom, then I should be able to figure out a way to place key-parts and do the "export/import-by-section" idea I mentioned earlier (paint road -> set placeholder for keypart -> paint next road ... import each road separately into Visitor, placing the keypart in Visitor in between road imports). A more usable release is probably 2-3 weeks away at this point.

I will also experiment with integrating Leopotam's Road Generator algorithm too, so that you can draw roads by placing a series of points and moving the points to adjust the output... basically, use ArmA to give his generator a GUI. I'm not sure if it will work good or not, but certainly worth a try :)

Bushlurker
Apr 6 2010, 17:58
#include extreme_happiness.hpp

Well this works an absolute treat!!!
What a relief!!!
Theres a little juggling of apps and windows to get used to, but once you get into a groove away you go!
I had an hour to try this out last night and I'm already thinking that my remaining roadworks will now take a few weeks at most, instead of a few more months!
Homer mentioned previously he's gonna add the ability to add a "dummy T or X keypoint" - it needs this!!!
That would speed things up tremendously!
At the moment, the procedure I evolved is to...

lay keypoint in visitor - flip to roadtool and enter keypoint details
construct road section till next keypoint

etc, etc...

If you were able to include "dummy" keypoints in the roadtool you could generate a section - allow for a specific type of keypoint (maybe make a note on paper of what type it is), then since the road tool allows precisely the correct gap for that component, you could export that first section as "roadnet01.txt", then stay in the road tool and do the next section - export that as "roadnet02.txt", etc etc

Less hopping back and forth, in other words...

Homers already mentioned this, so I'm assuming "dummy keypoints" will happen, and that'll be the icing on the tombstone for the old Visitor procedure (although I still did a couple of short 6-section roads the old way - simply to avoid the hopping back and forth which the "dummy keypoints" will soon negate anyway)...

Can't think of any other suggestions right away - I'll have to use the tool a little more... (try and stop me!!! :D)...
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?

Anyhow... critique??? It's hard to think of any right now - I'm still recovering from the Sheer Relief as I realise I may now finish my island before Xmas! :D
... There's still a slight tendency to use, say - 4 x 6.25m sections where a single 25 or 2x12's would perhaps have been just as good - and saved on the object count (a constant paranoia with big islands), but that really IS nitpicking...

Homer... you're a genius!

B

*edit

I'm planning on doing a major code rewrite to allow me more freedom, then I should be able to figure out a way to place key-parts and do the "export/import-by-section" idea I mentioned earlier
Post overlap there! hehe...
Exactly what it needs...

Homer Johnston
Apr 6 2010, 18:34
Oh balls, I forgot to mention it only uses 6m straights. If you want to hold off on your road-building for a couple more days, I may be able to "hotfix" that.

Rotatable camera will be implemented at some point, no worries there - it was low on the priority list compared to the actual "placing roads" aspect of the tool ;)

Any other feedback anyone has will be taken into consideration, so don't be shy. :)

prowler.wolf
Apr 7 2010, 23:50
This is coming along nicely. Been so busy that every time I come to this thread there is a new version to download. :o

trezza
Apr 8 2010, 03:15
I really need to install the BItools and try out some of this new stuff, went to windows 7 and i can't be bothered putting on half the stuff i used to have.

Homer Johnston
Apr 8 2010, 07:03
very minor update. not really worth posting, but I ate a lot of sugar tonight and this is fun, so whee.

arke4EEFHzk

shezan74
Apr 8 2010, 08:35
very minor update. not really worth posting, but I ate a lot of sugar tonight and this is fun, so whee.

What the hell, who's the fckg guy that created a full road network on my brand new airport? :D

Bravo Homer, a very very nice work :yay::yay::yay:

[APS]Gnat
Apr 8 2010, 10:10
Just amazing!
Uber tool.

Bartchie
Apr 8 2010, 10:43
very minor update. not really worth posting, but I ate a lot of sugar tonight and this is fun, so whee.

This is getting much much better. Don't eat just sugar. Eat it with tea :D

Homer Johnston
Apr 8 2010, 14:45

Beton
Apr 8 2010, 15:03
I ave already ported over the cobblestone roads from arma1. At least in visitor and ingame they work as usual.
Sorry homer is still have not tested your outrageous work yet... lack of time atm.

Lester
Apr 8 2010, 16:26
What a great Tool ! :yay:
Respect to the work and the excelent maths !

But one Question, is it planned to use smooth street apperance transitions like that:
http://a.kiel.us/smooth-hard_transitions.jpg

(In ArmA1 this method works fine with the AI on our Dreide Island and of cause ... it looks much better than the hard one ;) )

Homer Johnston
Apr 8 2010, 18:51
Of course! :) The fact that I was able to do transitions like this was an unexpected benefit of my changes, so I was just playing around :p. at some point I will add a button to place a konec piece, and automatically set the new road type.

Does anyone think it would be against the EULA or cause any copyright issues if I made an addon which included ArmA1 roads?

Lester, will you mind if I pull out the road configs from your Editor Upgrade to create my own roads-addon? This way I could maintain and update with any other roads the community might make, and include A1 roads. I will probably need to rename the classnames... e.g. from MAP_asf1_6 to HOMJ_asf1_6.

Bushlurker
Apr 8 2010, 19:00
The Arma 1 roads (but not their textures) were released by BIS as mlods, and I believe that, much like CAA1, if you're using them to create Arma 2 content, there shouldn't be any issues... I guess you could PM a Mod - Suma maybe - if you're really worried, but I don't think it's a problem... at least I hope not - my custom models pack for my island is full of adapted Arma 1 stuff!) :)

B

Homer Johnston
Apr 12 2010, 19:26
A wall-of-text update for anyone interested.

Roads are created in the following stages. It is more similar to Visitor:
create key part.
create road section (a name to contain all pieces between two key parts).
select which road section you want to edit.
- if section is empty (starting new), you will be prompted to click near a side of any keypart to start there.
- if section already contains pieces, you will continue adding to it.
Keyparts can be moved/rotated with the mouse. Any drawn road sections will not move with the key part yet, but hopefully will later on.
Unfortunately, key parts still have to be placed manually in Visitor. If only we had our own program which could inject roads into PEW's. :(
The beta release will only support terminator and straight pieces as key parts (which apparently is all you *need* anyway). If there is demand, I will implement T's and X's (or other pieces??) in a future version.
Export will involve:
- All road sections will be exported to separate files that match their name.
- This will probably take about 1/10 second for each section (to ensure none are "skipped" by windows clipboard)
Camera controls will be:
- rotate with A, D
- change pitch-angle with W, S
- change height with mouse-wheel.

I have around half of the above working. Keep your fingers crossed, hopefully next week there will be a tutorial video followed by a release.

Current plans for future versions:
Create my own addon which contains and enables placing of all A1/A2/Community roads.
Map view which shows all road sections, labelled.
Ability to save/load progress (I will need to write my own application for this which will take some time, because I am new to C++...).
Test/implement Leopotam's algorithm; try drawing sections automatically with placed points.

ebanks129
Apr 12 2010, 19:41
Looking forward to the tutorial vid and release

shezan74
Apr 12 2010, 21:22
Homer if i can help, simply call me :)

Homer Johnston
Apr 13 2010, 00:48
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^...

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...

[APS]Gnat
Apr 13 2010, 10:38
Sounds awesome.

If only we had our own program which could inject roads into PEW's.
Yes, if only.
BIS? You listening?

T_D
Apr 13 2010, 13:18
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 :)

Homer Johnston
Apr 13 2010, 18:07
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

T_D
Apr 13 2010, 21:49
PEW format is known so yeah it is possible.

[APS]Gnat
Apr 14 2010, 00:59
Wow .... this could be very impressive.

Homer Johnston
Apr 28 2010, 06:15
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 (http://i92.photobucket.com/albums/l7/kylewilcox/ArmA%20scripting%20stuff/arma22010-04-2722-27-30-35.jpg)
Some road sections (http://i92.photobucket.com/albums/l7/kylewilcox/ArmA%20scripting%20stuff/arma22010-04-2722-28-29-48.jpg?t=1272431142) named R1, R2, R3 ... blue dots are keyparts
What happens when I press the export button (http://i92.photobucket.com/albums/l7/kylewilcox/ArmA%20scripting%20stuff/Dwm2010-04-2722-28-39-32.jpg?t=1272431176)

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 (http://community.bistudio.com/wiki/POSE_v60_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!

shezan74
Apr 28 2010, 10:04
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? :)

Homer Johnston
Apr 30 2010, 02:58
Updated root post contents:

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.

ebanks129
Apr 30 2010, 05:03
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

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?

Homer Johnston
Apr 30 2010, 05:46
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!

ebanks129
Apr 30 2010, 05:48
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.

Homer Johnston
Apr 30 2010, 06:30
Should be fixed; thanks ebanks for guinea-pigging an updated .exe for me :)

ebanks129
Apr 30 2010, 06:55
Thanks man. got it working! so d*mn useful.

Apr 30 2010, 14:36
I'm excited to check this thing out, my map just isn't ready yet though.

Bushlurker
May 1 2010, 02:57
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

Homer Johnston
May 1 2010, 06:30
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...

Imutep
May 1 2010, 08:58
Thx for the release! :thumbsup:

ArmedAssault.info (http://www.armedassault.info) Mirror and News (http://www.armedassault.info/index.php?cat=news&game=1&id=4106):

http://www.armedassault.info/mirrorgen2/9166467.gif (http://www.armedassault.info/index.php?cat=utilities&game=1&id=89)

We have also added this release to your personal author profile (http://www.armedassault.info/index.php?cat=authors&id=696)
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 :

http://www.armedassault.info/mirrorgen2/9166467.gif (http://www.armedassault.info/index.php?cat=utilities&game=1&id=89)
If you prefer a text only BBCode please copy and paste the code below :

ArmedAssault.info Mirror :

T_D
May 2 2010, 02:24
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.

shezan74
May 3 2010, 09:03
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...

[APS]Gnat
May 3 2010, 10:51
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!

Bushlurker
May 3 2010, 15:58
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

Homer Johnston
May 3 2010, 19:48
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. ;)

Homer Johnston
May 5 2010, 03:19
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

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)

Bushlurker
May 5 2010, 07:11
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

prowler.wolf
May 5 2010, 07:48
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!

shezan74
May 5 2010, 09:20
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 ;)

OldBear
May 6 2010, 13:35
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 !

shezan74
May 16 2010, 21:49
Homer... 10 days passed since your last post, don't leave us alone :)

DigitalCenturion
May 17 2010, 20:53
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?

mikebart
May 20 2010, 06:47
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.

Homer Johnston
May 22 2010, 18:18
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...

May 22 2010, 19:12
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.

Bushlurker
May 22 2010, 19:50
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

shezan74
May 23 2010, 00:48
Take your time homer, we will be there when you will come back :)

ZeroG
May 23 2010, 07:25
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:

Waterman
Jun 10 2010, 14:55
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?

shezan74
Jun 10 2010, 15:10
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

Waterman
Jun 10 2010, 15:38
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.

[APS]Gnat
Jun 11 2010, 07:47
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.)

Waterman
Jun 11 2010, 10:46
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?

Bushlurker
Jun 13 2010, 17:02
Hi Waterman...

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

Homer Johnston
Jun 30 2010, 05:49
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,

shezan74
Jun 30 2010, 08:40
this will be really nice Homer :)
From what source you got references to do this?

Homer Johnston
Jun 30 2010, 14:44
From what source you got references to do this?

to do which part (or parts), exactly? :)

shezan74
Jun 30 2010, 16:07
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.

Homer Johnston
Jul 1 2010, 00:43
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:

 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...

shezan74
Jul 1 2010, 08:44

granQ
Jul 18 2010, 09:34
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.

bravo 6
Jul 18 2010, 10:42
Very nice tool and very useful!
Thank you! :)

cctoide
Jul 22 2010, 23:39
Does anyone happen to have the zip files for the initial version and the camtest version of this tool? I'm getting started on my road laying and the camtest version would be really useful since I'm working on fictional terrain, and I get the feeling I'll need the X/Y coordinates from the first version eventually.

The dropbox link for the camtest version seems to be dead, and I can't find anything for the initial version. Thanks in advance.

Bushlurker
Jul 23 2010, 08:59
Hi cctoide

B

cctoide
Jul 23 2010, 13:26
Thanks, Bushlurker. :)

And obviously, thanks to HJ for making this tool.

Jul 24 2010, 14:05
would it be possible to add other objects and make it possible to export them into a txt like mask mapper does? i would love to use the mission editor with that cam to place my objects.

Homer Johnston
Jul 27 2010, 00:58
would it be possible to add other objects and make it possible to export them into a txt like mask mapper does? i would love to use the mission editor with that cam to place my objects.

theoretically yes; it's just a matter of spending the time to code it... the only exception would be that you can't scale the size of objects in-game, as you can do in Visitor.

Minimalaco
Sep 21 2010, 05:46
once the program creates the file in p: to /roadpainter. that I do with all those numbers that appear?

somebody can explain to me? the truth never I knew like creating ways, and nose where to add all those numbers that the tool gives me.

shezan74
Sep 21 2010, 08:32
would it be possible to add other objects and make it possible to export them into a txt like mask mapper does? i would love to use the mission editor with that cam to place my objects.

I'm working on a feature that converts sqm files to V3 importable format on World Tools.
I'm actually testing it with Bad Benson.

IceBreakr
Sep 21 2010, 10:56
That would be great for importing bases & various templates :) bunch of ppl want to help with maps, but they usually know only how to deal with in-game editor. V3 remains a "big bad monster" :)

Bushlurker
Sep 21 2010, 15:42
V3 remains a "big bad monster"
Quote of the week! :D
Aye... not so much a bad monster as an unpredictable one - to be approached only by Experienced Terrain Tamers...
I had a classic Visitor "incident" just last night - I've been placing custom (snap-together) wall sections for a couple of days - last night I started up Visitor to carry on where I'd left off... I placed a new wall section - about 10cm from the section it was supposed to snap to - twitched it so it would jump in to place - would it? no way! - pieces would snap OK, but they wanted to snap to other wall pieces in like the next village - 2km away or more! Every time I placed a wall section then tried to move it it would just vanish - leap kilometers to snap to some other wall section miles away - completely ignoring wall sections 2 feet away! - Completely uncontrollable! I had no idea what was happening... removed the snap points from all the models - they still long-range snapped... spent hours fighting it... to no avail...
Eventually, I replaced that .pew file with the one from the night befores backup - instantly everything is back to normal - walls snap to the next nearest section, not to random sections miles away - the monster was all sweetness & light again...
Unreal... some sort of .pew corruption I guess - cost me the evening and a few grey hairs, that one....

The Power of the Backup!!! Lest we forget!!!

Anyway - pardon the Visitor rant - you know what it's like - every now and then you have to unload the frustration ;)

Back on topic... this sounds deeply handy, Shezan! - like IceB says, I've had one or two offers of help if it could be done with the main editor... the main drawback was importing... a bit of additional configging and it should be possible to just provide helpers with a editor-placeable custom models addon (if your project uses one), and see what they come up with...

Looking forward to seeing how this works out!

B

shezan74
Sep 21 2010, 23:12
Looking forward to seeing how this works out!
B

Check on World Tools 1.6 topic.

About backup, did you tried SaveMyProject application? it saved my ass a lot of times with his constant 10-minutes backups...

Robster
Sep 30 2010, 04:42
Hola mis guachas!

Actually we have gone troughout the whole rough experience and still keeping alive... but noobs :butbut:

We have defined our road network yet, thus we can place some road pieces on our map (terminators, straight and curves parts).

We understand that key parts must be settle down within Visitor3 (V3) and...

At this very moment we assume that RPT (a finest app BTW) comes in handy just to fill the gaps between key parts previously displayed into V3 but... (yes, there's always a "but" in our case)

We don't know HOW TO MANAGE THE DATA derived from the Road Painter Tool app (RPT).

And a little help would be nice...

1.- Do we have to enter the resulting coordinates X,Y "manually" within Visitor3?

2.- Can we import to V3 info related to X and Y road placement positions automatically?

3.- Is there some special feature within V3 dealing with outcoming RPT files?

Don't laugh at us and be polite pleeease...

Eso era no mah. Chabela! y no me webeen por el inglés XSM :)

MugAben
Oct 2 2010, 21:39
Hi guys. Im creating my first map, and somehow I managed to make this road import work :D
How/where do i find those road endings?

Thanks for a great utility! Cant imagine how time consuming the other method must be.

EDIT: Found it :j:

Tupolov
Dec 22 2010, 13:02
So, I've been playing around with HOMJ's RoadPainter, created an initial road, exported the road to a text file, placed a key part in Visitor.. now what do I do? I tried the import objects script, without success (data format error). How do we import the road created in RoadPainter into Visitor?

Thanks!

Tup

Bushlurker
Dec 22 2010, 14:36
Hi Tup...

Thats an easy one... once you've placed the keypart in visitor - doubleclick it... now, depending on the keypart type, you'll have "Modify dir A", "Modify dir B", etc buttons - obviously, you know which direction you want the road to be going in - if its a terminator keypart there'll only be one possible direction to extend the road from... so click the one you want and yet another window will pop up... the "Modify Road" panel... in here you'll see buttons both for importing and exporting that particular road section... these are the ones you use...

Homers tool doesn't entirely replace the need to know how the built-in Visitor road tool works... you'll probably use that basic "place keypart/manually add road parts" Visitor tool a lot - particularly for short or urban roads... best think of Homers tool more as a hi-speed "Big Sections" maker...

B

Tupolov
Dec 22 2010, 15:43
Awesome thanks Bushlurker.

For some reason my key parts/roads are not showing in visitor (although do show up in Buldozer!) Also it appears not all the road sections are joined up and there are gaps in the road. Is this what you guys see too?

Cheers,

Tup

EDIT: this was due to replacing the roads2 objects with those dePBO'd rather than those provided by BIS Tools. Have reinstalled Tools and now the road shows in visitor

Chill xl
Dec 29 2010, 15:06
For my map ToraBora i've just learned how to make roads and also picked up this road generator, a very great tool! Much easier to get a nice road network down then to single click and see where it ends...

My map has alot of ridges, hills, dips and slopes, some of them really suited to lay down a road on or alongside. However its kinda hard to see the elevation in the generator with the top-down perspective, i tought it might be handy to be able to view the map from an angle.

Bushlurker
Dec 29 2010, 18:35
Hi Chill...

ToraBora's looking great so far!!

Theres a couple of different versions of Homers road tool - one has the top-down view only, but has precise coordinate keypart placement, the other has proper 360 degree all-angles viewing and rotation - just what you're looking for... but theres no keypart actual coordinate entry... most times that's OK - visually lining keyparts up is good enough, and the variable viewing angle makes for far better road placement...
You'll see occasional "debug/keypress reporting" showing up onscreen while you use it... watch out for that - if you happen to have an "active cursor" in something like the "export filename" slot, then start pressing direction keys you may not get the filename you intended! ;) - no big deal though...

All of these versions were working towards a megaversion Homer will no doubt return one day and surprise us with ;)... meantime - try both Betas and use whichever one seems best for the road in question...

Probably best to read right thru this thread - theres discussion on each of the versions as they came out... not sure if all the links to the different versions are still active - you can get them from the resources & tutorials section of my wee website (http://www.bushlurker.com/) if they aren't...

B

Chill xl
Dec 30 2010, 15:11
Tnx Bush,

Cant really find the other beta but thats no problem, i'm using the hans and gretel method and that works good too. I'm acurately putting objects as waypoints on the map placed in Buldozer and use these a a visual reference for the roadpainter tool.

Bushlurker
Dec 30 2010, 17:25

First rar is "HOMJ_Road_Painter_v0-1" - probably the one you're using so you know how it works now...

In the second rarfile...

Use the readme, the @<hidden> and the RoadPainter.exe from the v0-1 version as before...

PS - this "Camtest" version kicked in around post #75 if you want to check back thru this thread...

B

Chill xl
Jan 3 2011, 09:27
Tnx again for the helpfullness! Haven't yet got too it to try the other one, but the top-down painter was already very great.

dougboy101
Jan 5 2011, 01:54
What would be REALLY Cool and uber high end, would be the ability for a standalone app to import a shapefile of roads, and export as roadpainter currently does. so a minimal amount of work is done in visitor for a massive amount of roads! thanks for the awesome tool all the same, youve saved dozens of people hundreds of hours at a guesstimation

bigshotking
Mar 8 2011, 22:46
Hmmmmm I wonder when it might be possible to finish MY map, all that I need to do is make ROADS!!!! But because BI won't release the MLODS I CAN'T MAKE THE ROADS WORK!!!!! I can only place them down manually 1 by 1.... I'm going to be here for months....

(My map is being made for OA, so that you don't need CO)

Minimalaco
Mar 15 2011, 12:56
how to spend this tool with the roads of OA?

wattgaz
Apr 29 2011, 15:13
It is great work indeed !

I have a request (I guess it's only a GUI trick if I understand well your editor mod )=

I am doing : Hautes-Pyrénées full scale island (http://forums.bistudio.com/showthread.php?t=118102)
and so, I make only REAL roads, so I'd like to bypass completely Visitor3 roadtool to use only Shezan74's WorldTools to import DIRECTY the roads as objects to Visitor, after using your excellent painter tool.

Can you or someone enough skilled make available the "save" option on your editor-mission to save road parts as objects in a mission SQM ? ( I wont use "smooth roads" script cause it's real terrain and I fine-tune all tricky places by myself)

Thanks a lot anyway, because with the size on my project It's just too much for using Visitor roads only! :)

EDIT 2:
Unfortunately the export of roads coords to visitor is somehow messed.
i.e. it create "stairs" in turning sections (visible only in buldozer), and moves a little straight parts. :mad:

It seems that road placement coordinates system differs only for road objects between Visitor and ArmA Editor, all other objects import perfectly...
I don't have time and skills to dig more.

wattgaz
May 1 2011, 02:10
DON'T USE it create "stairs" as shown above !

Here is the script :
Just make a backup of HOMJ_RoadPainter_Export.sqf
in the scripts folder of Homer's editor's mission RoadPainter.(yourmapname)
and use this one.

Result :

BUT IN BULDOZER = GAPS & STAIRS

// From Homer Johnston

// Heavily Modified by GueB 01/05/2011
// Please make backup of the original file somewhere to revert back to Visitor Road tool use !

// This script now :
// optimizes straight parts with different algo and exports to windows clipboard as specific format:
// to be converted to : "ca\roads2\asf3_25";3813.84;3578.2;0;180;\n(= carrier return)
// (using notepad++ since it has nice macro function for char. replacement)
// If someone has the ability to make another EXE which does the job as Homer's original one...

// Get currently selected section name:
private ["_exportSection", "_dims", "_exportThis"];

_h = 0;
{
call compile format ["_exportSection = + %1", _x];
//call compile format ["ctrlSetText [10101, str(%1)]", lbData [19873, lbCurSel 19873]];
// Process road section into exportable data: ["|", "ca\roads2\asf1_", [0, 6.25], "", [[x, y], dir], [[x, y], dir], _road];

_i = 0;
_str = 0;
_prefix = "";
_suffix = "";
_locx = 0;
_locy = 0;
_locstx = 0;
_locsty = 0;
_loclnx = 0;
_loclny = 0;
_anglestr = 0 ;

// First, go through the entire exported section and evaluate it once for multiple straight pieces (convert 6+6 to 12)

while {_i < (count _exportSection)} do {
if (((_road select 0) == "|") AND ((_road select 1 == _prefix) OR (_str == 0))) then {
if (_str == 0) then {
_locstx = (((_road select 4) select 0) select 0);
_locsty = (((_road select 4) select 0) select 1);
_anglestr = ((_road select 4) select 1);
};

_str = _str + 1;

if (_str == 2) then {
_newRoad = ["|", _prefix, [0, 12.5], _suffix, [[_locstx, _locsty], _anglestr], [[(((_road select 5) select 0) select 0), (((_road select 5) select 0) select 1)], _anglestr]];
_exportSection set [_i - 1, _newRoad]; // replace the first straight piece with a 12m section
_exportSection set [_i , "DELETE"]; // delete the last straight piece
};

}else {
_str = 0 ;
};
_i = _i + 1;
};

// Second, AGAIN go through the previous optimized exported section and evaluate it for multiple straight pieces (convert 12+12 to 25)

_exportSection = _exportSection - ["DELETE"];
_i = 0;
_str = 0;
_prefix = "";
_suffix = "";
_locx = 0;
_locy = 0;
_locstx = 0;
_locsty = 0;
_anglestr = 0 ;

while {_i < (count _exportSection)} do {
if ((_road select 0) == "|" ) then {
if (_str == 0) then {
_locstx = (((_road select 4) select 0) select 0);
_locsty = (((_road select 4) select 0) select 1);
_anglestr = ((_road select 4) select 1);
};

_str = _str + 1;

if (_str == 2) then {
_newRoad = ["|", _prefix, [0, 25], _suffix, [[_locstx, _locsty], _anglestr], [[(((_road select 5) select 0) select 0), (((_road select 5) select 0) select 1)], _anglestr]];
_exportSection set [_i - 1, _newRoad]; // replace the first straight piece with a 25m section
_exportSection set [_i , "DELETE"]; // delete the last straight piece
_str = 0;
};

}else {
_str = 0 ;
};
_i = _i + 1;
};

_exportSection = _exportSection - ["DELETE"];

// Now prepare a data export string
_exportData = "";
for "_i" from 0 to (count _exportSection - 1) do {
_x = _exportSection select _i;

if ((_x select 0) == "|") then {
_dims = str(floor ((_x select 2) select 1));
// calculate center of objects for import to visitor
_locx = ((((_x select 4) select 0) select 0) + (((_x select 5) select 0) select 0)) / 2 ;
_locy = ((((_x select 4) select 0) select 1) + (((_x select 5) select 0) select 1)) / 2 ;
// create string to format : ^ca\roads2\asf3_25^;3813.84;3578.2;0;180;µ
// to be converted using notepad++ for example to : "ca\roads2\asf3_25";3813.84;3578.2;0;180;\n(= carrier return)
_exportData = _exportData + "^" + (_x select 1) + _dims + '^' + ";" + str(_locx) + ";" + str(_locy) + ";" + "0" + ";" + str(floor ((_x select 4) select 1)) + ";" + 'µ' ;

} else {
_dims = str(floor ((_x select 2) select 0)) + " " + str(floor ((_x select 2) select 1));
// calculate center of objects for import to visitor
_locx = ((((_x select 4) select 0) select 0) + (((_x select 5) select 0) select 0)) / 2 ;
_locy = ((((_x select 4) select 0) select 1) + (((_x select 5) select 0) select 1)) / 2 ;
// create string to format : ^ca\roads2\asf3_25^;3813.84;3578.2;0;180;µ
// to be converted using notepad++ for example to : "ca\roads2\asf3_25";3813.84;3578.2;0;180;\n(= carrier return)
_exportData = _exportData + "^" + (_x select 1) + _dims + '^' + ";" + str(_locx) + ";" + str(_locy) + ";" + "0" + ";" + str(floor ((_x select 4) select 1)) + ";" + 'µ' ;
};
};

// Homer's EXEC disabled
//_fileName = toArray (_this select _h);
//for "_i" from 0 to 9 do {_fileName set [_i, "DELETE"];};
//_fileName = toString(_fileName - ["DELETE"]);
//_pathName = ctrlText 19871;
//_export = (format ['HOMJ_PAINTER^WRITE^%1%2.txt^', _pathName, _fileName]) + _exportData;
_export = _exportData;
// HERE is the copy to Windows Clipboard
copyToClipboard _export;
//waitUntil {sleep 0.01;copyFromClipboard == "HOMJ_ENDWRITE"};
_h = _h + 1;
} forEach _this;

"Message" hintC format ["EXPORT DONE TO CLIPBOARD - Don't forget to paste it in a text editor"];

sleep 3;

Some additionnal Character replacement is required just before import to Visitor since ArmA2 scripts can't manage " and carrier returns (explanations in script's first comments).

Further development could be to integrate full management of crossroads, terminators... since they are just simple objects after binarization...

Homer Johnston
May 11 2011, 19:50
hey there - believe it or not I am still alive... I haven't touched my ArmA projects in ages, sadly!

I saw in your SQF comments about modifying the exe program. If you can describe what different functionality you need from it, then I should be able to edit and recompile it for you without much trouble. If it'd help or if you have any questions, just let me know.

Bushlurker
May 11 2011, 20:16
Hi Homer!!!
Welcome back!

B

wattgaz
May 11 2011, 20:20
Hi !

In fact my SQF DOENST WORK as expected !
Placement of road sections (location point) DIFFERS from editor/arma2 and Visitor3.
It create "stairs", as shown in previous post.
DON'T USE IT !!!

I had to fall back to your original script, I am modifying it just to export coords and angle of 1st keypoint , to avoid hassle in coord. manual entering/guessing in Visitor3 (For VERY LONG roads, half a meter of misplacement of starting point, it means BIG gap at the end )

I tried to mess a little with a convertion algo. script for full import as objects (lots of cos and sin around, lot of cases to include all angle changes regarding the angle measurements and road straight/angle sequences)
I managed to do something but not universal so I gave up.

Homer Johnston
May 12 2011, 01:13
cheers Bushlurker.

hmm, it's very unusual that it would develop those "stairs" (I couldn't see them previously; was at work earlier)... since it's intended to work by importing a txt file, and thus Visitor builds the roads exactly the same as if you were to place them piece-by-piece (with Visitor). has anyone else been using the tool and experiencing the same issue?

wattgaz
May 12 2011, 09:02
I tried many times with several full reinstall of BITools here is the difference :

- Visitor road tools has internal computations regarding angle, directions management, and fine positioning between parts

- If you add them "by hand" as objects (I dit it for airport roads on my map) then when there is a turn, you have to add a coord change to make roads edges aligned in buldozer. ( Did it visually)

So I discovered that object (center?) in Arma2 is not the same placing point in Visitor and found EXACT coord transformation:
example : angle 0 straigth 6m asf1 = X 0 Y 0
then turning part has to be= angle 0 turn 10 25 = X 0.145 Y 5.819
for edges to align perfectly in buldozer.

An export of the same section from ArmA2 and your tool : angle of turning part is still 0 but X and Y coords differs .

but combination your tool + export all parts coords + import as objects to visitor doesn't work properly

Minimalaco
Jul 28 2011, 08:37

=KCT=BlackMamba
Aug 10 2011, 14:51
yes i want to know exactly the same thing.

if i imported the file, it somehow only makes a straight road for me.

till now ive manualy layed all the road sections and im not happy with the outcome
hope for a breaktrough of this insane tool..

Homer Johnston
Nov 7 2011, 17:41
Hey folks, well after something like 2 years of absence I've finally decided to tackle roads again. I've started work on a new version from scratch. Road painter V2 (assuming it all works and gets finished) will work a bit differently than the old one. I plan to use roads as artificial objects (like wattgaz appears to be trying to do), as I got tired of the terrible limitations of visitor road networks. The tool will also be designed to only work by drawing singular paths starting and ending with terminators (faders). No crossroads. The tool will make use of all available turn pieces, instead of just the 10-degree ones. I think this will satisfy 95% of road usages. It will generate an import file which you can use to dump roads into visitor. This is going to have some new problems, such as how to smooth the terrain, but those will be tackled when I get there. I should have a rough test version out within a couple weeks, then we can start discussing features a bit more. I'm eventually hoping to implement spline-based drawing rather than piece-based, but that'll probably take me quite a while to figure out.

[APS]Gnat
Nov 8 2011, 13:14
Awesome news !
Thank you.

Minimalaco
Nov 9 2011, 03:16
Great news !

Homer Johnston
Nov 15 2011, 03:06
Looks like the fine-adjustment provided by the finer angles will make it more enjoyable to fit the road to curves, less fighting over which angle works best... :)

(no actual placement functionality or GUI yet, just math!)

q03xcf_psEY

Homer Johnston
Nov 16 2011, 07:10
Found a couple more hours to work on this tonight; I'll occasionally post updates as I deem worthy, if people have suggestions regarding what they see I'd encourage commenting your thoughts, otherwise I'm pretty happy just rambling on to myself.

I'm making this one more modular, so that in theory new roads could be "plugged in" easier. It also supports any combination of turn/straight pieces you give it, so it'll work e.g. with ArmA1 roads as well. I can't even remember what they looked like. Anyways - made a basic "pick road type" dialog thing which loads all the types (as defined in a text file). The new curves seem to work great; it's incredibly fast to just click around and place road where you need it.

At this rate, I'll probably have another more impressive pictures-update on the weekend, and then *hopefully* something up for beta-use by the weekend after.

DualJoe
Nov 16 2011, 09:03
Wow this is looking really nice, even more so if you can "plug in" custom road-packs. Can't wait to try this out on my current project. I was not looking forward to manually place miles of road piece by piece on top of the dykes.

Beton
Nov 16 2011, 09:29
That´s really awesome...

i believe there´s many islandmaker´s eyes following this thread.

:)

[APS]Gnat
Nov 16 2011, 10:54
... I'd encourage commenting your thoughts, otherwise I'm pretty happy just rambling on to myself.

* We watch, we drool ! *

Robster
Nov 16 2011, 21:55
I am in the islands "business" because of you Mr. Johnston, cause Minimalaco didn't know how to use your excellent tool

If it would be possible, when exporting it would be nice to ticket an option to export position (x,y,z,) of any individual part of road...

Just asking if it's possible, but thank you very much indeed for all your effort...

Homer Johnston
Nov 16 2011, 23:06
If it would be possible, when exporting it would be nice to ticket an option to export position (x,y,z,) of any individual part of road...

You may be in luck; that's essentially how the new version will work. I'm going to use the tool to produce an "import objects" file. Users will have to define road objects as "artificial objects" within visitor and then run the import script.

If you have a very specific purpose in mind or formatting you need in an exported file, feel free to let me know; it's probably very easy to accommodate for...

Robster
Nov 17 2011, 02:04
That's great !!! Wish you luck with all that heavy stuff!!! XD

EDIT: I don't understand well how configs and code work, but certainly is good to know where exactly is installed some object, since it allows to introduce sharp modifications and amendments in some manual and, even better, semi-automated way... which is always a great advance to avoid tedious tasks... just like adjust surrounding objects or expand roads after changing some part of terrain, i.e., after placing some water pond or adjusting some near river, etc...

Minimalaco
Nov 18 2011, 00:03
Amazing, we expect an update for roads OA?

Homer Johnston
Nov 18 2011, 17:16
Amazing, we expect an update for roads OA?

That is actually a difficult question, since all we have is binarized ODOLs in a new format. I tried placing one in Visitor and it caused buldozer to crash stating an incorrect P3D format. I may be able to try some "clever hacks" but they wouldn't be very fun to use.

After the tool is improved to a usable state, I'm hopeful that we could try to produce a few community-made roads and release them for public use...

DualJoe
Nov 18 2011, 17:50
I have to make a couple of custom road-surfaces for my 1940 era map as well. Would be great I the tool could be made to work with them.

Bushlurker
Nov 18 2011, 18:40
Hi Homer! Welcome back!!!

all we have is binarized ODOLs in a new format

The Latest BIS Tools release (http://forums.bistudio.com/showpost.php?p=1950506&postcount=2) includes MLOD road parts for OA and PMC - problem with them being, all the "usual" curves are missing... that may not be a problem with your new approach to things... :)

Great to see you back and working on this again!!!

B

Homer Johnston
Nov 18 2011, 19:28
The Latest BIS Tools release (http://forums.bistudio.com/showpost.php?p=1950506&postcount=2) includes MLOD road parts for OA and PMC

Oh, perfect - I'm just horribly out of date then :p ... the tool should be capable of handling just about any combination of turn pieces, so ArmA1, ArmA2, OA, PMC, and user-made road families should all work just fine. User-made roads will require you to have them spawnable in the editor via createVehicle, plus spend 2 minutes defining the family in a text file. Obviously the more pieces you give it, the easier it will be to shape the roads. I'll be able to post more details later.

The two massive drawbacks this tool currently faces are:
1) If you need to delete a road from your WRP, you'll have to delete the road piece-by-piece in Visitor
2) The default "smooth roads" script will not be usable

I'm hoping the first issue simply won't be that big of a deal; make sure your roads are correct before you import them, please! :p Actually I could probably write some scripts to automate this a bit, but it's time I'd rather spend on other features first.

The 2nd issue will require some real work - right now I'm planning to make my own smoother algorithm which exports a file, which can in turn be imported by a new visitor script to shift terrain vertices. With a little luck and time, I should be able to make something that is at least equal to the smooth roads script, and hopefully without any of the issues that seem to plague it...

Minimalaco
Nov 18 2011, 21:40
Excellent, the current tool is very fast and easy to use, and have not had any problems.

the second point, I think there would be no problem, I create the way objects using OA roads, and then pass the old version to flatten the road.

Finally, it would be faster than them hand in hand.

Thanks !

Mikero
Nov 18 2011, 21:49
If there's something useful i can do for you with dePbo.dll let me know. It can read and write pew and wrp files (both types) without effort and detecting road-section p3d's isn't a problem. calculating terrain heights is an art, not a science, with the triangulation methods bi use, it can only ever be guess, not, exact. Let me know what i can do for you, if anything.

Sealife
Nov 18 2011, 22:37
1) If you need to delete a road from your WRP, you'll have to delete the road piece-by-piece in Visitor
2) The default "smooth roads" script will not be usable

if i may enquire something here , i may have misunderstood so forgive me :).

if they define in config the original model pat and name , is it possible you can then spit to arma.rpt a usable Network for visitor ?
for example netowrk file uses the following syntax (default but can be changed IIRC)

if someone made the mod as described previously and made a define for each piece in the config , could configfile command be used to then report out ?

this way we can thenopen visitor place a single piece of road, double click and then use Import NET script and then smooth script and road pieces can be deleted as normal ?

i see that the | and the ( maybe a problem but these can me manually pasted IMO in the text folder if it is a problem.

Homer Johnston
Nov 18 2011, 23:08
[...]this way we can thenopen visitor place a single piece of road, double click and then use Import NET script and then smooth script and road pieces can be deleted as normal ?[...]

Haha - I'm guessing you never used the old road painter? :) that is how it worked (except it used a separate program to produce a TXT file). The reason why I am abandoning this method is because it limits the road to only using 10_25, 10_50, 10_75, 10_100 turns, which makes everything difficult.

I think once more progress is made on these tools, there will be no desire whatsoever to use Visitor's "Road Networks" anymore :)

Mikero - great to hear from you! I think PBODLL may be very useful later on. For now I have to just get something basic that works :)

 just adding a little video, gives a better idea of where the tool is going than just talking about it.
g_yWZB9Hy_U

[APS]Gnat
Nov 19 2011, 09:03
And another WOW

Sealife
Nov 19 2011, 09:11
Haha - I'm guessing you never used the old road painter? that is how it worked (except it used a separate program to produce a TXT file). The reason why I am abandoning this method is because it limits the road to only using 10_25, 10_50, 10_75, 10_100 turns, which makes everything difficult.

you are correct , i am only using Take on helicopter to make islands but i think i will use the old roads .
anyway i love the video and i think your correct the visitor tool looks obsoloete after seeing the video

fantastic work

Hotzenplotz
Nov 19 2011, 10:03
Oh yeah , that is great. thx Homer Johnston for working on update.
Greez Hotze

MugAben
Nov 21 2011, 01:44
Man that looks great! Cant wait to get this for my map.

Keep up the good work, youre making a really slow progress in map making so much faster and easier with the old tool, and now this :)

DMarkwick
Nov 22 2011, 17:50
just adding a little video, gives a better idea of where the tool is going than just talking about it.

One of the most incredible development vids I've ever seen for ArmA :)

Homer Johnston
Nov 30 2011, 07:16
Just a quick blog-style update, rambling "out loud" sometimes helps me figure things out.

Well, after spending a week doing nothing but playing Minecraft (Notch, I hate you) I've started toying with getting imports into Visitor, and unfortunately it's much more fun than I hoped! BIS was nice enough to use the [0,0,0] origin of the P3D (which is an end of the road piece) in-game for setPos, but the Visitor import script (and Visitor itself?) uses the center of the object's geometry for location... this essentially means my fancy math for placing parts in-game is useless for actually determining Visitor coordinates. It'll take me a couple nights to figure out a solution. :dontgetit:

I'm still hopeful I can put up something that is alpha-usable by the end of the coming weekend... Adios til later!

[APS]Gnat
Nov 30 2011, 11:23
Bugger.
Similar to problems I encountered in the past.
Was considering creating a huge table that provides an XYZ offset for each peice ..... long and painful no doubt

Hope you crack it !

Mikero
Nov 30 2011, 12:55
:rthumb: in addition to above also note that visitor rotates an object clockwise and the in-game editor rotates it counter-clock for the same degrees (or vice versa, can't remember). Editor is Cartesian, visitor is Polar.

And beyond all this, neither the 'editor' position, nor the 'visitor' position is THE position returned in game. The engine uses center of gravity of the model. Both visitor and editor use quick 'n dirty methods because it would be quite disturbing for an author to 'see' every model on their map rotate in a slightly to hugely different way depending where c.o.g was.

Separate to all this is a rather dodgy bit of math fudgery to calculate height ASL. Four height points are determined from the nearest elevation cells of the wrp, based on the XY centre of gravity. and then Z is calculated by triangulation of these points and slope /slant of the object.:banghead:

Homer Johnston
Nov 30 2011, 20:41
Welp - that was easy - I discovered that modelToWorld [0,0,0] gives the proper "center" for Visitor! Cheers,

[APS]Gnat
Dec 1 2011, 14:32
Phew! That was close ;)

Homer Johnston
Dec 2 2011, 07:25
Ok, starting to rough in some more functionality. This weekend I'll release the first "alpha" version - it will most likely explode in flames when you use it, and the EXPORT button will only copy a bunch of text to clipboard. You'll have to manually paste it into a text file to import into Visitor.

TO DO list over the next few weeks:
- make a terrain-smoother algorithm and import script for Visitor
- Translations/stringtable for other languages (I only speak english, will be hoping for assistance with translations in a couple weeks!)
- make a .EXE to run in the background and provide the following abilities:
*produce .txt files automatically
*save & load GUI settings (key binds, view distances, stuff like that)

Another demo video for fun since I know there are probably at least 2 people interested in this - don't bother frontpaging this one on any news sites, as I'll make a better one in a few days with captions and descriptions...

Beton
Dec 2 2011, 10:59
Wow... very impressive.

One question, are you using special modified roadparts or did you just define the standard roads as objects as well to import them via script?

great work! :)

Robster
Dec 2 2011, 11:08

Homer Johnston
Dec 2 2011, 14:49
One question, are you using special modified roadparts or did you just define the standard roads as objects as well to import them via script?

In Visitor, the roads are added as "artificial objects" like houses. In my tool, there is a script file which contains all of the road families... the tool looks up what pieces are available for the selected family type, and uses them... will provide more info on the weekend. A snippet:

// =============================================================
// MASTER TYPE LIST

[
"ASF",
"CES_D",
"asf1",
"asf2",
"asf3",
"city",
"grav",
"mud"
];

// =============================================================
// START OF DIFFERENT ROAD TYPES

[
"pictures\questionmark.paa", // picture for listbox
[["HOMJ_asf6konec", 6.25]], // connectors / special pieces
[
["HOMJ_asf25", 25],
["HOMJ_asf12", 12.5],
["HOMJ_asf6", 6.25],
["HOMJ_asf10_100", 10, 100],
["HOMJ_asf10_75", 10, 75],
["HOMJ_asf10_50", 10, 50],
["HOMJ_asf10_25", 10, 25]
]
];

[
"pictures\questionmark.paa",
[["HOMJ_ces_d6konec", 6.25]], // connectors / special pieces
[
["HOMJ_ces_d25", 25],
["HOMJ_ces_d12", 12.5],
["HOMJ_ces_d6", 6.25],
["HOMJ_ces_d10_100", 10, 100],
["HOMJ_ces_d10_75", 10, 75],
["HOMJ_ces_d10_50", 10, 50],
["HOMJ_ces_d10_25", 10, 25]
]
];

[
"pictures\asf1.paa",
[["HOMJ_asf1_6konec", 6.25]],
[
["HOMJ_asf1_25", 25],
["HOMJ_asf1_12", 12.5],
["HOMJ_asf1_6", 6.25],
["HOMJ_asf1_0_2000", 0.5, 2000],
["HOMJ_asf1_1_1000", 1, 1000],
["HOMJ_asf1_10_100", 10, 100],
["HOMJ_asf1_7_100", 7.5, 100],
["HOMJ_asf1_15_75", 15, 75],
["HOMJ_asf1_10_75", 10, 75],
["HOMJ_asf1_22_50", 22.5, 50],
["HOMJ_asf1_10_50", 10, 50],
["HOMJ_asf1_30_25", 30, 25],
["HOMJ_asf1_10_25", 10, 25],
["HOMJ_asf1_60_10", 60, 10]
]
];

Bushlurker
Dec 2 2011, 21:38
So.... theoretically at least, the same approach could work for any string of artificial objects in a row?.... like fences maybe? or walls? ;)

B

Synide
Dec 3 2011, 01:36
So.... theoretically at least, the same approach could work for any string of artificial objects in a row?.... like fences maybe? or walls? ;)

B

Of course. And, trees, bushes, rocks, signs... all the static sorta stuff. It's not really 'theoretical' though... have you not seen the Mapfact guys stuff from a few years back?

Bushlurker
Dec 3 2011, 03:13
have you not seen the Mapfact guys stuff from a few years back?

Indeed... and more recently I believe they may now be "eurosimtec"...

But they're all posh and pro VBS2 only now...

B

[APS]Gnat
Dec 3 2011, 06:13
Nice line of thought Bushlurker
So Homer, can you/could you allow a 90deg turn in your tool?
Hence doing fences or pipelines would be laid the same way.

BTW, could the tool also allow guard rails, concrete barriers or guide posts to be automatically strung along as well?

Yeh lol, you give an inch, we want a mile ;)

Beton
Dec 3 2011, 07:23
I was thinking about the stuff from mapfact too... :)

I have always been waiting for something like that to show up again.
But anyway having a tool that allows us to place the roads the easy way would be a great start.

Bushlurker
Dec 3 2011, 13:20
Indeed Indeed...
There's just so many other things this technique could be applied to...
In fact, I was "planting little acorns" with my initial comment ;) - planting that little suggestion and hoping Homer wouldn't be able to resist his own imagination! :D

B

Homer Johnston
Dec 4 2011, 06:21
You guys are jerks :p I need to go outside sometimes!

Baby steps. Fence and line-objects will need some different algorithms (much more simple ones!) for placement, but I can sort of re-use chunks of the GUI.

And with that, it's just about time to take a leap of faith and abandon this thread. I'm sure you'll have found the new one by the time you read this...

Foxhound
Dec 4 2011, 10:37
If you abandon this thread I assume you want all feedback and further development reports in your newly created thread and to make sure that happens this topic is locked.