Jump to content
  • Advertisement

brkho

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

120 Neutral

About brkho

  • Rank
    Newbie

Personal Information

  • Interests
    Art
    Programming
  1. Apologies for the late response on this; I had a busy week at work and didn't have time to work on my game until recently. I now synchronize the client and server clocks using the method described by hplus0603 and keep a jitter buffer on the server. Everything works wonderfully now, so thanks a bunch! One thing I am curious about is the best way to prevent the client's clock from bouncing around the "true" server clock if the latency is sufficiently high. This happens because the client won't get the response from the server to adjust its clock until a full round trip has passed. Thus, if the RTT is high, the client may receive many messages to bump up its clock and actually overshoot the true server time before the server recognizes this and sends a message to bump down (which starts the same periodic process over again). I currently combat this by having a running estimate of the client-server RTT on the client. I then use this to restrict the client's clock adjustment to a single time per RTT interval. This works, but it delays the clock synchronization process by quite a bit. I don't really see a way around this, but maybe there's something I'm missing?
  2. As a bit of background, I have a client sending input updates to the server 20 times a second. Similarly, the server's update loop also runs at 20 times a second where it processes all client messages in the message queue, updates game state, and sends game state updates to the clients. However, despite my client and server loops running at the same rate, my server sometimes doesn't receive a single input message from the client during the 50ms window between server updates. I believe this stems from my client's update timer not being completely reliable and the non-deterministic delays inherent in sending a UDP packet over a network. The problem I'm running into here is when I try to reconcile client-side prediction with server updates. Let's say my server just acknowledged input message M from the client with state S. The client runs the game simulation with the buffered messages M+1, M+2, and M+3 to get the predicted position. This is fine, but let's say the server does not receive message M+1 before the next server update loop starts. In that update loop, the server will have no new client messages to acknowledge, and will send out an updated game state S+1 to the client while still acknowledging input message M. When the client tries to do client-side prediction, it will start from state S+1, but now it will simulate with inputs M+1, M+2, M+3, and M+4 which effectively results in a prediction in the "future" because we advanced S without increasing M. None of the articles I read online discussed this problem, so I feel like I'm missing something fundamental here. Could anyone shed some light on my issue?
  3. brkho

    PDF derivation in UE4

    Wonderful, this is exactly what I was looking for. Thanks!
  4. Hi all,   In Karis's 2013 course notes for PBR in Unreal Engine 4, he states the PDF used in importance sampling in shader code: // Incident light = SampleColor * NoL // Microfacet specular = D*G*F / (4*NoL*NoV) // pdf = D * NoH / (4 * VoH) SpecularLighting += SampleColor * F * G * VoH / (NoH * NoV); Given the specular lobe of the microfacet BRDF being used (Smith GGX), I'm having a bit of trouble arriving at the stated PDF. In particular, I'm working through the derivation described in the GPU Gems chapter on importance sampling, and I don't fully understand how to get the material function in terms of spherical coordinates (like in equation 4 of the GPU gems chapter).   Maybe it's just that my knowledge of calculus and coordinate systems has gotten increasingly rusty over the years, but could anyone walk me through the derivation or point me in the right direction? Thanks!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!