Exploring Hytale’s block tech
If you’ve watched the Hytale announcement trailer or taken a look at our media section, you’ll have seen plenty of landscapes and prefabs - and each of them has been built with blocks. Today we’re going to explain the features and techniques that make Hytale blocks special, and how you’ll be able to make use of them as you build your own creations.
RGB tints
An extreme example of Hytale’s RGB tool in action!
Hytale’s creative tools can be used to change the RGB tint of any block. By changing the red, green, and blue properties of a texture, you can dynamically change its color. Above, you can see an extreme example of this technique: the ground is composed of the same basic grass block, but different areas have had their RGB balance shifted to the extremes.
RGB tweaks being used to create variety within a biome.
Here’s an example of this technique being used in-game. In this shot, the blocks to the right have had their RGB balance shifted towards blue to create a sense of mystery. What secrets await players who venture deeper into the woods?
Transition textures
Transition textures being used to break up the lines between blocks.
Transition textures are used to create smooth transitions between different block types. In the example above, you can see how grass, sand, and gravel intermingle without hard lines forming where the blocks meet.
“The transition texture feature is one of the many tricks we use to try to break up the cubic nature of our game” says Nicolas ‘Bilou’ Gauthier. “It’s an extra quad with a specific texture that can appear at the boundary between different blocks. It’s defined on a per-block basis, with a set of valid blocks that it can target. Builders can use this feature to create nice transitions between blocks”.
Incorporating Hytale Model Maker
The frequency of ore spawns in this shot has been dramatically turned up for the purpose of this example!
Hytale blocks can be rendered in several different ways. The most basic kind of block is simply a cube with a texture defined for each face. We also have blocks that use models and textures defined in Hytale Model Maker. These provide creators with freedom to create some pretty cool effects!
We also have a hybrid type of block that uses elements of both. “This is useful for combining ore with several types of blocks, depending on the location that you are in” says Bilou. “It means that you can find ores in stoney areas, sandy areas, and so on.”
In the example above, you can see how models created in HMM are used to create the sense of ore emerging from the surrounding environment. They even glimmer in the dark!
Submersible blocks
Reeds and sunken treasure are examples of ‘submersible’ blocks.
These hybrid block types can also be used to create interesting interactions between blocks. In this example, note how certain blocks - the vegetation and treasure chest - intersect with the water, creating the impression of being underwater.
“Submersible blocks can be any block in the world” says Kevin ‘Slikey’ Carstens. “Using a simple option in the configuration file for the block, it can be made to submerge in any fluid - which are also just special blocks. The purpose of this feature is to not impair fluid physics with fences, flowers, or other non-solid blocks.”
“The benefit of this feature is that you can make good-looking flooded areas” Slikey continues. “You can have fences in your river to block NPCs and harvest flowers from the bottom of the ocean. As you can see in the trailer, we have lots of corals in the game which integrate perfectly into the underwater world.”
Varied foliage
A tree! You’ve seen lots of these.
Hytale’s treetops provide an example of how custom blocks can be used to create visually diverse environments. Each tree is topped with a crown of leaf blocks, which have unique properties that help us create varied foliage.
Here’s what a leaf block looks like in Hytale Model Maker.
Note how the leaf texture bisects the block from multiple angles, rather than appearing on the outer surface of the cube. This immediately helps the block to feel less ‘blocky’ - but we go one step further. Every time a leaf block is placed, we rotate it to create a sense of random leaf placement.
Ambient animations
Taking a walk through the long grass in Hytale.
In the clip above you can see how long grass sways in the wind - and how it reacts as you move through it. This is a special effect that can be applied to a block to help environments feel more dynamic. “The effect you can see on grass or leaves is done on the shader level” says Bilou. “It’s a vertex displacement formula, based on the presence of a nearby entity.”
Particle effects
Punching blocks to demonstrate particle effects. For the purpose of this demonstration, we’ve made each block break in one hit - this won’t be the case normally! Also, the punch animation in this clip isn't final.
Hytale also has a system for attaching particle effects to block types. In this example, you can see how each block breaks apart in a different way when it’s destroyed. “We have ‘particle block event sets’ that can be linked to blocks” explains Matthew ‘Mattht’ Sellers. “Each can define a particle system for various block ‘events’.”
Examples of ‘events’ include walking and running across a block, interactions with soft and hard materials, as well as hitting, breaking, and building with each block type. Particle effects can be tinted in the same way as blocks, too!
“Particle effects add a lot to the overall gaming experience” Mattht says. “It gives you a feeling of being in the world and actually interacting with the various environments you explore - for example, splash effects when you jump into or out of water.”
Interactions and animation states
Entering a cozy cabin through animated double doors in Hytale.
We’ve also built systems to allow blocks to animate in sophisticated ways. In the clip above, the player approaches a pair of double doors that swing apart when they’re opened. “This uses some of the underlying technologies that we have” says Nick ‘Zero’ Drabsch. “For example, the ability to display an animated block inside the world.”
“When a door is opened, we change the underlying block to be the ‘opened door’ block” Zero explains. “Then we visualize that for players by playing an animation on the block’s model. The same system is used for trapdoors, chests, levers, lanterns, and any other block that animates between different states.”
When Hytale launches, modders will be able to use this system to create their own block interactions. “As the system is now, it will be very easy to create custom blocks that change state when interacted with” Zero says. “When custom functionality is needed, our interaction system will allow modders to handle these more complex cases without too much hassle.”
Hytale’s block system is designed to support immersive and interactive environments - whether you’re playing adventure mode, building your own world, or designing a minigame.