Custom animated prop sections are dark

Discussion in 'Mapping Questions & Discussion' started by Layl, Mar 18, 2017.

  1. Layl

    Layl L1: Registered

    Messages:
    30
    Positive Ratings:
    34
    I've got a custom conveyor belt prop that has sections of the belt moving across. However, half the sections are lit really dark. This is what it looks like in-game.

    [​IMG]

    How can I resolve this issue? Flipping the model to its side gives it lighting on both sides that's acceptable enough but of course then it's on its side rather than the orientation it should be.
     
  2. Idolon

    aa Idolon the worst admin

    Messages:
    1,548
    Positive Ratings:
    4,437
    Try using a material proxy to scroll the texture instead of moving the polygons around. Nothing moves around, so no weird lighting happens. I think this will also let you change to prop_static instead of dynamic.
     
    • Like Like x 1
  3. Layl

    Layl L1: Registered

    Messages:
    30
    Positive Ratings:
    34
    That's one option but I would like to use that as a last resort, I really like the effect the moving sections give as opposed to it being faked with materials.
     
  4. Izotope

    aa Izotope Never releases maps

    Messages:
    619
    Positive Ratings:
    584
    Portal 2 did an interesting approach to conveyorbelts.
    They set up their moving parts as individual tracktrain brushes in a nodraw box outside of the map with light entities to light them up.
    When the map loads, these tracktrains get teleported to their starting positions and move along their paths.
    At the end of the path they get teleported to the starting path again.
     
    • Like Like x 1
  5. Idolon

    aa Idolon the worst admin

    Messages:
    1,548
    Positive Ratings:
    4,437
    I don't think there's any way to do an honest animation while making the lighting look nice. Prop_dynamics have dynamic lighting based on their origin and rotation, which I think doesn't account for how parts of the model might be displaced due to animations. Unless you can somehow get each section to be independently dynamically lit, you're SOL.

    You can trick the game into lighting it properly with a fullbright texture (ew) or lights underneath (not super practical).

    You could also try shortening the animation to just a single section's-length rotation. However, it'll probably look really jittery since every section would be teleporting back to its start constantly and Source has to interpolate between frames.
     
  6. Layl

    Layl L1: Registered

    Messages:
    30
    Positive Ratings:
    34
    Hm, all not quite practical solutions for the results they give. Compared to everything so far I think I'll get the best results form a scrolling conveyor belt material proxy. Still, if lighting gives this bad results I feel like other animated props I have planned will have problems of their own. Even an equally point-lit model with AO would look better than the results I'm getting so far.
     
  7. Layl

    Layl L1: Registered

    Messages:
    30
    Positive Ratings:
    34
    I tried to resolve the lighting issue by changing the idle state to better catch the light:
    [​IMG]

    However, when in motion the rotations of the sections are incorrect in Hammer & TF2, even though they're right in Maya:

    [​IMG]
     
  8. Layl

    Layl L1: Registered

    Messages:
    30
    Positive Ratings:
    34
    On advice from Stiffy in steam chat, I double-checked my vertex normals. In maya they're right:
    [​IMG]

    But in Source, they end up being wrong:

    [​IMG]
     
  9. MOCOLONI

    MOCOLONI L5: Dapper Member

    Messages:
    243
    Positive Ratings:
    60
    Disabling shadows on the prop may fix the issue, but making the whole material self-illuminated. This is how Source works when it has no dynamic, global shadows like in CS:GO.
     
  10. Layl

    Layl L1: Registered

    Messages:
    30
    Positive Ratings:
    34
    Disabling shadows didn't fix it. I was told all day that source only does dynamic shadows and lighting for the first frame of the idle animation, but this turned out to be entirely wrong. The problem is that the MESA exporter messes up normals on rotated meshes. I've submitted a bug report on their forums, but it's a ghost town there so I'm skeptical it will be seen.