Tesseract - Open World Planetary Engine

I’ve recently added a new model component, the LODPlaneStatic, which is used for finite or infinite chunked landscapes, based on static data instead instead procedural sources. It’s purpose is for high performance vast landscapes without the cost of procedural generation / composition of Sources. The terrain is instant without generations/allocations, regardless of motion or immediate jumps. The terrain is hierarchically culled and a single draw call for minimal cost. As a side note, “renderedObjects” means visible objects, the trees in the scene are just 1-2 draw calls with auto-instancing.

It uses the same scalable splatting technique supporting up to 256 materials. With normal, roughness, displacement and all features of the MeshStandardMaterial. Also per-pixel depth based blending instead only fading between materials.

As the LODSphere model used for planets, LODPlaneStatic supports attachments, for example another can be added for water with it’s LOD for geometric waves.

The pixel-world unit ratio can be stretched without artifacts with a bicubic interpolation, also larger than terrains of Unity or Unreal, depending on the used resolution and required detail control. It uses an additional modulator map, with different prefabed noise sources and will compose a more detailed and varied surface in sub-pixel range. The default tesselation suffice already for displacement details such as on rocks.

Additionally there is a attachment for this component which will decorate the near surroundings around the camera, faded away in distance. Theses decorations are added per material and automatically generated (threaded) according to the materials weights. The distribution function per decoration can be implemented. The decorations are processed in blocks and either instanced or single objets. In the picture above, grass across the entire landscape is added this way. The fading technique can be either custom, scale and or opacity, also dynamic features such as wind can be added.

IndexedVolume

This object boosts large scenes for rendering as well as accessing it’s content. It takes over the projection of the renderer and renders the scene with hierarchical and distance culling. matrixAutoUpdate is disabled by default, the idea is to touch as less as possible objects per frame. The updating logic is performed outside and an explicit update call will efficiently reindex the object and update the matrix.

I’ll post a video soon to demonstrate the difference of a lineary rendered scene. The difference can go from few FPS / crash without, to stable 60 FPS with IndexedVolume.

IndexedVolume: Auto Instancing

Geometries or materials can enable dynamic auto-instancing, which reduces drawcalls per asset to 1 while culling is still performed. 2 approaches, using cheaper offset+orientation or full matrix is supported. Any material, standard and custom are supported. Nothing has to be considered, except if it makes sense to enable instancing for a model.

IndexedVolume: Auto Impostor

For larger assets, revelant for big distances the autoImpostor flag on the geometry or material will render distanced objects as 9-angle impostor billboard, a larger group of objects sharing a node-level is batched into a instanced block.

Mesh Packing

This is a function that willy not only merge geometries of a mesh hierarchy into one, but also pack it’s materials and textures into a single one. It supports all map types, multi-material groups and repeated textures. The result is a single geometry, material and texture per type (diffuse, normal, roughness etc.)

(Sponza model, packed into a single geometry, material and texture)

(CS italy)

Notice that maps/scenes as above aren’t the best suited case, just to demonstrate. Rather suited are models with a lot smaller parts/materials which drag down performance if they are separate for culling. It additionally has options to optimize texture sizes or generally scale it down. A lower resolution can be generated for example to generate a proxy-imporstor model, like of a larger building.

Besides preprocessing of assets it can be enabled in a IndexedVolume for runtime convertion, since assets which are instanced should be a single geometry and material, else there will be a instancing stack for each object in it’s hierarchy.

NITRO (a THREE based engine)

This is a engine i made on top of THREE, i will create an extra thread soon. It basically extends THREE with some features, WebGL2 and adds a standard mechanism for tags (controllers), ROM (render object model) and surfaces automatically allocating and scaling RT’s of a ROM pipeline.

It has a unified system for input with devices such as keyboard, mouse, gamepad and virtual gamepad. A fast sliding-sphere-to-polygon collider system without physics engine and a “root” concept for raycasting are just one of major features of this engine.

I mention it since Tesseract requires some modifications in the core of THREE, for example to take over the projection routine.

I also mention it since it also adds support for environment map fog and global uniforms to fade with an actual sky/atmosphere instead a single color. The environment map is rendered as background and the environment map fog will blend objects into it besides it’s regular job as environmentMap.

16 Likes