11 February 2017

VDSS - Simulation and Rendering

It's been quite a busy week for me; getting some professional photos taken, attending a local business event, a fair amount of admin, and family things, so I've not been able to make as much progress with this as I would've liked. Good reasons though!

However, I did significantly improve the Simulation process - it's now much closer to what I was expecting to see.

I've also added very simple 'glass' objects to the 3D rendering, for the main display sphere, spinning screen, and the beam source. Here's a quick video of what I've got so far (it's much smoother in reality):

Clearly, that doesn't look much like glass, and I need to remove the portion of the sphere covered by the beam source cones. That'll come later.

I also need to figure out a good way to show the screen spinning really fast. This is actually easier said than done. It's currently rendered using the overly simplistic method of adding half a degree to its Y rotation every frame. This has a number of issues:

  1. It's not very fast. But simply adding more degrees per frame results in choppy animation. Imagine adding 90 degrees per frame. Then you end up with an X. Not smooth.
  2. It's inconsistent. Because it's progressing a certain distance per frame (frame based rendering), as the frame rate varies (particularly while rotating the view), it appears to speed up and slow down. If I do any kind of animation, I should be using time based rendering.*
I'll investigate motion blur, and maybe even just replace the flat spinning screen with a cylindrical effect. I'm uncertain the approach I'll take at the moment, but it's not a priority yet. This might well be a topic for a future blog post in itself.

As for the simulation itself, it's getting there, but it's not quite perfect yet. It should be a bit more like an hourglass top to bottom. It's probably related to some inconsistent scaling (both in the simulation and the rendering) which I'll tidy up, and it's not working properly for multiple beam sources. I'll fix it though :).

Once I've fixed the simulation, I'll concentrate on the web interface!

* Older PC games used to use frame based rendering. This is why, when you played them on a more powerful PC, which was capable of rendering more frames per second, these games ran comically fast. The "touch the forward button and now you're at the other side of the map" kind of fast. This is why time based rendering is so much better - the time that elapsed between frames is used to determine how much something should be moved. Now, the speed is constant, regardless of the power of the CPU.

No comments:

Post a Comment