We’ve been hard at work on the main storyline of the ChipWits reboot and want to give you a sneak peek at one of our missions under development this week. The mission takes place on the exterior of a space station. Your ChipWit needs to clear away parts of a nebula that have been blocking a critical communications antenna. Parts of the terrain are hidden from the player), with the nebula concealing parts of the level. The final effect (fog of nebula?) looks like this (play the video to see the hypnotic animation of the nebula):
How We Made the Effect
We start with a nice space skybox with a planet, which you can get from the Unity Asset Store from publisher Dogmatic Games:
After picking the skybox, we need to draw the nebula, so we need to pick a mesh for the nebula puffs. We ended up using this smoke puff mesh from AllIn1VfxToolkit:
Now we can overlay these puffs wherever there is a square which has not yet been revealed, decreasing the alpha slightly for squares nearer-by. Note the tiles on the bottom look more revealed because they have some height, which blocks some of the cloud:
At this point, the fog is functional, but it looks artificial and very repetitive. We want it to look better. Rather than lots of little uniform puffs all oriented in the same direction, what if we made fewer of them, larger, and with random rotations and heights? Also, most pictures of nebulae we’ve seen are not white, so let’s change the color to magenta:
How We Used the Reverse Fresnel Effect
This is looking better! Now, however, we can clearly see the outline of each puff. We’d like them to start to blend together. To do this, we want to remove the rim of the object. The Fresnel Effect computes the angle between the surface normal and the view direction and is typically used to enhance the edges of an object.
If the Fresnel Effect is applied in reverse, it makes the edges fade away! Here, we apply it to each of the nebula puffs:
Now, we can apply an animated texture to the mesh, resulting in the final effect. This would not have been possible without the reverse fresnel effect!
Discussion
What do you think of the final nebula effect, and our use of the reverse fresnel effect? What about the idea of “fog of nebula”? Do you have any suggestions for how to make this mission even better? Post your thoughts in the comments section, below.
Michael
Wow, the final result looks amazing.
Mark Roth
Thank you, Michael! We’re still working on the tile sets and other elements, to complete the mission.