1. Rotating objects look jerky. This is easily solved with brush model interpolation (which smooths the angles).
2. However getting pushed by a rotating brush model, makes the view look jerky. So "view interpolation" is needed too. Again to smooth the angles.
Funny stuff.
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Actually I'm all wrong about this. I swear I solved this problem once but maybe not as fully as I imagined. (Cause my attempts to solving this are failing and now I'm just confused).
Back to the drawing board, recognizing that QuakeC's 10 FPS is probably the cause of jerkiness (onground, not, onground, not) and maybe I fix some other jerkiness but not this?
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Ok ... my memory must suck. After a waste of an 1.5 hours, I've discovered even with Fitz 666 that interpolating angles is purely futile.
The reason is that the angles are sent as bytes (except for the client view). These are rounded ("256 degrees".)
This means the angle differences from update to update are going to be inconsistent and trying to interpolate them is going to be jerky because one update might have rounded in a way that makes it signifcantly higher. Oddly enough, the ancient NetQuake protocol with just sending a truncated byte is going to be more consistent.
Maybe I was experimenting with short angles (which are smooth).
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
I guess this is a problem for multiplayer with varying lag from packet to packet? Doesn't seem like it's an issue for single player or local network.
Anyway, let the client interpolate bmodel rotation over several packets, should be fine for brushmodels with constant rotation (or minor angular acceleration).
It might be nice if the server could somehow clue-in a client that the player is on a particular rotating bmodel, so that the client could add the exact interpolated rotation delta for that frame to the view direction.
qbism wrote:I guess this is a problem for multiplayer with varying lag from packet to packet? Doesn't seem like it'an issue for single player or local network.
It is absolutely a problem in single player. 360 degrees cannot consistently be truncated to a single 0-255 range byte.
qbism wrote:Anyway, let the client interpolate bmodel rotation over several packets, should be fine for brushmodels with constant rotation (or minor angular acceleration).
Not really. The server will be sending angle information every packet, not angular momentum. If you knew an object was rotating for sure, that'd be one thing. But you can't distinguish between something rotating or turning. Sure you could do a clever hack and I was so frustrated for a moment I was considering the same thought you had.
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
baker i may be wrong, but i think even in half-life (1) that when you're pushed by a rotating brush your view is jerky. maybe ill do some experiments and let you know?
apparently i was wrong, i just tried DoD and it seemed pretty smooth.
how fast are your brushes rotating? maybe it has to do with the players max speed?
Baker wrote:It is absolutely a problem in single player. 360 degrees cannot consistently be truncated to a single 0-255 range byte.
Angles should be sent as shorts. With shorts, engine rotation and physics fixes, the ride seems smooth enough. Protocols that can only send bytes should be discarded from consideration for "ridable" rotation, except for purposes of mental anguish. Can't send something so grainy to the client to interpolate out... with slow rotation, some packets will duplicate the values if rotation hasn't increased more than 1/255 circumference. And little lag variations are killer. 0 0 1 2 2 3 4 4 4 5 6 ....
I don't think that QC should be directly controlling the rotation. Look at rotating pickups - they're smooth; QC just isn't up to the job here (plus there's angle quantization to deal with - yuck).
A proper interface for rotation would consist of StartRotating (speed, vector) and StopRotating (speed, vector) and the engine can work everything else out. Both the client and the server can simulate the rotation separately to avoid sending angles over the wire. Yes, it means a cheating client could simulate a different rotation, but it can already do that anyway - just put different values into glRotatef (or don't bother calling it at all) so that's no big deal.
Watch out for values of angles[1] of 1 or 2 - they have special meaning in QC (evil evil evil - and all the more reason to keep QC away from it).
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Baker wrote:It is absolutely a problem in single player. 360 degrees cannot consistently be truncated to a single 0-255 range byte.
Angles should be sent as shorts. With shorts, engine rotation and physics fixes, the ride seems smooth enough.
That's what I did to fix the problem. Remake Quake probably did that with the 999 protocol (haven't checked).
But still neither NQ or Fitz 666 support short angles for entities (Fitz 666 does for the player view), so that means a non-standard protocol. But it is smooth.
Maybe last year I was doing a test that had some magical rotation speed that rounded well for byte angles and tricked myself into thinking bmodel rotation interpolation could solve the trick.
[Still might need bmodel interpolation for proper presentation over a network .... I hope not, but I've grown to expect inconveniences.]
Last edited by Baker on Mon Jun 18, 2012 1:41 am, edited 2 times in total.
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
CSQC: Probably, but if a much simpler solution exists why go to all the bother?
I'm fairly certain that a major potential problem with any QC-based rotation update is that an entity can be thinking out of step with CL_LerpPoint updates.
Even with shorts - or pure floats across the wire - Hipnotic rotation messes up. RMQ can select from 3 different precisions (quantized to byte, quantized to short or full float) which exists just for testing and evaluating the tradeoff between more data and smoother rotations. Shorts are good enough for avelocity-based rotation.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for