Thursday, September 24, 2015

Day 32: The Astronaut is a Fish

So far, we've got a bit more progress done in Deep Space Nine. A fade-in/fade-out effect was thankfully available as CrossFadeAlpha, so the black screen faded very nicely. I also made a section of debris for the beginning sequence that would not collide, but would go by very quickly for a convincing effect.

Now here comes the hard part; when putting the UI onto the screen, it was suggested that I go with a concave curvilinear perspective, i.e. a Fisheye approach. Luckily enough, Unity already provided a post-processing shader that extended the image at the edges via (1-coords) * (coords), where coords was a value between 0 and 1. Unfortunately, that lead to a convex approach, as if we were looking into something.

After working with the shader, I discovered that the edges could represent a concave structure by doing (coords)^2 instead of multiplying it by its linear opposite. This also represented a problem with the UI; since this was a post-processing shader, the UI had to be represented in world space. This would lead to the small issue of debris getting in front of the UI (within the helmet! Such immersion!). This fix came in the form of a separate camera, where the camera would render the UI without depth and then the rest of the scene, allowing our dramatic perspective to be complete:



What next? We need a controller and characters to really move anywhere, so I'm quite limited. I may incorporate some sounds first.

No comments:

Post a Comment