I continued working on the character controller by moving into the visual side of the project and integrating a proper player model. I added a new character model and tuned its scale and positioning so that it correctly matches the physics body. I also added an asset loading system and a basic loading screen so that the character and assets in the future can be loaded before the game starts.
When I was working on the project I felt that everything looked weird and that was because I forgot to add shadows. So I added them and then spent quite a bit of time improving the lighting and shadow quality. I also added tone mapping to make the scene look better. While testing the character model, I ran into shadow acne and something called peter panning, so I spent some time tuning the shadow bias and normal bias to get a balance between the two.
I also noticed that the character and small vertical movement/jitter while walking on flat ground probably because of the physics adjusting it’s position. I added direction Y smoothing to the character model so that small physics corrections don’t make the character appear to jitter while moving. Also the camera movement wasn’t good so to make it better I added vertical smoothing to it.
Previously, the shadow camera covered a fixed area of the world which made stuff not in the coverage area have no shadows so I improved the directional shadow by making the shadow coverage follow the player. And the final change was working on the model’s materials since the character looked overly metallic and glossy in Three.js even though it looked normal in Blender. Turns out the materials had an incorrect metallic value, so I corrected that and adjusted the roughness to make everything look good.
Next, I’ll finally start building the character state system and start moving toward animations.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.