Headlights not always lighting the track

Discussion in 'Car Modding' started by Coutie, May 28, 2014.

  1. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    This only happens with one car, but it's set up the exact same as the other cars in the class. It seems that when the car is on the track by itself, everything works fine. Lights always show. But when another car is on the track(same type, or different, doesn't matter), the headlights will not light certain parts of the track, it can change every lap. As I said earlier, we've got three other cars in the class, and they work fine. This car is setup the same way, yet, it has issues, where the others don't. Here is the headlight info.

    Light=HeadlightL
    {
    Type=Spot Pos=(0.836, 0.553, -2.143) Dir=(0.10, -0.23, -0.85) Range=(0.000000, 400.842000) Active=True Attenuate=(1.4, 0.005, 0.00000051) Hotspots=(10.0, 66.0) Falloff=(2.0) Intensity=(5.500000) Color=(249, 248, 244)
    }

    Light=HeadlightR
    {
    Type=Spot Pos=(-0.836, 0.553, -2.143) Dir=(-0.10, -0.23, -0.85) Range=(0.000000, 400.842000) Active=True Attenuate=(1.4, 0.005, 0.00000051) Hotspots=(10.0, 66.0) Falloff=(2.0) Intensity=(5.500000) Color=(249, 248, 244)
    }

    Instance=HLIGHTDS
    {
    Moveable=True
    MeshFile=hlglo_DS.gmt CollTarget=False HATTarget=False LODIn=(0) LODOut=(350)
    }

    Instance=HLIGHTPS
    {
    Moveable=True
    MeshFile=hlglo_PS.gmt CollTarget=False HATTarget=False LODIn=(0) LODOut=(350)
    }

    If anyone has an idea, or needs anymore information, let me know. This issue has me stumped.
     
  2. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    How many cars you have on the track when issues show and are they close to each other or at different parts of track?

    I would have to verify it, but if I recall rF2 can only support a number of lights affecting each track object. I don't recall the exact number - 6? 8? That would be 3-4 cars maximum.
     
  3. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    It can happen with two cars on track. But it only happens with one type of car. In our six hour Sebring race a while back, we had three classes of cars, and maybe 20 or so cars running when it got dark. Only this one car had headlight problems, all others were fine. The track just goes black when there are two or more near each other. I'll try to get a video up to show what I mean soon.
     
  4. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    Video of the problem.

    https://www.youtube.com/watch?v=TZ8wVoHvoLo

    All alone, it's fine, but with another car, there are issues.

    I think you're right about the number, but the track just goes black, as if no one at all was lighting it.
     
  5. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    Ok, I've done more "research", it seems that it is only showing a couple of omni lights. With other cars, I noticed it kind of did the same thing, except your headlights always showed, and other cars' would disappear. It seems the exact opposite with my car though.
     
  6. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    If it can happen with just two cars, then I doubt you're actually hitting the limit of lights, but you may be running into a bug, when engine thinks the limit was reached or fails to assign light parameters to shaders.

    At this point I can only make a wild guess that it has something to do with object or instance naming. Maybe vehicle naming or directory naming? Unfortunately ISI tends to base a lot of functionality on names or name prefixes rather than adding properties to objects.

    My suggestion would be to create additional car from scratch, based on working model. See if it works. Then start copying that broken car onto this new one, part by part and keep testing - see when it stops to work. This way you can narrow it down.

    That's the one thing I dislike in rFactor modding - it requires more technical and engine-specific knowledge from an artist that it should. This is why a mod what would work properly under all circumstances was always a rare thing in rFactor.
     
  7. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    All of our cars are based on the same "base"(copied gen file from known working car, and edited with parts for other cars), so I'm pretty sure that everything is named correctly. But I will try to make a new car as you suggest.
     
  8. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    Ok, I think I've fixed the problem. I made a new maps folder and exported everything to that, and now they seems to work. The maps folder was just called Maps, new one is CARNAME_Maps. Maybe that's the way to go in the future.
     

Share This Page