Modulating object rotation

Captain's Log: Stardate 77437.1

While yesterday I felt like I had an iron ball chained to my ankle because of all the bugs I ran into, today was the exact opposite: a couple of work items I'd been putting off went much faster than expected.

Part of this is because I found a way to cheat for the modulation of rotation parameters. Modulating the rotation parameters themselves is a big project. The GPU will need a bunch of data about the entities that it currently doesn't have, and there are a few very expensive matrix operations. But what I realized is that, for now, if I just allow rotation around the Y axis to be modulated, rather than around an arbitrary 2-axes (the entity normal and tangent), it's super simple and efficient. I got this implemented and now you can modulated vertical rotation for exciters and mics. Maybe one day I'll come back and do the full-blown version, but I somewhat doubt it is worth it.

The other thing was that panning modulation was done at the sample block level, and it was easier than I expected to push it down into the GPU. Doing this means that each sensor iteration requires a second global GPU memory write, which I was worried about, but it's a non-issue. Simply having each sensor output two audio streams was extremely simple and didn't cause any perceptible performance decrease.

At this point, I am debating whether I should work on a demo video now, or do one more improvement first. The one remaining thing I might do is add some smoothing to the square, saw, and S&H waveforms for the modulators (and oscillators). This isn't totally necessary, but there are some parameters where modulation with a e.g. hard square wave is pretty noisy, and it should be pretty easy to just add a tiny bit of smoothing/slew to the waveforms to help with this.


© 2024 Anukari LLC, All Rights Reserved
Contact Us|Legal