The web team at Turbulent is working to build an all-new Star Citizen pledge store complete with interactive ship models… and we’re demoing a prototype of this holographic viewer for you with this announcement! This prototype is loaded up with the actual concept model of the Xi’an Khartu Scout.
Tech
The viewer is using WebGL to display the ship meshes in your browser. This technology allows us to use the GPU to display a high number of polygons on screen and also provides us with a rendering pipeline to create view options and effects with the shader API. The viewer at the moment is powered by the outstanding open source three.js library , we thank them for providing such convenience!
Star Citizen ship meshes are very large and thus required some work to get them loaded in the browser in an acceptable time frame. Most graphics card can render very high poly counts even in the browser and so transferring the model data from the web servers to your browser becomes the bottleneck. We start from a 3DS / CryEngine output of the model in pieces (which can weight over 100 megs and up!) and construct and a highly optimized and compressed binary triangle stream using the OpenCTM format. For example, the full-resolution Hornet weights about 85 megabytes in OBJ format and compresses down to 1.5 megs with this method. We can then easily unwrap and load in GL buffers without too much additional processing on the browser side. Using this method, in our test lab, we were able to load and render a 6 million polygon ship! (I will let you guess which one) Obviously, we still plan on using LOD versions for the higher end ships in order to support a broader range of hardware profiles.
As WebGL sees more adoption and support, we think harnessing it’s power to bring some of the game elements on the web though utility viewers and browsers is a great way to enhance the immersion in the game universe.
Controls
- Orbit Cam: Click and drag around the viewer with your mouse to view the model in all angles.
- Orbit Cam: Right click to pan.
- Mouse wheel to zoom in and out
- Use the buttons at the bottom to jump to preset locations around the ship or activate view options.
- Free Cam: Use your keyboard keys (WASD, QE) in conjunction with mouse drag to move the camera anywhere on the ship.
Keep in mind this is a prototype of the viewer. It has been mostly developed using Google Chrome and so should be best viewed with that browser (though it should work properly on Firefox as well, fingers crossed). As the team iterates on it many more features will be added like additional view modes, ship components and compatibility , loadout options. The goal is to bring every ship and variants available in that viewer for you to browse!
Note: If you are unable to access the viewer with Chrome, make sure that WebGL is active by typing “about:flags” in the URL bar and checking that the option “Disable Webgl” is not set.