• "I'm going to pee in your seat" - Jenson Button
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you have any questions, please don't hesitate to ask. There's no such thing as a stupid question.

Problem with use_mesh_hits in spline.ini

Discussion in 'Racer Tracks' started by Mr Whippy, Jul 10, 2010.

  1. Mr Whippy

    Mr Whippy

    Messages:
    2,977
    Ratings:
    +455
    Ruud added a feature so that you could define splines simply for the AI to follow, and use the mesh as the surface to drive on... so you could thus have bumps, a cambered road or the splines pass through lots of different materials and surfaces and the car would follow the mesh and not the smooth splines.

    However, I can't seem to get it to work.

    This is an example of how I'm using it...

    lines
    {
    count=1785
    paint_start=0
    paint_end=1784
    use_mesh_hits=1
    }


    I have a nice high poly road surface with a crown to the surface, and off-camber bends with bumps in it etc. I also have a straight flat road model to build my splines off.

    Right now my car is sinking through my nice road and on to the splines underneath no matter what I do.

    In an extreme case on another track, my splines are 10m under the mesh surface and the AI somehow magically drops down onto these after a minute or so, then starts racing around in mid-air on the splines!


    In either case, the splines seem to be taking control even though I have flagged use_mesh_hits as 1!


    Splines still seem to be rather evil. So much potential, but they seem to be hard coded to want to take over.
    Great for when tracks had very few polygons but today the splines are the limiting factor :(


    Dave
     
  2. luthobu

    luthobu

    Messages:
    1,120
    Ratings:
    +179
    Do you have a link to the documentation? This is really something I would like to look deeper in to..
     
  3. gtpdzbiz

    gtpdzbiz

    Messages:
    129
    Ratings:
    +0
  4. luthobu

    luthobu

    Messages:
    1,120
    Ratings:
    +179
    @gtpdzbiz: thanks.. I think I read this before, it is not new is it? Or maybe I am just confusing it with something else. Thanks anyway :)
     
  5. Mr Whippy

    Mr Whippy

    Messages:
    2,977
    Ratings:
    +455
    It's not new, it's probably been around for about a year or so, but I've never had it working :(

    Dave
     
  6. boomer541

    boomer541

    Messages:
    1,345
    Ratings:
    +163
    Mr Whippy,
    Put the "use_mesh_hits=1" just under the "lines" and before the first { in splines.ini on the carlswood track and then run the baja1 round the first few turns and see the beast bounch all over the place.

    Then change the =1 to =0 or comment the use_mesh_hits line out and run the baja1 again to see the difference.

    Also note that there will be NO minimap when the use_mesh_hits=1 and ai won't work.

    Enjoy!
     
  7. Mr Whippy

    Mr Whippy

    Messages:
    2,977
    Ratings:
    +455
    Hmmm,


    lines
    use_mesh_hits=1
    {
    count=1785
    paint_start=0
    paint_end=1784
    }

    That will now break the "lines" definition, and thus make the splines.ini file null and void of info, and thus essentially run without splines.

    use_mesh_hits is designed to retain the mini-map, car resets, and the AI, and the fancy cameras, but make the car drive on the actual mesh!


    I'll have to send Ruud my track where this is a problem (well it's a problem on all my tracks so far, but one in specific that I have the problem clearly visible)

    Dave
     
  8. boomer541

    boomer541

    Messages:
    1,345
    Ratings:
    +163
    Thing is that it don't work if out under the first { character. I'll try it under the next } bracket.

    Added file to fix baja1 Qlog error.
     

    Attached Files:

  9. Ruud

    Ruud
    RACER Developer

    Messages:
    592
    Ratings:
    +58
    Dave, can you send me that track? I've tested use_mesh_hits 2 times so it must be something specific.
    The syntax should indeed be something like:

    lines
    {
    count=245
    use_mesh_hits=0
    paint_start=0
    paint_end=245
    }

    Using 'lines', then 'use_mesh_hits' and starting a tree there just gets rid of the splines!
     
  10. boomer541

    boomer541

    Messages:
    1,345
    Ratings:
    +163
    I'll give it a try as I did before on Carlswood.

    lines
    use_mesh_hits=1 ;0 <----works with =1 on carlswood check the first two turns with the baja1
    {
    count=339
    ; use_mesh_hits=1 ;0 <----- Don't work with =0 or =1 on carlswood, kills ai and spline map!
    paint_start=0
    paint_end=339
    }

    Please try again using carlswood, Ruud!
     
  11. Ruud

    Ruud
    RACER Developer

    Messages:
    592
    Ratings:
    +58
    I tried it but as expected it just gets rid of the spline! So no AI, no minimap etc etc. It just implicitly makes lines.count end up at 0, not loading splines. The whole point of use_mesh_hits is to use the spline for AI reference, the minimap etc, but still use the polygons for tire-surface intersections. That is most useful for rally tracks for example.
     
  12. Mr Whippy

    Mr Whippy

    Messages:
    2,977
    Ratings:
    +455
    I'll send you the track Ruud, just been fairly busy recently so not had the time to pack it up and send it on to you :D

    Thanks

    Dave
     
  13. snow918

    snow918

    Messages:
    1
    Ratings:
    +0
    Not that I'm contributing so much, but I remember having this problem, what was it, four years ago when I was modeling the Nürburgring. I left the road surface then unsplined (Racer beta 0.5 something) to make the carousel drivable etc. but as you have described, this rid the AI features and minimap.

    Good to see a feature something like this if only it would work.

    Hello by the way, nice to see Racer development progressing with cg looking stunning.

    Johan
     
  14. luthobu

    luthobu

    Messages:
    1,120
    Ratings:
    +179
    Welcome back snow918! I tried to get in touch with you while making Small City 2009, wanted to include some of your models. Too late for that now I guess.. since it has already been released.. nice to see you here anyway :)