Question about AI

Discussion in 'Content Creation' started by indyj_, Aug 21, 2017.

Tags:
  1. indyj_

    indyj_
    Expand Collapse

    Joined:
    Dec 26, 2015
    Messages:
    14
    So I'm creating my first map, and I've run in to some confusion with the roads. I have several intersections (1 T, 1 4 way, and several strait-line connections). This leads to my 2 questions,

    1. How do I create realistic looking intersections.
    2. How do I enable AI in my map? More specifically, how do I enable it on mesh roads. And it really cuts corners on decal roads; how can I fix this? (i have 1 mesh road and several decals)

    Searched the forums but couldn't find anything that worked.

    I'm primarily looking for an answer to question 2. I'd really like to have AI enabled.

    Thanks!
     
    #1 indyj_, Aug 21, 2017
    Last edited: Aug 21, 2017
    • Like Like x 1
  2. Glitchy

    Glitchy
    Expand Collapse

    Joined:
    May 26, 2015
    Messages:
    832
    Hello, I am also very new to map making, I don't know about the intersections, but as for the AI, I suggest not using mesh roads, because I don't believe AI works on mesh roads. Use decal roads, it's less work, and AI works.

    Here is how you get AI setup.

    - First go to the info section
    - Set 'lanes' to '1'.
    - Set 'driveability' to '1'.

    I hope this works for you. :)
     
  3. bluerider598

    bluerider598
    Expand Collapse

    Joined:
    Aug 13, 2016
    Messages:
    196
    Decal roads are the easiest for AI. But if you have to use mesh roads, you should use waypoints, and that requires making a map.json file. Just take a look at how ECA has the waypoints over its bridges as an example.
     
  4. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    3,299
    You don't need to use mesh roads, and should not use mesh roads as roads, use decal roads instead as they offer better AI support more naturally. Only use mesh roads to CARVE a road surface with the raise/lower to mesh tools on the terrain editor panel.
    If the AI cuts corners, use more nodes around the corners, keeping them evenly spaced will help you out. Use 8~10 nodes at least spaced a few meters apart to make a 90-degree corner. Do not sharply contrast the difference in space between nodes or it will make the road bend oddly in a corner. The more nodes you use the less it will cut corners as AI draws a route direct from node to node.
    You can use an invisible road texture (like the completely_transparent.dds file in my maps ROADS directory), to get the AI over straight bridges, just make sure the beginning and end node is at the ends of the bridge and level with the road surface. Make sure no nodes besides the beginning and end of the road is used on the invisible road. Set AI driveability to 1 and you're good to go.
    You need to restart your map for any AI pathfinding changes to take effect.
    You can also script map waypoints in map.json in your map's directory. You'll need to know how waypoints work, how high they must be, etc, use a game-map for demonstration.

    You may learn about carving road surfaces out of mesh roads with the 'Something about roads...' thread. Search for it.

    Almost all of my maps have textures you can use to create intersections easily. Look for them.
    You can open and save .dds Direct Draw Surface textures with "Paint dot net" or the more-complicated GNU Image Manipulation Tool available both for free, to use to modify if you need special graphics. My road textures are available in my maps for free.
     
  5. indyj_

    indyj_
    Expand Collapse

    Joined:
    Dec 26, 2015
    Messages:
    14
    Thanks! Drivability 1 worked for the decal roads and I think I'll try waypoints for the mesh because of the look I was trying to achieve. But I'll probably use Bob's method for making roads flat. And thanks for telling me about you intersections, I love your maps BTW. If I use the intersection texture will I need to change anything in the materials.cs file?

    This is the mesh road:
    300102-3b0469c04086c8c99aa8e00288cce649.jpg

    Thanks for all your help!
     
    #5 indyj_, Aug 23, 2017
    Last edited: Aug 23, 2017
  6. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    3,299
    you can easily make intersections with those ECA textures, just use the narrow asphalt low-detail patch to cover up the lines. It's like laying a line of grey white-out with a super-narrow decal road over-top of it with a 'lower' (lesser) number on priority so it shows up on-top of it.
    If you use mine, they're darker.

    Just look how they did it in ECA.

    Use the carving tools after making your mesh road slightly wider, to make it so that you can raise-to-mesh the terrain and then lay out a matching decal road and do away with the mesh.
    People hate mesh roads...just saying, though you seem to have the scene made pretty nicely.

    You can use any textures of mine you want, find the files you need via the editor, find those entries in the materials.cs in my roads directory and copy the entries you need out of my materials.cs into yours, being sure to change /southernhighway/ or /hiway2/ or /tsh/ (my map's code names) to /yourmapnamehere/ and make sure if it's ROADS directory on my map you delete the S if yours is only a ROAD directory.
    Some maps it's called roads, some maps it's just called road, I myself am not immune to the bug!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice