site banner

Tinker Tuesday for May 6, 2025

This thread is for anyone working on personal projects to share their progress, and hold themselves somewhat accountable to a group of peers.

Post your project, your progress from last week, and what you hope to accomplish this week.

If you want to be pinged with a reminder asking about your project, let me know, and I'll harass you each week until you cancel the service

2
Jump in the discussion.

No email address required.

While I wait for mouser.com to finish delivering some stuff for my LED project I dusted off a 3D racing game I had been working on.

I originally started it after catching up on the Fast and the Furious series and Dom Toretto's Charger was top of mind. I wrote an all software rendeter in Rust but every nicely detailed free charger model I could find was way too slow without GPU acceleration. So I began rewriting it to use wgpu but it was pretty frustrating due to annoyances around Rust ownership junk but also everything in Rust that's new and exciting is unusable with LLMs because they mix old and new incompatible APIs in their answers. So I stalled out.

The last few days I decided to start over in C++ with SDL2 and bgfx and it has gone significantly better. I can get the car models fully loaded and it's pretty fast, even on crappy ancient laptop GPUs. I am getting some banding in texture maps but I'm sure I'll figure that out eventually.

Currently working on adding controls to the car and having the camera chase it as it moves around an infinite plane, and also looking into making an animated sky sphere from 360 degree YouTube videos. I suspect it'll involve Blender, at some point, which I don't know at all. Probably not too far behind you, @FCfromSSC

I am getting some banding in texture maps but I'm sure I'll figure that out eventually.

This ended up being caused by only some of the faces in the 3d model having textures, with the rest relying on material color and phong shading, but my fragment shader didn't know that so it was trying to use a junk texture for those which just led to this banding effect.

Creating another vec4 and treating the x component as a boolean to signal to the fragment shader whether it should sample from the texture is the best I could figure out how to solve this.

Anyway, looks much better now. Ride or die time with the homies is one step closer.

Still having trouble finding a 360 degree panorama I could use. I might just go to a parking lot in a scenic skyline park of town and take a photo sphere with my phone.

is the car model fully UV-mapped?

It is, yeah. I downloaded a free Dodge Charger Daytona Hellcat SRT model from sketchfab.com.

Not Dom Toretto's signature black Charger but it'll do for now.