Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Homer Johnston

Member
  • Content Count

    284
  • Joined

  • Last visited

  • Medals

Everything posted by Homer Johnston

  1. Homer Johnston

    Road Painter tool (development thread)

    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.
  2. Homer Johnston

    Road Painter tool (development thread)

    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 wheel forwards: increase turn radius wheel back: decrease turn radius 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: ... still thinking about this
  3. Homer Johnston

    Arma road generator

    ZeroG: yes, and it's about damn time! :p Good to see someone else working on road-placement, and with a different approach than mine too :) I hope this works out well! Going to try it when I get home from work tonight...
  4. Homer Johnston

    Script / Tool suggestion box

    Trezza, I have thought about that too... but I think if MaskMapper could be improved to work with a higher resolution (1m?) then it would work alright (as long as you have a good image editor). If we did have a way to control a "shape-area", could there be any other uses for it? Another idea, again for MaskMapper; - As an option, have object size also be dependent on the greyscale intensity. Sometimes, the very edge of a forest contains younger, smaller trees.
  5. Homer Johnston

    Road Painter tool (development thread)

    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!
  6. Homer Johnston

    Road Painter tool (development thread)

    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 :(
  7. Homer Johnston

    Script / Tool suggestion box

    Just for interest's sake, I thought I'd mention that I've finally learned how to draw splines (start & end point, each with a directional "anchor")... this might eventually make it possible to draw and 'bend' curve-shapes in real time and fit things to them ;)
  8. Homer Johnston

    The best way to add roads?

    Yeah... in case it wasn't clear: the "drawn" road in my last picture (green dots) was created with two clicks (well... "key presses" for now), and the entire time I had a live-preview of it before placing it. I think that it will be fairly easy to find an X,Y start and direction from Visitor, then alt-tab over to ArmA, input X,Y / direction ... draw road, perform export process, import into Visitor, and repeat. I'll never be able to make this as comprehensive as 3DE unfortunately... I'm not good enough with dialogs, and I do work a full-time job :p. My future tasks are: accuracy check: lay a really long road in ArmA and see if the end location in Visitor matches (ArmA uses 8-bit calculations, so this shouldn't be a problem but I'm going to have to check it anyway). Might need to do some tweaking if Visitor overlaps road pieces at all?? if anyone had any info on this subject I'd love to hear it. improving user interactions; hopefully using mouse-input and maybe a couple of special toggleable options for placement routines improve Visitor <> Arma transition; create a dialog in ArmA to input start coordinates & road type Use Lester's addon mentioned below to place actual road pieces in editor instead of "dots" Going to busy the next few days with real-life stuff, but tonight I'm going to try and start a separate thread for the tool.
  9. Homer Johnston

    The best way to add roads?

    I made a screw-up in the left/right turns when it changes to straights so it doesn't match up exactly (the last turn flips around for some reason), but things are starting to look up :) So far the whole annoying process goes like this: 1) I use "optics" key to place sections, as per previous concept version. 2) I can use "reload" key to erase it backwards, piece-by-piece. 3) I can hit "action" key (enter) to copyToClipboard something like this: ( ca\roads2\asf1_10 25^( ca\roads2\asf1_10 25^( ca\roads2\asf1_10 25^( ca\roads2\asf1_10 25^( ca\roads2\asf1_10 25^( ca\roads2\asf1_10 25^( ca\roads2\asf1_10 25^ 4) I paste this into a text file with Notepad++ and use find/replace to change ^ symbols into new lines (unfortunately, this requires Notepad++ or another "special" editor) 5) I place a KeyPart section in Visitor, and import the text file I've generated. I'll update the PBO on the previous download link, mostly just for a backup of my work (I'm always paranoid that I'll get hit by a bus and will disappear from the community and noone will be able to continue my work, haha). It's got some elements that are somewhat hard-coded still (plus the turn-mixup mentioned above), so don't expect to be able to use it yet. More improvements to come... I may also eventually try using Nutty's tool to replace step 4
  10. Homer Johnston

    Unable to see and remove an object

    it has frustrated me for a very long time that BIS hasn't given us any documentation about Visitor scripting... not even a basic list of Visitor commands for us to figure out by trial and error :\ I think somewhere on the biki there is one member's "sandbox" who somehow found a list of all the commands, actually... using some debug method or something like that... can't remember who or where it was though.
  11. Homer Johnston

    The best way to add roads?

    Crap. That's not what I was hoping it'd do... guess I'll have to start thinking of something more clever :rolleyes: Thanks!
  12. Homer Johnston

    The best way to add roads?

    Haha, anyone care to try something for me while I'm at work? -make a new mission, create an init.sqf file. Put this in the init file: sleep 0.1; StringTest = format ["%1 ---\n\n%2 ---", "line1", "line2"]; copyToClipboard Stringtest; Start the mission. Then go into Notepad and hit 'paste' - tell me what shows up (or if there's an error message in game). I'm specifically interested if the copyToClipboard function will copy return/newline entries... if not, then this tool is going to be a little more annoying than I hoped it'd be.
  13. Homer Johnston

    The best way to add roads?

    yeah; I used the 'dots' for the concept because it was dead easy to implement. I'm hoping to figure out a way to use actual road objects in the future. I may need to make a small addon to make them placeable in the editor - I don't know if they have a defined classname to spawn them in-game... I was planning on having it work essentially just as the concept does; every mouseclick is capable of placing a set of turns and/or a set of straights. My points about different turn radii and S-curves was referring to the fact that a turn doesn't look realistic if it has an R25 turn immediately changing to a straight or swapping left/right; I may want to have the script start with gentler radius's and then go tighter, then gentle again as it exits the turn... otherwise you have to place a turn in at least 3 sections with different radii. It'll get challenging if I get into that sort of behavior but it might make it that much better to use... probably toggleable by a button. Also, it'll have to store all the road pieces in an array so maybe it'd be good to be able to back-track piece by piece. That shouldn't be an issue - I've had one array storing the location, type, heading, and all sorts of properties of several thousand objects without any performance issues before... But again, the biggest mental challenge is actually figuring out how to make it all work in a way that is most effective and efficient to use... maybe by next weekend I'll try to make a separate thread about this to try and document my progress, and get more public input :)
  14. Homer Johnston

    The best way to add roads?

    It'll take a while, but in the end it's just math. My main concerns are getting the algorithms to produce something which is actually appealing to the map creator, and the transfer from the editor to Visitor. The complexities in the algorithm will be things such as: - does it need to use larger-radius turns at the start/end of straight sections? - sometimes larger-radius turns won't fit; how to control whether to make the turn as tight as possible or more realistic? - how best to handle quick changes in direction (S-curves) - what controls to give the tool? e.g. I'm considering to have rolling the mousewheel to change turn-radius... - how to handle improper placements; maybe add the ability to delete (backtrack) the road piece-by-piece? Then there's the issue of getting it from ArmA to Visitor. I admittedly haven't done a lot of road placement in visitor, so I need to learn more about road networks, and how they are set up. Will the benefit of a tool like this outweigh the hassle of needing to copy stuff into text files and other odd junk? I don't know yet... The list could probably go on, those are just a few things that strike my mind right now...
  15. Homer Johnston

    2d and 3d editing.

    Are you using Buldozer? If not, do you know how to? <edited> ... doh, I think luckyhendrix below is right. Why on earth don't they just rename this forum to "Visitor Editing" or "World Addon Editing" or something?
  16. Homer Johnston

    The best way to add roads?

    Removed ACE/CBA dependency; feel free to redownload from same link and try again.
  17. Homer Johnston

    The best way to add roads?

    I considered ACE household material :p neither of you have it?!? I'll see if I can remove the dependency sometime this weekend...
  18. Homer Johnston

    The best way to add roads?

    it needs ACE and CBA... it wouldn't have to be a requirement, but it's how I made it for now. @shezan74 - I think you're just unclear on how it would work. Maybe if you tried the proof-of-concept mission I just posted it would make more sense to you?
  19. Homer Johnston

    The best way to add roads?

    Something like that. It would take quite a while to develop this tool into something really usable (due to being involved in several other projects :( ). I got it working to draw subsequent paths... it's really, really rough right now so don't make too much fun of it, but feel free to have a look at it :cc: No mods required. http://dl.dropbox.com/u/4621600/RoadTool.utes.pbo depbo and load it into the editor, or else load it as an SP mission. press your "optics" key to end a path segment and start a new one, and your move forward/back/strafe keys to move around (I'm too lazy to make it mouse-controlled for now) it doesn't use a lot of the actual road-piece shapes and the algorithm is really rough right now, so you'll have trouble making any nice lines with it, but it might be a start of something... comments and opinions are welcome.
  20. Homer Johnston

    The best way to add roads?

    @Beton - it's just a script I wrote up last night. I'm going to try and get it to the point where you can draw subsequent paths connected to each other, then I'm going to post it here and ask for input on whether or not it's worth developing any further...
  21. Homer Johnston

    The best way to add roads?

    Would it be easier if you could create road networks with a tool like this? Basically, you'd move around, click to "set" the point, and then repeat until you were done. It might be helpful for doing long winding roads, but I'm not sure? Red dots represent "turn" pieces, and the script selects the largest possible radius to use (I've added 25m, 50m, 75m, and 100m radii as options for trial purposes) The annoyance of this method would be transferring it from ArmA to Visitor - I don't know if you can write scripts that interface with visitor in real-time to do the same thing. You'd have to load your project into ArmA, build the road line, then manually paste the result into a road network file and import it into visitor.
  22. Homer Johnston

    The best way to add roads?

    I wonder if it's possible to run an old version of Visitor and use it, haha. heh, during my lunch breaks I'm going to see if I can figure out Spline Mathematics but it's been a few years since I've done this sort of math so it might be hopeless... man it would be awesome if we could click on some points in the editor and get a real-time preview of the road... it's possible, but so difficult that I may just be dreaming :p
  23. Homer Johnston

    The best way to add roads?

    probably not without source code :( didn't it work in earlier versions and then it got borked? how did it operate before?
  24. Homer Johnston

    The best way to add roads?

    Ouch, that linemapper tool still isn't usable? maybe BIS sent him a cease and desist letter :p. Unfortunately I don't know C, so I can't even attempt to continue his work or base something new off of it right now... The complexity with road placement is that there are several different road pieces which must be correctly selected to produce a best-fit. I've had an idea down on paper for months which would allow you to click along a path, and it would automatically select road pieces to get as close to where you click as possible. Each click would use the largest-radius curve pieces possible to turn towards the final point, and then place any needed straight pieces to travel to it. I don't know if it would actually be very convenient to place roads this way though. I may get around to trying it someday (it'd probably only take a few evenings), but I'm too busy right now. I could post some related math and concept info up if there's any other scripters around who are a bit competent with math and want to give it a shot. It'd also be technically possible to draw a spline and perform a similar best-fit along the spline, but the amount of math involved would need some serious brainpower!
  25. Homer Johnston

    The best way to add roads?

    I've had an idea in the back of my head for a long time about building a "tool" for the A2 mission editor which would let you define points, and then it would do the math and use copytoclipboard to give you a road network list, which you would then paste into a text file and import to Visitor. Has anyone else thought of this or can anyone think of any reason why noone has tried something like it? Can anyone find a page that describes some mathematics behind drawing splines from a series of points?
×