aiw~thing

Discussion in 'Track Modding' started by Bink, Oct 3, 2014.

  1. sergioloro

    sergioloro Registered

    Joined:
    Oct 17, 2011
    Messages:
    190
    Likes Received:
    4
    hey bink, thats sounds great, at some point a more "visual" AIW editing tool is a great addition.
    i can wait to give it a try :)
    does this tool allow to edit long tracks like 15/25 kms?? i had plans to do some loongs tracks but build AIW with current editor for this tracks could be a nightmare!!
    cheers

    sergio loro
     
  2. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    Longest I've done so far is about 51km without any aiw problems. The aiw isn't the only nightmare with long tracks. At least with rF1, there was lighting & shadow weirdness when tracks get long. Also... try to get 193 corners driven perfectly in devMode.

    Some aiw data that is now visible:
    View attachment 14534
    View attachment 14535
     
  3. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    Decided to write "Teleport" and "Alt Grid" into the script.

    Thanks to Tosch for explaining that Teleport spawns on formation lap lines (in Raul's thread). Looking at Joesville aiw, Teleport seems to have the track flavor of Ori (yaw is 0 --> +/- pi... odd that it would be different than grid, but no prob to make ). A Teleport rollout would just require selecting a wp, and pushing a button... so rather easy to code.... probably can use existing functions.

    I think I've seen Alt Grid used in a (real) IndyCar race one time.... after the race was red flagged, they set up near the pit exit; it was on an oval track.

    Is that how rFactor uses Alt Grid?
    Does anyone know of an rF2 track that uses "Alt Grid" (need to look at the aiw file to see if alt has wp... like normal grid does) ?
     
  4. mschreiner

    mschreiner Registered

    Joined:
    Oct 5, 2010
    Messages:
    390
    Likes Received:
    263
    I am doing AIW for rF2 ovals now.
    I was referring to the calculated speeds in the SDK AIW editor and it is a pain to make the Fast line where the calculated speeds do not slow down the AI cars. So I am not sure if wp_test_speed has an effect on them or not.
    If you want I can PM you a link to my current beta track oval to test the tool on as well?

    Cheers!
    Mike
     
  5. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    You have to modify the gdb file and add the following line.

    I've tried it in devmode and it works (alt grid placed in pitlane, modified aux position for the safety car), but in game it seems it is not possible atm. Maybe a bug.
     
  6. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    Hey Mike... Hopefully next week I'll get around to playing with wp_test_speed (got side-tracked on other things lately). I'll post the results here. I kinda just work on whatever I feel like when I start each morning, which usually ends up being whatever is currently bugging me the most about the latest ver of the script [currently the 115th version].

    @Tosch... Thanks for the .gdb RollingStartLoc... I am sort of curious if the alt grid spots have waypoints though. I guess I could just write a function to place the spots at a certain width / length along pit lane (and write the pos & ori to the alt grid token in the file), then see if setting rolling start in the .gdb puts the cars there in devMode. If it works, then perhaps it does not require waypoints. Mario's (yet to be released?) Laguna has a nice wide pit lane in places, so that would be a good spot to try alt grid. Been using his Laguna for much of the testing lately. I'll probably write the (optional) Teleport rollout before investigating alt grid & test speed.

    Spent yesterday putting pit & grid branches and garage paths into the Show / Hide rollout (and streamlining data loading on startup). The rollout was getting a bit long, so I re-wrote things to have a single color-picker & visibility check box for each PAIR of track corridors, cut-corners, collision corridors... so it made more room for the garage paths & branches.

    Thanks for the help and schooling on all this...
     
  7. mschreiner

    mschreiner Registered

    Joined:
    Oct 5, 2010
    Messages:
    390
    Likes Received:
    263
    Bink.
    I believe Alt Grid does have waypoints like the main grid does. Something I have done with ovals in the past is I will make my main Grid on Pit Road for Stock Cars and then I just copy that grid to the Alt Grid section of the AIW. But if you want a track to start on the track for the main Grid like Indy and have the Alt grid for Pit road like the Stock Cars then you do need different Grids. Basically they are them same other than where they are located. That was just FYI.

    Mike
     
  8. A13

    A13 Registered

    Joined:
    Jul 31, 2012
    Messages:
    123
    Likes Received:
    29
    cool that's great news Bink :)

    thanks for not giving up on this and thanks to Tim getting the things sorted to get this masterpiece to run.
     
  9. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    @Mike... OK... Thanks. I have to take a look at what tracks ISI is offering on their site.... and try to see if one of them has alt grid.... then spend some time in the aiw file to see how they implement it.

    @A13... Yea... I always wanted to have this thing be free, and something belonging to the community. Since there is no reward, then it would have been stupid to continue if there was risk (law suit). So Tim's OK made things ballenced (0 reward, but also 0 risk... so no problem).

    Just remembered yesterday that about 100 aiw~thing versions ago, I had coded a rollout called "Car Drop Spot". Must have removed it when lightening things up awhile back (removed road line making code, grid spot paint lines, etc...).

    Now I'm thinking that "Car Drop Spot" rollout needs to be put back in the script. It would be pretty handy to have when you're just starting a track. You select a vertex on something drivable in 3dsMax, and it puts an icon there, allows you to optionally rotate it, and then there is another button for writing a file. Don't remember what all it puts in the file, but probably not much... I'll have to look at one of my old versions to see how I did it.
     
  10. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
  11. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Hi Bink!

    If I may give few comments about show/hide user interface... ;)

    Why dont you categorize show/hide menu same way than ISI's AIW editor? It would simplify thigs even more. I wouldn't try to implement every tiny miny bits here and there to this tool at this point, but instead build simple, basic and easy to use aiw tool. If someone wants to finetune AIW even more, there is always ISI's editor available.

    Show/hide menu could look something like this...

    Drive lines
    - main
    - 1st pit
    - 2nd pit
    - best
    - left
    - right
    - block

    Track
    - corridors
    - connections

    Grid/Pit/Garage/Special spots
    - garage spots
    - pit spots
    - grid
    - alt grid
    - aux1 (pace car formation start)
    - aux2 (pace car pitlane)
    - teleport
    - special slowdown

    I dont know what is needed to code (I don't know Jack Schitt about coding...) and what is needed to be shown in 3dsmax, but actually those items above is needed for basic aiw creation. Rest are more or less finetuning.

    Cheers!
     
  12. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    Hei Jka,

    The script currently does everything you listed except wet, block, 2ndPit, and altGrid. (Teleport is about half way coded (yesterday), and will probably be finished by tomorrow.) AltGrid is next, and the other 3 items may wait until after the script is posted.

    AIW files have to be built in a specific order (e.g. you need a fast line before you can connect a pit lane to it). That is why many of the aiw questions on the forum are about sequence... like the post a few days ago about needing formation lap lines before making teleport spots.

    For these sequence reasons, the top to bottom order of the script's control panel rollouts (and the Show Hide menu) is close to the order that you need to build things (in devMode or aiw~thing). To avoid sequence questions, the script only enables controls when you are ready for them.

    I've never found devMode to be easy for 'fine tuning'. Trying to enter precise position data with a steering wheel is part of the problem. Imagine what our track meshes would look like if we had to build them with a steering wheel.

    So... in my (perhaps crazy) view of aiw:

    1. 'Fine tuning', and precise positioning should be done in 3dsMax (it's made for that),
    2. DevMode should be used like the "viewer"... to see if things operate as you expect,
    3. Steering wheels should be used for driving.

    I'm not trying to be disrespectful to you or ISI by writing this. I've learned almost everything rFactor by reading what you and mianiac respond to posters with. It's also clear that devMode is coded 'small and fast', because simulating in real-time requires that.

    I just don't think that an 'easy to use' and precise aiw creation app needs to be executed inside a real time simulation.

    edit: [pretty sure I used to work for Jack Schitt a long time ago... probably in the military]
     
    Last edited by a moderator: Oct 14, 2014
  13. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Yes, I can see your point and fully understand it. My reply was mentioned to give opinion show/hide menu UI, not AIW creation itself (with mandatory sequence etc.). I put my words badly. :)

    I've got used to ISI's AIW editor during these years. I can place exact locations pit/garage/grid positions with shift+ctrl+arrow keys fast, drive lines and so on. Furthermore, adjusting and smoothing lines, corridors or invidual spots is fast and easy. Basic, fully functional AIW can be created less than hour almost every track, when you get used to it. It's like any other software, when you get used to it its easy to use. I still can remember my struggling with 3ds max back then... :D

    Nevertheless, I can see many, many advantages in your tool. No question about that. I'm sorry if I sound disrespectful or question your work. That was not my purpose in any case. :)

    Cheers!
     
  14. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    I was not offended by your suggestions, Jka. Just wanted to explain my reasons for having things the way they are in the script.

    I'm sure the devMode creator / editor is usable with practice. I couldn't use devMode on my track because it was NOT able to do long tracks (CTD). Maybe that has changed (?). Simulating fuel usage in devMode would be a good thing to keep; it's a simulator, so it makes perfect sense. Same with testing aiw on track... it's a simulator, so good application to test aiw operation.

    I just don't see a reason why you should have to drive around in a simulated car.... stop... and grab your mouse to move something, and then drive to another spot and do the same.

    You could program a word processor inside devMode too. You could have the user drive the car to where you wanted to start writing, and have the user press the pit speed limiter button on the steering wheel one time for "a", twice for "b".... 26 times for "z", and push in the clutch for upper case. To write the next line of text, put the car in reverse, and back up, then put it in neutral and press the brakes... before you start writing the next line..... etc... etc...

    Or.... you could just use a regular word processor ... the same one we use for the .SCN file.... and writing would be much easier (faster, etc...).

    3dsMax is made for building things in 3d. Most of us already use it to build our tracks. Most of aiw creation is building and positioning things in 3d.... pit boxes, corridors, grid spots, curving lines. It seems to make more sense to use a building program to build aiw, rather than a simulator.
     
  15. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    World need sense humor! ;)

    Maybe Stephen Hawking can use devmode to speech?
     
  16. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    Good to see that word proc was not taken seriously...
    I would have put a smile face after it, but I think there are laws against people my age using those.

    -- New data structure: tPortSt...
    -- new control panel rollout: "Teleport"...
    -- 2 buttons: "make teleport" and "clear teleport"...
    -- script 'knows' how to look for them, and so.. always knows which button to enable...
    -- 3 seconds to calc, make, and place all tp icons behind whatever (main track) waypoint you select...
    -- every tPort spot alligned to Formation Lap lines.....
    -- if you shut down and restart max & script, tPorts + data get read read back into the tPort structure...
    -- and finally... everything (grid indices, pos, ori) is put below the [TELEPORT] token when you write the file.

    Got to that point last night and needed food, so I'll have to test it in devMode later today.

    Probably be very similar code to do altGrid ... so that may be next.
     
  17. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    aiw~thing knows how to make [TELEPORT] and [ALTGRID] now in 3dsMax... writes them to the aiw file... and it ran perfectly in devMode...
    View attachment 14579
     
  18. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
  19. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    New GUI layout (image below) rollouts are divided into "required" and "optional" aiw functions.

    Just the gui so far... I'll start on reworking the state machine, every roUiTest() function, and wake-up functions to 'know' the new layout functionality today.

    New optional rollout: "Drive Line4"... rF2 at this point only allows 4 driving lines (last I heard)... so Fast Line, Left, and Right are obviously needed, and the 4th will be a "dropDownList" control in the 'Drive Line4' rollout that will allow selection of Wet, Block, PaceCar (think Mike suggested the latter). The idea here (atm) is that this rollout will probably start out just making a clone of the Fast Line... changing it's name, color, and user properties so it gets set-up to function as what ever drop down selection you have made. Since this clone will be directly over the fast line, the function will probably 'hide' the fast line after cloning it... so you can see the new line (showHide rollout will allow you to un-hide the fast line whenever you want). The spline editor (which 'knows' what is in your max scene) will allow you to select, edit, measure it's offsets, and re-calc the new 4th drive line's Ori.

    Another new rollout is "--> Imp Exp --->" (Import / Export) in the (new) utility section. I think this was originally Mario's idea... so you could export any 3dsMax aiw objects (like drive lines) to or from the current scene. The reason the script should do it (rather than just using the max functions) is so that the script can adjust the object(s) user properties (to invalidate the offsets for exports), and ask the user if they want to rename any splines with the same name (upon import). Import will also need to load the new object and parameters into the appropriate data structure, and flag that it will need it's offsets & ori measured. Probably also have a button to export ALL aiw objects to an external 3dsMax file, for back-up purposes.

    The "Delete Ai" rollout will allow you to delete every aiw object that the script has put in your scene in case you want to start over, or give up.

    BTW... I had never tested the new "Track Pace Car" & "Pit Pace Car" (Aux1 & Aux2) in game before.... but while testing [TELEPORT] and [ALTGRID] the other day, the pace cars were sitting where I had placed their icons, and worked just fine in devMode... so that was cool.
    View attachment 14587
     
  20. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    OK... state machine is working for the new GUI.

    Going to start work on the rollout for the "4th drive line" today (FASTEST, LEFT, and RIGHT are the first 3 lines).

    I have looked through several threads (like MarcG's great "definitive ai settings thread") plus the aiw pdf, and found these standard ISI 'drive line' types:

    FASTEST
    LEFT
    RIGHT
    BLOCK
    WET
    PACECAR ... (via mschreiner pm... thanks)

    Now... I'm NOT looking for custom lines for specific cars (like SparkF3_FAST)... Only looking for the standard ISI drive line types (like those listed above)... to populate the 'dropDownList' control. The final item on this dropDownList will probably be something like "custom name"... which, when selected will enable an "editText" box where you can type in whatever you want (and it will be put in the aiw file below fastest, left, & right).

    QUESTION 1: Have I forgotten to list any standard ISI drive lines?

    I'd also like to look at a track aiw file .. where a 4th drive line is implemented. I presume there is a pathInfo2= (3, ...... etc...) entry in each waypoint block, but I'd like to make sure before coding things.

    QUESTION 2: Anyone know of a track that uses a wet, block, or pacecar line... as the 4th driving line?
     

Share This Page