Jump to content
Sign in to follow this  
Homer Johnston

Road Painter tool (development thread)

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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 :).

Lets say someone made a MOD using the roads for your tool to use in game and roads were now objects not roads as such .

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)

| ca\roads2\path_6

( ca\roads2\path_10 25

( ca\roads2\path_10 25

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.

Share this post


Link to post
Share on other sites
[...]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 :)

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

g_yWZB9Hy_U

Edited by Homer Johnston

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites

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!

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

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 !

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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:

*save & load work

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

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

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! :)

Share this post


Link to post
Share on other sites
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

HOMJ_RP_RoadListMaster =
[
// ArmA 1 roads
"ASF",
"CES_D",
       // ArmA 2 roads
"asf1",
"asf2",
"asf3",
"city",
"grav",
"mud"
];

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

HOMJ_RP_Road_ASF =
[
"ca\roads\",
"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]
]
];

HOMJ_RP_Road_CES_D =
[
"ca\roads\",
"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]
]
];

HOMJ_RP_Road_ASF1 = // Starts at straights, then goes to high-radius turns, and works to low-radius...
[
"ca\roads2\",
"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]
]
];

Share this post


Link to post
Share on other sites

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

B

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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 ;)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

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.

Share this post


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

×