News Forums RAIN General Discussion and Troubleshooting Sidewalk Target Wander & Cross

This topic contains 3 replies, has 2 voices, and was last updated by  prime 2 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34750

    Velathora
    Participant

    Hello all,

    Another question of course.

    I am looking to create something off of what I have learned within some of the tutorials and examples. This information will be used within a project that is coming up in the new year and I want to have something to show for it. I chose RAIN AI early on simply because of the awesome support through the forums and have been intrigued and continuously loving the different things that can be done with the entirety of the system.

    I am looking to create a somewhat simple system on an existing project that has an “EXTREMELY” large map.

    X:”I want 10-20 pedestrians that will wander along sidewalks, and upon sensing certain “ENTITIES” within this wander, they will kind of stop and look around.
    I need to have each of these pedestrians avoid hitting each other or “sliding off” each other.

    I am in need of the pedestrians to cross the street onto new blocks and doing step “X” in a loop.

    Q: Is this all possible without navmesh?

    Q2: Would one assume that multiple waypoint networks work well within this system (knowing that the only issue I seem to have is the “sensing” other pedestrians” and “crossing the road”

    Q3: How would I go about sensing other pedestrians and avoiding them (but not too much, as it should be realistic).

    Q4: How might I go about crossing the street at a predefined location, and then cycle into a wander along a route (without it looking like a patrol), or maybe even have a patrol behavior, but the issue will lie with the fact of how large the map is, and how many patrol areas I would have.

    Sorry for the lengthy topic,

    Cheers.

    • This topic was modified 2 months, 3 weeks ago by  Velathora.
    #34755

    prime
    Keymaster

    1) Sure - it’s entirely possible without a navmesh. You could potentially use the RAIN waypoint system, or you might even just construct your own movement graph specifically for sidewalks.

    2) The problem you will have with Waypoint Networks is assigning AI to networks in a way that doesn’t cause collisions. (e.g., two AI walking on the same path in opposite directions)

    3) I would take a very custom approach to sensing and avoiding in this case.

    4) See below…

    Generally, the approach I would take to this type of Sim would be:
    - Use a navmesh. Use more than one if you have a large map. Use the navmesh to avoid map details like benches, fences, street lamps, etc.

    - Create a set of “lanes” that represent paths along the sidewalk

    - Create a lane manager that tracks positions of AI along each lane segment. The lane manager will create a move target for each AI and move it along the lane in front of the AI

    - Allow the lane manager to notice whenever two move targets will hit each other, then detour the move targets to jump into the next lane, pause for a moment, or take whatever other action is necessary to avoid collisions.

    #34756

    Velathora
    Participant

    Perfect,

    If I was to use a form of custom approach, is there any custom action that you might suggest that would allow movement from one side of the street on a sidewalk to the other side of the street on the other sidewalk?

    I.E.

    Pedestrian walks along sidewalks on navMesh, gets to a corner and sees that the light is green in the opposite direction (indicating “I can cross”). Pedestrian then moves to alternate sidewalk and cannot go back unless the same condition is true.

    The issue lies with the entire thing being dynamic, as the map, as I mentioned, is very large.

    Would you still suggest a navMesh in this case, or multiple waypoint networks with transition? (I may reduce the area where the pedestrians will walk, as the map is large, but only 1/5th is a “city” that is usable by drivers and pedestrians.

    Cheers.

    #34759

    prime
    Keymaster

    I don’t think I would use waypoint networks. You need something a bit more custom.

    I think the system I would put together would have a central “traffic manager” that deals with all the different move targets, lane assignments, avoidance, and destinations. An AI would essentially request a move target from the traffic manager depending on where it wants to go (down the sidewalk, across the street, whatever). The traffic manager would then deal with holding the move target in place until the light changes, then having AI move without colliding, etc.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.