Jump to content
Sign in to follow this  
Homer Johnston

Road Painter 2

Recommended Posts

@ Old Bear: I've seen some guys making rivers over a plain surface with roads set to absolute height to -1 meter (in example) and then applying smooth roads script... I know it's a trick but may work

Share this post


Link to post
Share on other sites

@Robster : Thanks. I am already using "roads" in various undocumented ways on my maps, for example to get navigable rivers as well as building small islets as on Tigeria island.

What I mean in my "dream" is to have a way to lay river as we are laying roads so we can have rivers not made from sea water nor from BI ponds objects, so we can get rivers in hills without the side effects the ponds objects are producing.

Share this post


Link to post
Share on other sites

Hmm, after a small amount of testing I've discovered:

1) the "map" control seems to crash buldozer (expectable, I guess)

2) buldozer doesn't seem to support pictures in the dialog

Assuming I don't run into any further issues, technically I could port the tool into Buldozer without either of those... but it's seeming like an even bigger hack-solution than my current method :\

Railway tracks are something I didn't think of, I don't know why they wouldn't be possible... but stations and other interchanges might have to be done manually. I'm not sure what railway objects are available. I'll have to look into it after I get this smoother done. Speaking of which, I've managed to fix it up the algorithm a little more; it blends with terrain correctly now. I have to develop the GUI/in-out side of it next, then I'll be able to post another update.

I think I'm going to start work on a new little .exe program as I had in the original tool for supporting file in/out with ArmA. If possible, I'll probably look into hooking depbo.dll onto it to load info from PEW files... Mikero, if you read this, I might have to get in contact with you in the new year. :) I'll be exploring the depths of your dev-heaven page and documentation for a bit...

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

Homer, are you running the actual ArmA2OA exe as your buldozer viewer?

Just wondering if that would work with ALL features .......

Yes .... Railroads! Of courses! Yeh, just the straight bits would be great.

Share this post


Link to post
Share on other sites

Sorry, Real Life got really busy after the new year.

Since the last post, I've improved my smoothing algorithm a bit (it blends nicely with surrounding vertices now), and started working on the GUI elements to control the smoothing. My next big task before I can release something is to get data transferring from PEW files to the in-game tool, so that I can read the actual elevation matrix and use it in the smoother. The biggest challenge I will face is figuring out how to use the new callExtension function - there seems to be no documentation how to actually make use of it. Once I figure that out, I hope it's possible to write a small, convenient plugin to handle my specific needs.

Expect a better update in about 2 weeks, I have to finish up one or two more things through this weekend before I can get focused on this again. :)

Unfortunately I'm not really in need of help at the moment, unless there is someone who can help me learn callExtension, and/or is decent enough at C++ to help me get started on a data in-out plugin tailored for my needs...

Share this post


Link to post
Share on other sites

Unfortunately I'm not really in need of help at the moment, unless there is someone who can help me learn callExtension, and/or is decent enough at C++ to help me get started on a data in-out plugin tailored for my needs...

Ask someone you have on skype and is already in this channel to add you to the 'ArmA2 Tool Makers Channel'.

There are people in there that have already made use of 'callExtension' extensively and others that know the .pew file, c++ etc., etc.

Although I'm sure you could probably glean what you need from this DH page... Official support for 3rd party plugins (dll's).

Edited by Synide

Share this post


Link to post
Share on other sites

Great, sounds good Homer

Question: Is the code making optimal use of the longest road bits, when a user appears to be making a long straight road?

Not 100% myself, but seems I'm getting far more shorter bits joined together than maybe I should when I'm making a long straight road.

If if isn't optimal (I can image the code might be a serious problem, "is he trying to make a long road or not" ), I'd suggest maybe something like a Key-down-hold trigger to force the current stretch of road to be only the longest straight bits.

Share this post


Link to post
Share on other sites

Synide, thanks for the link. I didn't know that ticket existed; it looks like it may answer everything I need.

Gnat, I'll check that out. Right now the algorithm is supposed to simply pick the piece which brings it closest to the cursor over and over until it can't get any closer, but it might be bugged or need some other sort of conditioning.

Share this post


Link to post
Share on other sites

I said I'd post something, so I'd better post something. I've got the callExtension / DLL system working, it was really easy and looks like it's going to work perfectly :) right now I'm still preoccupied with another project; will be for a few more days, then I plan to get back on this. Mikero's kindly offered me some help to use his PBODLL to work with PEW files, so we'll see what I can come up with. Sorry for the slowdown, but progress will resume soon!

Share this post


Link to post
Share on other sites

Yeah sounds good. i check this thread every day twice to see if there are news :-) Keep on going!

Share this post


Link to post
Share on other sites

Sure, but not much! I've been spending every spare hour helping Invasion '44 get version 2.6 and just a few hours ago patch 2.61 released :)

However - now that those are done, I get a break from it. I spent today getting my DLL plugin working nicely, and added my own self-explanatory functions to the game:

["filepath"] call HOMJ_DLL_IO_newFile;

["filepath", "data"] call HOMJ_DLL_IO_write;

["filepath"] call HOMJ_DLL_IO_read;

Using these, I've got it set up now that the "Export" buttons will create .txt files ready for Visitor. Now I'm working on a system to save/load work-paths so that you can close/reopen a project.

Pictures: I draw two roads and use "Save Paths to File" + "Export All", and it makes files under subfolders within "ArmA2OA\@HOMJ\DataFolder\". For now I'm hardcoding it to only work on files in this subfolder, to prevent the chance of wrecking other files on your HDD ;). Once I have this all working, I have to make a little dialog for the Smoother... then I have to tackle the heightmap, loading the elevation matrix of the terrain so I can modify it and export it. My dream is to load data from a PEW file into ArmA (and inject data back into it!), but for a speedier release I might do something more simple, like export XYZ from Visitor and manually load that into RoadPainter, and vice-versa. Hoping for something usable by the end of the month, but we'll see how it goes after I dedicate a few more nights to it.

demo_exportstuff.jpg

demo_savedfiles.jpg

Share this post


Link to post
Share on other sites

Afaik visitor does not have a native XYZ file export function but import only, if you can manage that somebody would be tempted to make a statue in your honor Mr. Johnston :P

Share this post


Link to post
Share on other sites

mikero's tool can export xyz data from wrp and pew I think. If not, suggest it to him. :)

Share this post


Link to post
Share on other sites

Yeah it looks like you're right - no XYZ export from Visitor. However, I've got the DePBO source now (thanks Mikero!) and it looks like it may have all the capability I'll need to plug it into my program. I'll be able to do a test later this week - fingers crossed.

Share this post


Link to post
Share on other sites

I had forgotten to tell about these news... looking forward to be surprised as usual :p

Share this post


Link to post
Share on other sites

Sigh, time passes too fast... here's a new little video to tide you folks over, and hopefully buy me just another week or so to run this thing through some rigorous tests and finalize some needed import/export options :)

CGA2KnFN3DM

Share this post


Link to post
Share on other sites

Nice thought; I wasn't really aware of those commands. I'll be able to use them to speed one or two things up, but sadly the actual smoother algorithm simply involves millions (literally) of point->point distance calculations and it just isn't that fast. However, I'm also using a near-3-year-old CPU, and the number of calculations required depends on both the map cell size & your total smoothing width (i.e. 20m in my test). Proving Grounds is a pretty brutal heightmap to work on, compared to e.g. a 10m grid. There are a couple things I'll be able to do to speed it up, but it's still going to be a pretty slow process. Users will hopefully be able to quickly learn some settings they like (or just draw a short "test" path) and reuse them without needing to try out a bunch of different settings...

Edited by Homer Johnston

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×