Custom animated prop sections are dark

Layl

L1: Registered
Jun 15, 2013
30
38
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.

Np2Nh3B.jpg


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.
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
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.
 

Layl

L1: Registered
Jun 15, 2013
30
38
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.
 

Izotope

Sourcerer
aa
May 13, 2013
698
764
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.
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
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.
 

Layl

L1: Registered
Jun 15, 2013
30
38
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.
 

Layl

L1: Registered
Jun 15, 2013
30
38
I tried to resolve the lighting issue by changing the idle state to better catch the light:
MR0rNaR.png


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

4KYf89J.png
 

Layl

L1: Registered
Jun 15, 2013
30
38
On advice from Stiffy in steam chat, I double-checked my vertex normals. In maya they're right:
PAbrytx.png


But in Source, they end up being wrong:

zUPiykX.png
 

MOCOLONI

L6: Sharp Member
Dec 16, 2014
373
89
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.
 

Layl

L1: Registered
Jun 15, 2013
30
38
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.